Load Balancing
What is load balancing?
Load balancing is the technology which spreads the load of work between two or more servers. It would usually be software based, but can also be hardware based.
How does it work?
The load balancing listens to the port where all external traffic is coming in. It then calculates the traffic, and routes it off accordingly.
Load balancing should be used on Mission critical applications with high demand / usage. Below we have listed different scenarios where we use load balancing.
Popular Websites.
Large Internet Real Chat.
High Bandwidth File Transfer Protocol Sites.
DNS Servers.
NNTP Servers.
Hardware and software load balancers can come with a variety of special features.
* Asymmetric load: To account for some servers being faster then others a ratio can be manually assigned to cause some backend servers to get a greater share of the workload than others.
* Priority activation: When the number of available servers drops below a certain number, or load gets too high, standby servers can be brought online.
* SSL Offload and Acceleration: SSL applications can be a heavy burden on the resources of a Web Server, The CPU and the end users especially may see a slow response (or at the very least the servers are spending a lot of cycles doing things they weren't designed to do). If this occurs a load balancer capable of handling SSL Offloading in specialized hardware may be used to resolve the issue. When Load Balancers are taking the SSL connections, the burden on the Web Servers is reduced and performance will not degrade for the end users.
* Distributed Denial of Service (DDoS) attack protection: load balancers can provide features such as SYN cookies and delayed-binding (the back-end servers don't see the client until it finishes its TCP handshake) to mitigate SYN flood attacks and generally offload work from the servers to a more efficient platform.
* HTTP compression: reduces amount of data to be transferred for HTTP objects by utilizing gzip compression available in all modern web browsers
* TCP offload: different vendors use different terms for this, but the idea is that normally each HTTP request from each client is a different TCP connection. This feature utilizes HTTP/1.1 to consolidate multiple HTTP requests from multiple clients into a single TCP socket to the back-end servers.
* TCP buffering: the load balancer can buffer responses from the server and spoon-feed the data out to slow clients, allowing the server to move on to other tasks.
* HTTP caching: static content is stored by the load balancer so that some requests can be handled without contacting the web servers.
* Content Filtering: some load balancers can arbitrarily modify traffic on the way through.
* HTTP security: some load balancers can hide HTTP error pages, remove server identification headers from HTTP responses, and encrypt cookies so end users can't manipulate them.
* Priority queuing: also known as rate shaping, the ability to give different priority to different traffic.
* Content aware switching: most load balancers can send requests to different servers based on the URL being requested.
* Client authentication: authenticate users against a variety of authentication sources before allowing them access to a website.
* Spam filtering: at least one load balancer allows the use of an IP reputation database to refuse mail from known spammers even before sending the messages to other spam filters being load balanced.
* Programmatic traffic manipulation: at least one load balancer allows the use of a scripting language to allow custom load balancing methods, arbitrary traffic manipulations, and more.
* Firewall: Direct connections to backend servers are prevented, for security reasons.