UlricE / pen

Pen
Other
250 stars 41 forks source link

Balancing algorithm #25

Open MartinKirchner opened 8 years ago

MartinKirchner commented 8 years ago

Hi UlricE,

in your wiki I could not find any hint what balancing algorithm is used by pen. By what I observe on my endpoints I assume the endpoint is chosen based on the IP. Is that correct? How is the server chosen for a specific request? Thanks in advance.

Kind regards, Martin Kirchner

UlricE commented 8 years ago

There are several server selection algorithms. The default is roundrobin with IP-based client tracking. In this mode a client connecting repeatedly from the same source address will be sent to the same backend server. That is usually the safe thing to do because some web applications keep state on the individual servers and would be confused by clients getting sent to different backends.

The other algorithms are listed in the penctl manpage. They are:

It is also possible to direct clients to or from servers based on access control lists.