HTTPS load balancing based on some component of the URL

Posted by user38118 on Server Fault See other posts from Server Fault or by user38118
Published on 2011-01-10T15:45:39Z Indexed on 2011/01/10 15:55 UTC
Read the original article Hit count: 130

Filed under:
|
|

We have an existing application that we wish to split across multiple servers (for example: 1000 users total, 100 users split across 10 servers).

Ideally, we'd like to be able relay the HTTPS requests to a particular server based on some component of the URL. For example: Users 1 through 100 go to http://server1.domain.com/ Users 2 through 200 go to http://server2.domain.com/ etc. etc. etc.

Where the incoming requests look like this: https://secure.domain.com/user/{integer user # goes here}/path/to/file

Does anyone know of an easy way to do this? Pound looks promising... but it doesn't look like it supports routing based on URL like this.

Even better would be if it didn't need to be hard-coded- The load balancer could make a separate HTTP request to another server to ask "Hey, what server should I relay to for a request to URL {the URL that was requested goes here}?" and relay to the hostname returned in the HTTP response.

© Server Fault or respective owner

Related posts about apache

Related posts about load-balancing