To me, the question needs more explanation. If a request is made of a server in the US, how does it make any sense to send a database query from that server in the US over to Luxembourg if that is in the proximity of where the user is located? Efficiency? No, that would actually cause double the traffic over close to the same distance. Different data? I would hope not, otherwise you should definitely just store the connection of a user to a database to be used.
In reality, the current location of the user should somewhat irrelevant, and known profile information (such as the user has previously accessed the US site even though they are currently in Madrid) about that user should redirect them to the appropriate servers, probably using the subdomain strategy that Russell originally suggested. First time users could potentially be geo-redirected based on IP, but most interfaces I've seen just ask what resources they need (or the country they want to use) and redirect accordingly. -James On 03/09/2015 01:58 AM, Russell Keith-Magee wrote: > Yes, DB Routers support hints. How are you planning to inject those > hints into the router? Router arguments aren't exposed to the end user > when you do a query - they're automatically generated by the query, > and only include details about related objects in the query. A quick and draft thought would be to have a middleware that manipulates the ConnectionRouter class, which is instantiated when making database queries. But, before looking at the implementation details, maybe we should first think if it would be useful in general as a feature to pass a hint for the HTTP request to the DB routers. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54FD585A.5000302%40yahoo.gr. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVrREEmQ_AiuadJKc%2BL-qLfWHeZyrHo%3DV%2B-YTprwjb7vw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.