HTTP load balancing algorithm

Aleksandar Lazic al-nginx at none.at
Tue Jan 23 10:22:53 MSK 2007


On Mon 22.01.2007 20:42, Florian Munz wrote:
>
>I was wondering if nginx has a smarter way of distributing the httpd
>requests than apache and could help me here?

for such a setup I used the following solution:

---
clients
   |
   |
   V
nginx (upstream to haproxy)
   |
   |
   V
haproxy (http://haproxy.1wt.eu/)
   |
   |
   V
appserver
---

Yes that isn't a easy setup but you have following benefits with haproxy
at the moment http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt :

per listener:
cookie sticky
appcookie sticky

3.2) Redistribute connections in case of failure
------------------------------------------------
In HTTP mode, if a server designated by a cookie does not respond, the
clients may definitely stick to it because they cannot flush the cookie,
so they will not be able to access the service anymore. Specifying
'redispatch' will allow the proxy to break their persistence and
redistribute them to working servers.
---

per server:
3.3) Assigning different weights to servers
3.4) Limiting the number of concurrent sessions on each server
----

Ym2c

Aleks





More information about the nginx mailing list