220 likes | 403 Views
Load Balancing. Chase Holland Edward Norris CS387 3/18/2014. Load Balancing. Controlling information flow amongst a set of computational resources Information Homogeneous: All tasks are identical Heterogeneous: Tasks are different Clusters
E N D
Load Balancing Chase Holland Edward Norris CS387 3/18/2014
Load Balancing • Controlling information flow amongst a set of computational resources • Information • Homogeneous: All tasks are identical • Heterogeneous: Tasks are different • Clusters • Homogeneous: All resources are identical in architecture and performance • Heterogeneous: Not all resources are identical
Algorithms for homogeneous clusters • Round Robin • Random • Algorithms for heterogeneous clusters • Load Sensitive • Diffusion • LEACH • PP-GMCP
Round Robin – Identical tasks • Classical (Static) Round Robin • Weighted Round Robin
Round Robin II – Different Tasks • Dynamic Round Robin • Load sensitive • Static heuristics • Dynamic heuristics
LEACH • Low • Energy • Adaptive • Clustering • Heirarchy
PP-GMCP • Probabilistic Preferred Gray Markov Chain Prediction • Similar to Round Robin, but make predictions about incoming data trends Diffusion • When there is a single, central master that distributes tasks, what if there are many small tasks coming in from many different locations? • Master becomes I/O bound and a bottleneck
6 Things you need in your load balancer • Low CPU/memory overhead ( server_costnum_servers ) • Low latency • Flexible • Able to handle failures and redirect traffic • Smart • High throughput
Round Robin DNS • Available from many DNS providers such as AWS’ Route 53 • Very basic, round-robin scheduling
HAProxy • High Availability Proxy • Open source: GNU GPL v2 • Used by: • Stack Overflow • Reddit • Tumblr • Twitter • AWS’ OpsWorks
HAProxy • Written in C • Active development since 2000 • Proxies TCP and HTTP-based applications • Configurable algorithm via balance option • Round Robin • Static Round Robin • Least Connections • Source IP hash • URI/URL hash
Linux-HA • Heartbeat: Message passing layer • Pacemaker: Cluster manager • Glue • Local Resource Manager • STONITH (kills off dead nodes) • hb_report: advanced error reporting
Nginx • Upstream Module • Configurable algorithm: • Round Robin • Static Round Robin • Least Connections • Source IP hash • URI/URL hash
Amazon AWS’ ELB • Elastic Load Balancer • Very easy to configure • Uses a health-check URL • Automatically scales • SSL offloading, sticky sessions • Distributes across availability zones • Excellent web management tools
Amazon AWS’ ELB • Insanely expensive • Pricing • $0.025/hour per instance to run + instance fees • $0.008 per GB transferred (in or out)
Citrix Netscaler • Most likely what AWS’ ELB is based on • Also available as a virtual machine • Endorsed by Cisco®
KEMP Load Balancers • Offers a wide variety of hardware load balancers • Several big-brand clients