Is this proxy setup realizable?
is at rambler-co.ru
Tue Aug 19 15:18:18 MSD 2008
On Tue, Aug 19, 2008 at 01:05:33AM +0200, Samuel Vogel wrote:
> I am planning on using nginx to be a reverse proxy infront of more than
> ten real servers, each containing 10 virtual machines. These virtual
> machines all contain the same setup lamp setup hosting about a 100
> users/domains each.
> This means as a total we have about 10.000 domains. As we provide low
> cost shared hosting on low cost servers, we can not switch the ip of a
> virtual machine between servers. So when we migrate a VM to a different
> physical server because of load reasons, it's IP changes as well.
> This is why we would like to use nginx infront as a reverse proxy. It
> would then always know the corresponding IP for a virtual machine and
> reroute the requests.
> With my current knowledge of nginx I would setup a virtual host for
> every VM we have and add all the domains it contains into the
> server_name variable. This would mean 100 virtual host with very long
> server_names, each containing 100 domains.
> Additionally I would like to use the reverse proxy setup to sanitize the
> requests, protect the VMs from dos attacks and if a VM goes down route
> all requests to this VM to a static file like "we'll be back soon".
> My question is, would this configuration be maintainable with nginx? Can
> it cope with long server_names and a rather strange setup like this? Or
> will it degrade my performance too much?
nginx searchs server names via hash, so it will be quick opration.
nginx does primitive only sanitize.
As to "we'll be back soon", you need to use
error_page 502 504 /back.html;
More information about the nginx