Linux Virtual Server Linux Server Clusters for Scalable
Linux Virtual Server: Linux Server Clusters for Scalable Network Services Wensong Zhang China National Laboratory for Parallel & Distributed Processing Free Software Symposium 2002 October 22, 2002 Copyright © 2002 Wensong Zhang. Page 1 Free Software Symposium 2002
Free Software Symposium 2002 Agenda l Introduction l The Linux Virtual Server framework l Building Scalable Network Services using LVS l Future Work of LVS l Characteristics of LVS Copyright © 2002 Wensong Zhang. Page 2
Free Software Symposium 2002 Introduction Internet l Explosive Growth of the Internet – 100% annual growth rate l Sites receiving unprecedented workload – Yahoo! 625 million views per day – AOL Web cache system receiving 5 billion requests per day Copyright © 2002 Wensong Zhang. Page 3
Introduction The requirements of Network Services l Incremental scalability l 24 x 7 availability l Manageability l Cost-effectiveness Copyright © 2002 Wensong Zhang. Page 4 Free Software Symposium 2002
Free Software Symposium 2002 Introduction Possible Solutions l Single server upgrade – complicated, high cost, single point of failure, . . . l Cluster of servers is becoming a viable architecture for SNS – Redundancy --> HA – Divide-and-Conquer --> High-performance – High performance/cost ratio Copyright © 2002 Wensong Zhang. Page 5
Free Software Symposium 2002 LVS Framework The Linux Virtual Server Project l The goal of the Linux Virtual Server project – to provide a basic framework for building highly scalable and highly available network services using a large cluster of commodity servers. Copyright © 2002 Wensong Zhang. Page 6
Free Software Symposium 2002 LVS Framework Copyright © 2002 Wensong Zhang. Page 7
Free Software Symposium 2002 LVS Framework IP Virtual Server l Implemented in the Linux kernel l Three IP load balancing techniques – Virtual Server via NAT – Virtual Server via IP Tunneling – Virtual Server via Direct Routing l Eight scheduling algorithms IPVS is an advanced Layer-4 switching Copyright © 2002 Wensong Zhang. Page 8
Free Software Symposium 2002 LVS Framework VS/NAT Copyright © 2002 Wensong Zhang. Page 9
Free Software Symposium 2002 LVS Framework VS/TUN Copyright © 2002 Wensong Zhang. Page 10
Free Software Symposium 2002 LVS Framework VS/DR Copyright © 2002 Wensong Zhang. Page 11
Free Software Symposium 2002 LVS Framework Comparison Note: those numbers are estimated based on the assumption that load balancer and backend servers have the same hardware configuration. Copyright © 2002 Wensong Zhang. Page 12
Free Software Symposium 2002 LVS Framework Scheduling Algorithms l Round-Robin l Weighted Round-Robin l Least-Connection l Weighted Least-Connection Copyright © 2002 Wensong Zhang. Page 13
LVS Framework Scheduling Algorithms (Continued) l Locality-Based Free Software Symposium 2002 Least-Connection l Locality-Based Least-Connection with Replication l Source Hashing l Destination Hashing Copyright © 2002 Wensong Zhang. Page 14
Free Software Symposium 2002 LVS Framework State Synchronization l Conn Sync daemon (kernel thread) l UDP Multicast Copyright © 2002 Wensong Zhang. Page 15
Free Software Symposium 2002 LVS Framework KTCPVS l Layer-7 switching in user-space – high overhead of context switching and memory copying – limited scalability Copyright © 2002 Wensong Zhang. Page 16
Free Software Symposium 2002 LVS Framework KTCPVS (Cont’d) l kernel thread l loadable scheduling module Copyright © 2002 Wensong Zhang. Page 17
LVS Framework Cluster Monitoring software l Red Hat Cluster Server / Piranha – LVS + Piranha l Ultra. Monkey – LVS + lvs-gui + heartbeat + ldirectord l Keepalived l Netparse l etc. Copyright © 2002 Wensong Zhang. Page 18 Free Software Symposium 2002
Free Software Symposium 2002 Building SNS using LVS General Architecture l 3 tiers – Load balancer – Server cluster – Shared storage Copyright © 2002 Wensong Zhang. Page 19
Free Software Symposium 2002 Building SNS using LVS Building Blocks l Load balancer – Layer-4 switching, Layer-7 switching l Server – HTTP, HTTPS, FTP, SMTP, POP 3, IMAP 4, most TCP and UDP services l Shared storage – database, network file system, distributed file system, . . . Copyright © 2002 Wensong Zhang. Page 20
Free Software Symposium 2002 Building SNS using LVS High Availability l Server failover – ping, service detection, etc l Load balancer failover – state synchronization – heartbeat Copyright © 2002 Wensong Zhang. Page 21
Free Software Symposium 2002 Building SNS using LVS Web Cluster Copyright © 2002 Wensong Zhang. Page 22
Free Software Symposium 2002 Building SNS using LVS Cache Cluster Copyright © 2002 Wensong Zhang. Page 23
Free Software Symposium 2002 Building SNS using LVS Mail Cluster Copyright © 2002 Wensong Zhang. Page 24
Free Software Symposium 2002 Building SNS using LVS Some Sites using LVS l UK National JANET Web Cache (wwwcache. ja. net) l linux. com l sourceforge. net l valinux. com l real. com l One of largest PC manufacturers l etc. Copyright © 2002 Wensong Zhang. Page 25
Free Software Symposium 2002 Future Works of LVS Future Works l Adding more load balancing algorithms l Developing more advanced/flexible cluster monitoring software l Making KTCPVS ready for production l Exploring TCP handoff l etc. Copyright © 2002 Wensong Zhang. Page 26
Free Software Symposium 2002 Characteristics of LVS Characteristics l LVS extends Linux kernel to support three IP load balancing techniques l Eight scheduling algorithms l High scalability (up to 100 nodes) l High availability l Supporting most TCP and UDP services, no modifications to either clients or servers Copyright © 2002 Wensong Zhang. Page 27
Characteristics of LVS Compared to Other Commercial Products l More Free Software Symposium 2002 IP load balancing techniques l Multiple scheduling algorithms l State synchronization l A robust and stable code base, a large user and developer base. l Reliability proven in big real world applications l Free to everyone Copyright © 2002 Wensong Zhang. Page 28
Free Software Symposium 2002 Summary l Introduction l The Linux Virtual Server framework l Building Scalable Network Services using LVS l Future Work of LVS l Characteristics of LVS Copyright © 2002 Wensong Zhang. Page 29
Call to Action l Building Free Software Symposium 2002 scalable network services is complicated and expensive l LVS is here to help make your life easier l LVS is proven stable, and is being deployed by more and more sites. Copyright © 2002 Wensong Zhang. Page 30
Free Software Symposium 2002 Collateral l The Linux Virtual Server Project (http: //www. Linux. Virtual. Server. org) l wensong@linux-vs. org Copyright © 2002 Wensong Zhang. Page 31
- Slides: 31