Load Balancer
Load Balancer
html#3
Load Balancer :
A load balancer may act :
- at the link level : this is called link load balancing, and it consists in
- at the server level : this is called server load balancing and it consists
HAProxy is :
listening TCP socket, and passes the requests from these connections to
connection coming from the client, on the connection going to the server,
side. This protects fragile TCP stacks from protocol attacks, and also
allows to optimize the connection parameters with the client without having
in the specification are fixed so that they don't cause problem on the
- an HTTP fixing tool : it can modify / fix / add / remove / rewrite the URL
in complex environments.
decide what server to pass the request or connection to. Thus it is possible
to handle multiple protocols over a same port (e.g. HTTP, HTTPS, SSH).
- a server load balancer : it can load balance TCP connections and HTTP
requests. In TCP mode, load balancing decisions are taken for the whole
the contents, and even pass such information to lower layers and outer
- a protection against DDoS and service abuse : it can maintain a wide number
of statistics per IP address, URL, cookie, etc and detect when an abuse is
happening, then take action (slow down the offenders, block them, send them
network-related issues.
compressed by the server, thus reducing the page load time for clients with
HAProxy is not :
- an explicit HTTP proxy, i.e. the proxy that browsers use to reach the
internet. There are excellent open-source software dedicated for this task,
- a caching proxy : it will return the contents received from the server as-is
and will not interfere with any caching policy. There are excellent
open-source software for this task such as Varnish. HAProxy can be installed
- a data scrubber : it will not modify the body of requests nor responses.
- a web server : during startup, it isolates itself inside a chroot jail and
drops its privileges, so that it will not perform any single file-system
access once started. As such it cannot be turned into a web server. There
are excellent open-source software for this such as Apache or Nginx, and
high availability.
- a packet-based load balancer : it will not see IP packets nor UDP datagrams,
will not perform NAT or even less DSR. These are tasks for lower layers.
DNS :
Web Server :
LB: