Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load balance (or http proxy) by the logged in user of a Django app?

What is an efficient way to load balance (or in a sense shard) users of a Django app by their username? I want to flag certain users of the Django app and have them go to a different web server once they are logged in.

like image 358
MikeN Avatar asked Mar 05 '13 19:03

MikeN


1 Answers

If you want to have specific users on a specific server: Create multiple subdomains (www.example.com, www1.example.com, www2.example.com etc). Once a user is logged in, check if the user is on the correct domain/server. If not, do a redirect to the users subdomain.

like image 157
Willian Avatar answered Oct 25 '22 09:10

Willian