Post on 16-Dec-2015
transcript
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 II – DIFFERENT TASKS• Dynamic Round Robin
• Load sensitive
• Static heuristics
• Dynamic heuristics
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_cost num_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
• Tumblr
• 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®