230 likes | 421 Views
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.
E N D
Loadbalancing Dawid Królak
Intro • Problem • Model OSI • Layer 2 • Layer 4-7 • Reverse Proxy
Problem How to maintainlargeamount of queries, requests? Buy a newfaster, batter hardware?Buy fasterlinks? Reduce service? Useloadbalancingmethods!
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 LoadBalancing • 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 – linkaggregation • Many physicallinkscan be seen as one logical. • Defined by IEEE 802.3ad standard.
Caution! Standard IEEE 802.3ad is not definingLoadBalancing! To loadbalancing we need to usealgorithms! But without link aggregation we can`t talk aboutlayer 2 loadbalancing.
Link Aggregation Features: • LoadSharing (usingavailablelinks) • Automatic configuration • Deterministic (predictable, controllable) • Frame order (frame order ispreserved)
Limiations • We need to useadditionalalgorithms to useloadbalancing • Works only between two devices. • Same speed on links (should be).
Additionalinfo Somealgorhithmscan be foundat: • http://www.google.sk/search?q=layer+2+load+balancing+algorithms
Layer 4 loadbalancing • 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, loadbalancerisswitchingus to one of many servers. • Pure 4-layer loadbalancingisbeingdisplacing by layer4-7 loadbalancing.
Layer4-7 loadbalancing Problems: • One service can be run on multiple logical machines. • Logicalmachinecan be builtfrom many physicalmachines. Main role of load balancing is to distributerequests to multiple logic machines/services.
Layer 4-7 loadbalancing Advantages: • Scalability • We canscalethat part of system that we need. • Nowadays many serversaresupportingthis. (database, www, webservices, dns)
Reverseproxy • Reverseproxyisspecialserverproxytype. • Typically set at front of webservers. • Thisproxycandistributeconnections to a differentaddress. • Fast and easy to configurein popular webservers(apache, lighttp)
LoadBalancinglayer 2-4-7 • Loadbalancing 2 and 4-7 can be usedatthe same time. • Loadbalancercandistributerequests to otherloadbalancer • Loadbalancingisusedincloudcomputing. • Loadbalancer and services can be runnedat one physical and logicalmachine, likecasual PC /but thereis no sense to do it/ • It`sbetter to set someloadbalancersinstead of buyingnewbetterfaster and moreexpensive hardware.
Bibliography http://wiki.hill.com/wiki/index.php?title=IEEE_802.3ad http://books.google.pl/books?id=SF_LzThJdB0C http://kb.linuxvirtualserver.org/wiki/Load_balancing
Finish. Any Questions? Thankyou for yourattention. Ďakujemza pozornosť. Dziękuję za uwagę.