On Jun 23, 4:30 am, Ram Ravichandran <[EMAIL PROTECTED] s.net> wrote: > > It is going to be a huge performance hit if your load balancer has to > > check a database for each request it routes. Can you expound on what > > problem you are trying to solve with this? Maybe there is a different > > way to accomplish what you want that will still perform acceptably. > > Thanks for the replies. I have a few hundred thousand users in around 10 > servers. All information about a user is completely within one of the 10 > servers. I was planning on using the load balancer to figure which > server contains a user's information by doing a database (with some sort > of memcache?)look up. When a new user signs up, he is assigned a server > according to the information he gives at signup. I would then update the > database on the load balancer with this information. > > I am kind of lost actually... is there a better way of doing this? > > Thanks, > Ram
If you are sending a user to a single specific server, then why bother with the load balancer? I would just do the simplest path, which is send them a unique URL pointing to "their" server. For example, login to a main page, do your database lookup there and present them with a link to continue. The link will contain a url to "their" server (eg: host9.x.com). With your original route, you are now going to have to also manage a load balancer (and its fault tolerant brother) and you'll be relying on a database lookup for every page request. Seems like a lot of moving parts and it isn't even buying you any scalability. Since you are forced to one server per use, I'd just say go with it. :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---