LOAD BALANCING Dawid Królak
Intro Problem Model OSI Layer 2 Layer 4-7 Reverse Proxy
Problem How to maintain large amount of queries, requests? Buy a new faster, batter hardware? Buy faster links? Reduce service? Use load balancing methods!
Advantages Use hardware that is available but unused at this time. Use cheaper hardware. First properly configured easier to upgrade, maintain. Scalability. It`s all about speed.
Disadvantages Difficult to configure. Need more IT knowledge.
Levels of Load Balancing Layer 2 OSI Model (Link aggregation) Layer 4 OSI Model (TCP/UDP) Layer 7 OSI Model (Reverse Proxy)
Model OSI Application Presentation Session Transport Network Data Link Physical
Data link – link aggregation Many physical links can be seen as one logical. Defined by IEEE 802.3ad standard.
Caution! Standard IEEE 802.3ad is not defining Load Balancing! To load balancing we need to use algorithms! But without link aggregation we can`t talk about layer 2 load balancing.
Link Aggregation Features: Load Sharing (using available links) Automatic configuration Deterministic (predictable, controllable) Frame order (frame order is preserved)
Limiations We need to use additional algorithms to use load balancing Works only between two devices. Same speed on links (should be).
Additional info Some algorhithms can be found at: alancing+algorithms alancing+algorithms
Layer 4 load balancing Layer-4 load balancing is to distribute requests to the servers at transport layer, such as TCP, UDP and SCTP transport protocol. We know one address, load balancer is switching us to one of many servers. Pure 4-layer load balancing is being displacing by layer4-7 load balancing.
Layer4-7 load balancing Problems: One service can be run on multiple logical machines. Logical machine can be built from many physical machines. Main role of load balancing is to distribute requests to multiple logic machines/services.
Layer 4-7 load balancing Advantages: Scalability We can scale that part of system that we need. Nowadays many servers are supporting this. (database, www, webservices, dns)
Layer 4-7 load balancing
Reverse proxy Reverse proxy is special server proxy type. Typically set at front of web servers. This proxy can distribute connections to a different address. Fast and easy to configure in popular webservers (apache, lighttp)
Load Balancing layer Load balancing 2 and 4-7 can be used at the same time. Load balancer can distribute requests to other load balancer Load balancing is used in cloud computing. Load balancer and services can be runned at one physical and logical machine, like casual PC /but there is no sense to do it/ It`s better to set some load balancers instead of buying new better faster and more expensive hardware.
Bibliography
Finish. Any Questions? Thank you for your attention. Ďakujem za pozornosť. Dziękuję za uwagę.