SlideShare a Scribd company logo
1 of 29
Clustering and Load
Balancing
Outline
• Introduction
• Linux Virtual Server
• Microsoft load balancing solution
Introduction
• Explosive Growth of the Internet
• 100% annual growth rate
• Sites receiving unprecedented workload
• Yahoo! 625 million views per day
• AOL Web cache system receiving 5 billion requests per day
Introduction
• load balancing is a technique to spread work between many
computers, processes, disks or other resources in order to get
optimal resource utilization and decrease computing time.
• A load balancer can be used to increase the capacity of a
server farm beyond that of a single server.
• It can also allow the service to continue even in the face of server
down time due to server failure or server maintenance.
• A load balancer consists of a virtual server (also referred to as
vserver or VIP) which, in turn, consists of an IP address and port.
• virtual server is bound to a number of physical services running on
the physical servers in a server farm.
• A client sends a request to the virtual server, which in turn selects a
physical server in the server farm and directs this request to the
selected physical server.
Introduction (cont.)
• Different virtual servers can be configured for different sets of
physical services, such as TCP and UDP services in general.
• Application specific virtual server may exist to support HTTP, FTP, SSL,
DNS, etc.
• The load balancing methods manage the selection of an appropriate
physical server in a server farm.
• Persistence can be configured on a virtual server; once a server is
selected, subsequent requests from the client are directed to the
same server.
• Persistence is sometimes necessary in applications where client state
is maintained on the server, but the use of persistence can cause
problems in failure and other situations.
• A more common method of managing persistence is to store state
information in a shared database, which can be accessed by all real
servers, and to link this information to a client with a small token such
as a cookie, which is sent in every client request.
Introduction (cont.)
• Load balancers also perform server monitoring of services
in a web server farm.
• case of failure of a service, the load balancer continues to
perform load balancing across the remaining services that
are UP.
• In case of failure of all the servers bound to a virtual
server, requests may be sent to a backup virtual server (if
configured) or optionally redirected to a configured URL.
• In Global Server Load Balancing (GSLB) the load balancer
distributes load to a geographically distributed set of
server farms based on health, server load or proximity.
Introduction (cont.)
• Load balancing methods:
• Least connections
• Round robin
• Least response time
• Least bandwidth
• Least packets
• URL hashing
• Domain name hashing
• Source IP address
• Destination IP address
• Source IP - destination
• Static proximity, used for GSLB
Web Server Load Balancing
• One major issue for large Internet sites is how to handle the load of
the large number of visitors they get.
• This is routinely encountered as a scalability problem as a site
grows.
• There are several ways to accomplish load balancing
• For example in WikiMedia load is balanced as:
• Round robin DNS distributed page requests evenly to one of three Squid
Cache servers
• Squid cache servers used response time measurements to distribute
page requests between seven web servers.
• In addition, the Squid servers cached pages and delivered about 75% of
all pages without ever asking a web server for help.
• The PHP scripts which run the web servers distribute load to one of
several database servers depending on the type of request, with updates
going to a master database server and some database queries going to
one or more slave database servers.
Server Load Balancing and
redundancy
• Alternative methods include use of Layer 4
Router
• Linux virtual server, which is an advanced open
source load balancing solution for network
services.
• Network Load Balancing Services, which is an
advanced open source load balancing solution
for network services.
• Many sites are turning to the multi-homed
scenario; having multiple connections to the
Internet via multiple providers to provide a
reliable and high throughput service.
Linux Virtual Server
• Started in 1998, the Linux Virtual Server (LVS) project
combines multiple physical servers into one virtual server,
eliminating single points of failure (SPOF).
• Built with off-the-shelf components, LVS is already in use
in some of the highest-trafficked sites on the Web.
• Requirements for LVS:
• The service must scale: when the service workload increases, the
system must scale up to meet the requirements.
• The service must always be on and available, despite transient
partial hardware and software failures.
• The system must be cost-effective: the whole system must be
economical to build and expand.
• Although the whole system may be big in physical size, it should be
easy to manage.
LVS
• In LVS, a cluster of Linux servers appear as a single
(virtual) server on a single IP address.
• Client applications interact with the cluster as if it were a
single, high-performance, and highly-available server.
• Inside the virtual server, LVS directs incoming network
connections to the different servers according to
scheduling algorithms.
• Scalability is achieved by transparently adding or
removing nodes in the cluster.
• High availability is provided by detecting node or daemon
failures and reconfiguring the system accordingly, on-the-
fly.
• For transparency, scalability, availability and
manageability, LVS is designed around a three-tier
architecture, as illustrated in next figure
LVS architecture
• The load balancer,
servers, and shared
storage are usually
connected by a high-
speed network, such
as 100 Mbps
Ethernet or Gigabit
Ethernet, so that the
intranetwork does
not become a
bottleneck of the
system as the cluster
grows.
Three ways to balance load
• IPVS supports following three ways to balance loads:
• Virtual Server via NAT (VS/NAT)
• Virtual Server via Tunneling (VS/TUN)
• Virtual Server via Direct Routing (VS/DR)
Virtual Server via NAT (VS/NAT)
VS/NAT Workflow
1. When a user accesses a virtual service provided by the server
cluster, a request packet destined for the virtual IP address (the IP
address to accept requests for virtual service) arrives at the load
balancer.
2. The load balancer examines the packet's destination address and
port number. If they match a virtual service in the virtual server
rule table, a real server is selected from the cluster by a scheduling
algorithm and the connection is added to hash table that records
connections. Then, the destination address and the port of the
packet are rewritten to those of the selected server, and the
packet is forwarded to the server. When an incoming packet
belongs to an established connection, the connection can be found
in the hash table and the packet is rewritten and forwarded to the
right server.
3. The request is processed by one of the physical servers.
4. When response packets come back, the load balancer rewrites the
source address and port of the packets to those of the virtual
service. When a connection terminates or timeouts, the
connection record is removed from the hash table.
5. A reply is sent back to the user.
An example of Virtual Server via Nat
Packet rewriting flow
• The incoming packet for web service:
• The load balancer will choose a real server and
rewritten forwards the packet to it:
• Replies get back to the load balancer:
• The packet is rewritten and forwarded back to
the client
VS-NAT advantages and
disadvantages
• Advantages:
• Real servers can run any OS that supports TCP/IP
• Only an IP address is needed for the load balancer,
real servers can use private IP address
• Disadvantages
• The maximum number of server nodes is limited,
because both request and response packers are
rewritten by the load balancer. When the number of
server nodes increase up to 20, the load balancer will
probably become a new bottleneck
Virtual Server via IP Tunneling
(VS/TUN)
• IP tunneling (also called IP encapsulation) is a
technique to encapsulate IP datagrams within IP
datagrams, which allows datagrams destined for
one IP address to be wrapped and redirected to
another IP address.
• This technique can also be used to build a virtual
server: the load balancer tunnels the request
packets to the different servers, the servers
process the requests, and return the results to
the clients directly. Thus, the service appears as
a virtual service on a single IP address.
VS/TUN architecture
VS-TUN workflow
VS-TUN advantages and
disadvantages
• Advantages:
• Real servers send response packets to client directly,
which can follow different network routes
• Real servers can be in different networks, LAN/WAN
• Greatly increasing the scalability of Virtual Server
• Disadvantages:
• Real server must support IP tunneling protocol
Virtual Server via Direct Routing
(VS/DR)
• The load balancer and the real servers must have one of their
interfaces physically linked by an uninterrupted segment of LAN
such as an Ethernet switch.
• The virtual IP address is shared by real servers and the load
balancer.
• Each real server has a non-ARPing, loopback alias interface
configured with the virtual IP address, and the load balancer has an
interface configured with the virtual IP address to accept incoming
packets.
• The workflow of VS/DR is similar to that of VS/NAT or VS/TUN. In
VS/DR, the load balancer directly routes a packet to the selected
server (the load balancer simply changes the MAC address of the
data frame to that of the server and retransmits it on the LAN).
• When the server receives the forwarded packet, the server
determines that the packet is for the address on its loopback alias
interface, processes the request, and finally returns the result
directly to the user.
VS/DR architecture
VS-DR workflow
VS-DR advantages and
disadvantages
• Advantages:
• Real servers send response packets to clients directly, which can
follow different network routes
• No tunneling overhead
• Disadvantages:
• Servers must have non-arp alias interface
• The load balancer and server must have one of their interfaces in
the same LAN segment
Comparison
VS/NAT VS/TUN VS/DR
Server any Tunneling Non-arp device
server network private LAN/WAN LAN
server number low (10~20) High (100) High (100)
server gateway load balancer own router Own router
Note: those numbers are estimated based on the
assumption that load balancer and backend servers
have the same hardware configuration.
Scheduling algorithms
• Round-Robin
• Weighted Round-Robin
• Least-Connection
• Weighted Least-Connection
References
• Wikipedia
• http://www.linux-vs.org

More Related Content

What's hot

Dynamic Load balancing Linux private Cloud (DRS)
Dynamic Load balancing Linux private Cloud (DRS)Dynamic Load balancing Linux private Cloud (DRS)
Dynamic Load balancing Linux private Cloud (DRS)kamrankausar
 
Load Balancer Device and Configurations.
Load Balancer Device and Configurations.Load Balancer Device and Configurations.
Load Balancer Device and Configurations.Web Werks Data Centers
 
Load Balancing And Yahoo!
Load Balancing And Yahoo!Load Balancing And Yahoo!
Load Balancing And Yahoo!TwinVasion
 
Zebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busZebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busKévin LOVATO
 
Database and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on AzureDatabase and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on AzureRadu Vunvulea
 
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...BIOVIA
 
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009CloudAngels
 
Optimizing Proxy Server Performance
Optimizing Proxy Server PerformanceOptimizing Proxy Server Performance
Optimizing Proxy Server PerformanceGeorge Coutsoumbidis
 
3.2 Streaming and Messaging
3.2 Streaming and Messaging3.2 Streaming and Messaging
3.2 Streaming and Messaging振东 刘
 
Build your own Service Bus V2
Build your own Service Bus V2Build your own Service Bus V2
Build your own Service Bus V2Kévin LOVATO
 
10135 a 07
10135 a 0710135 a 07
10135 a 07Bố Su
 
Handbuch-zum-Load-Balancing-des-Barracuda-Webfilters
Handbuch-zum-Load-Balancing-des-Barracuda-WebfiltersHandbuch-zum-Load-Balancing-des-Barracuda-Webfilters
Handbuch-zum-Load-Balancing-des-Barracuda-WebfiltersLoadbalancer_org_Gmbh
 
Mule Script Transformer
Mule Script TransformerMule Script Transformer
Mule Script TransformerAnkush Sharma
 

What's hot (20)

Optimizing proxy
Optimizing proxyOptimizing proxy
Optimizing proxy
 
Optimiszing proxy
Optimiszing proxyOptimiszing proxy
Optimiszing proxy
 
Optimiszing proxy
Optimiszing proxyOptimiszing proxy
Optimiszing proxy
 
Dynamic Load balancing Linux private Cloud (DRS)
Dynamic Load balancing Linux private Cloud (DRS)Dynamic Load balancing Linux private Cloud (DRS)
Dynamic Load balancing Linux private Cloud (DRS)
 
Load Balancer Device and Configurations.
Load Balancer Device and Configurations.Load Balancer Device and Configurations.
Load Balancer Device and Configurations.
 
Load balancer
Load balancerLoad balancer
Load balancer
 
Load Balancing And Yahoo!
Load Balancing And Yahoo!Load Balancing And Yahoo!
Load Balancing And Yahoo!
 
Flume
FlumeFlume
Flume
 
Inside Flume
Inside FlumeInside Flume
Inside Flume
 
Zebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service busZebus - Pitfalls of a P2P service bus
Zebus - Pitfalls of a P2P service bus
 
Database and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on AzureDatabase and Public Endpoints redundancy on Azure
Database and Public Endpoints redundancy on Azure
 
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
 
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009
Nick Bond - Zeus - Load Balancing in the Cloud - CloudCamp Berlin 30.04.2009
 
Optimizing Proxy Server Performance
Optimizing Proxy Server PerformanceOptimizing Proxy Server Performance
Optimizing Proxy Server Performance
 
Webapplication Load Balancing
Webapplication Load BalancingWebapplication Load Balancing
Webapplication Load Balancing
 
3.2 Streaming and Messaging
3.2 Streaming and Messaging3.2 Streaming and Messaging
3.2 Streaming and Messaging
 
Build your own Service Bus V2
Build your own Service Bus V2Build your own Service Bus V2
Build your own Service Bus V2
 
10135 a 07
10135 a 0710135 a 07
10135 a 07
 
Handbuch-zum-Load-Balancing-des-Barracuda-Webfilters
Handbuch-zum-Load-Balancing-des-Barracuda-WebfiltersHandbuch-zum-Load-Balancing-des-Barracuda-Webfilters
Handbuch-zum-Load-Balancing-des-Barracuda-Webfilters
 
Mule Script Transformer
Mule Script TransformerMule Script Transformer
Mule Script Transformer
 

Viewers also liked (20)

Mule esb
Mule esbMule esb
Mule esb
 
Oracle real application_cluster
Oracle real application_clusterOracle real application_cluster
Oracle real application_cluster
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
Buissness model analysis
Buissness model analysisBuissness model analysis
Buissness model analysis
 
Soap
SoapSoap
Soap
 
Mule anypoint platform
Mule anypoint platformMule anypoint platform
Mule anypoint platform
 
Bpm
BpmBpm
Bpm
 
Soap service
Soap serviceSoap service
Soap service
 
Seo
SeoSeo
Seo
 
Presentation of Tax
Presentation of Tax Presentation of Tax
Presentation of Tax
 
Rest
RestRest
Rest
 
EXtensible Markup Language
EXtensible Markup LanguageEXtensible Markup Language
EXtensible Markup Language
 
Mule esb
Mule esbMule esb
Mule esb
 
Multiplatform
MultiplatformMultiplatform
Multiplatform
 
Restful api modeling language
Restful api modeling languageRestful api modeling language
Restful api modeling language
 
Jsp
JspJsp
Jsp
 
Api desgin
Api desginApi desgin
Api desgin
 
Health triangle
Health triangleHealth triangle
Health triangle
 
Leadership today
Leadership todayLeadership today
Leadership today
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 

Similar to clustering and load balancing

Load Balance with NSX-T.pptx
Load Balance with NSX-T.pptxLoad Balance with NSX-T.pptx
Load Balance with NSX-T.pptxDhruv Sharma
 
Network Load Balancing.pptx
Network Load Balancing.pptxNetwork Load Balancing.pptx
Network Load Balancing.pptxVydhehSumod
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesAdam Takvam
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud Len Bass
 
What's New in NGINX Plus R7?
What's New in NGINX Plus R7?What's New in NGINX Plus R7?
What's New in NGINX Plus R7?NGINX, Inc.
 
Load Balancing in Cloud Computing.pptx
Load Balancing in Cloud Computing.pptxLoad Balancing in Cloud Computing.pptx
Load Balancing in Cloud Computing.pptxPradipPoudel4
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availabilityLen Bass
 
LOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMSLOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMStanmayshah95
 
Advanatages csc
Advanatages cscAdvanatages csc
Advanatages cscMDSHAMIM54
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptxDrIrfanulHaqAkhoon
 
IRJET- An Improved Weighted Least Connection Scheduling Algorithm for Loa...
IRJET-  	  An Improved Weighted Least Connection Scheduling Algorithm for Loa...IRJET-  	  An Improved Weighted Least Connection Scheduling Algorithm for Loa...
IRJET- An Improved Weighted Least Connection Scheduling Algorithm for Loa...IRJET Journal
 
Performance and Scalability Tuning
Performance and Scalability TuningPerformance and Scalability Tuning
Performance and Scalability TuningAndres March
 
Scott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practicesScott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practicesNordic Infrastructure Conference
 

Similar to clustering and load balancing (20)

ACE - Comcore
ACE - ComcoreACE - Comcore
ACE - Comcore
 
Load Balance with NSX-T.pptx
Load Balance with NSX-T.pptxLoad Balance with NSX-T.pptx
Load Balance with NSX-T.pptx
 
Network Load Balancing.pptx
Network Load Balancing.pptxNetwork Load Balancing.pptx
Network Load Balancing.pptx
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web Services
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud
 
My Dissertation 2016
My Dissertation 2016My Dissertation 2016
My Dissertation 2016
 
Technical Architectures
Technical ArchitecturesTechnical Architectures
Technical Architectures
 
Unit v
Unit v Unit v
Unit v
 
FAILOVER
FAILOVERFAILOVER
FAILOVER
 
What's New in NGINX Plus R7?
What's New in NGINX Plus R7?What's New in NGINX Plus R7?
What's New in NGINX Plus R7?
 
Load Balancing in Cloud Computing.pptx
Load Balancing in Cloud Computing.pptxLoad Balancing in Cloud Computing.pptx
Load Balancing in Cloud Computing.pptx
 
AWS_ELB_ppt.pptx
AWS_ELB_ppt.pptxAWS_ELB_ppt.pptx
AWS_ELB_ppt.pptx
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availability
 
LOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMSLOAD BALANCING ALGORITHMS
LOAD BALANCING ALGORITHMS
 
Advanatages csc
Advanatages cscAdvanatages csc
Advanatages csc
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptx
 
IRJET- An Improved Weighted Least Connection Scheduling Algorithm for Loa...
IRJET-  	  An Improved Weighted Least Connection Scheduling Algorithm for Loa...IRJET-  	  An Improved Weighted Least Connection Scheduling Algorithm for Loa...
IRJET- An Improved Weighted Least Connection Scheduling Algorithm for Loa...
 
Performance and Scalability Tuning
Performance and Scalability TuningPerformance and Scalability Tuning
Performance and Scalability Tuning
 
AWS ELB
AWS ELBAWS ELB
AWS ELB
 
Scott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practicesScott Schnoll - Exchange server 2013 virtualization best practices
Scott Schnoll - Exchange server 2013 virtualization best practices
 

More from Prabhat gangwar

More from Prabhat gangwar (20)

Middleware
MiddlewareMiddleware
Middleware
 
Pseudolocalization
PseudolocalizationPseudolocalization
Pseudolocalization
 
Mule anypoint studio
Mule anypoint studioMule anypoint studio
Mule anypoint studio
 
What is cluster analysis
What is cluster analysisWhat is cluster analysis
What is cluster analysis
 
Middleware systems overview and introduction
Middleware systems overview and introductionMiddleware systems overview and introduction
Middleware systems overview and introduction
 
Gsm architecture
Gsm architectureGsm architecture
Gsm architecture
 
Oracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-featuresOracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-features
 
Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business components
 
File transfer methods
File transfer methodsFile transfer methods
File transfer methods
 
Ftp tftp
Ftp tftpFtp tftp
Ftp tftp
 
Global warming
Global warmingGlobal warming
Global warming
 
Vedic mathmetics
Vedic mathmeticsVedic mathmetics
Vedic mathmetics
 
Trends
TrendsTrends
Trends
 
E commerce buissness-model
E commerce buissness-modelE commerce buissness-model
E commerce buissness-model
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills
 
Office politics
Office politicsOffice politics
Office politics
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Add to the path on mac os x
Add to the path on mac os xAdd to the path on mac os x
Add to the path on mac os x
 
Cross platform mobile application devlopment
Cross platform mobile application devlopmentCross platform mobile application devlopment
Cross platform mobile application devlopment
 
Database security
Database securityDatabase security
Database security
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 

clustering and load balancing

  • 2. Outline • Introduction • Linux Virtual Server • Microsoft load balancing solution
  • 3. Introduction • Explosive Growth of the Internet • 100% annual growth rate • Sites receiving unprecedented workload • Yahoo! 625 million views per day • AOL Web cache system receiving 5 billion requests per day
  • 4. Introduction • load balancing is a technique to spread work between many computers, processes, disks or other resources in order to get optimal resource utilization and decrease computing time. • A load balancer can be used to increase the capacity of a server farm beyond that of a single server. • It can also allow the service to continue even in the face of server down time due to server failure or server maintenance. • A load balancer consists of a virtual server (also referred to as vserver or VIP) which, in turn, consists of an IP address and port. • virtual server is bound to a number of physical services running on the physical servers in a server farm. • A client sends a request to the virtual server, which in turn selects a physical server in the server farm and directs this request to the selected physical server.
  • 5. Introduction (cont.) • Different virtual servers can be configured for different sets of physical services, such as TCP and UDP services in general. • Application specific virtual server may exist to support HTTP, FTP, SSL, DNS, etc. • The load balancing methods manage the selection of an appropriate physical server in a server farm. • Persistence can be configured on a virtual server; once a server is selected, subsequent requests from the client are directed to the same server. • Persistence is sometimes necessary in applications where client state is maintained on the server, but the use of persistence can cause problems in failure and other situations. • A more common method of managing persistence is to store state information in a shared database, which can be accessed by all real servers, and to link this information to a client with a small token such as a cookie, which is sent in every client request.
  • 6. Introduction (cont.) • Load balancers also perform server monitoring of services in a web server farm. • case of failure of a service, the load balancer continues to perform load balancing across the remaining services that are UP. • In case of failure of all the servers bound to a virtual server, requests may be sent to a backup virtual server (if configured) or optionally redirected to a configured URL. • In Global Server Load Balancing (GSLB) the load balancer distributes load to a geographically distributed set of server farms based on health, server load or proximity.
  • 7. Introduction (cont.) • Load balancing methods: • Least connections • Round robin • Least response time • Least bandwidth • Least packets • URL hashing • Domain name hashing • Source IP address • Destination IP address • Source IP - destination • Static proximity, used for GSLB
  • 8. Web Server Load Balancing • One major issue for large Internet sites is how to handle the load of the large number of visitors they get. • This is routinely encountered as a scalability problem as a site grows. • There are several ways to accomplish load balancing • For example in WikiMedia load is balanced as: • Round robin DNS distributed page requests evenly to one of three Squid Cache servers • Squid cache servers used response time measurements to distribute page requests between seven web servers. • In addition, the Squid servers cached pages and delivered about 75% of all pages without ever asking a web server for help. • The PHP scripts which run the web servers distribute load to one of several database servers depending on the type of request, with updates going to a master database server and some database queries going to one or more slave database servers.
  • 9. Server Load Balancing and redundancy • Alternative methods include use of Layer 4 Router • Linux virtual server, which is an advanced open source load balancing solution for network services. • Network Load Balancing Services, which is an advanced open source load balancing solution for network services. • Many sites are turning to the multi-homed scenario; having multiple connections to the Internet via multiple providers to provide a reliable and high throughput service.
  • 10. Linux Virtual Server • Started in 1998, the Linux Virtual Server (LVS) project combines multiple physical servers into one virtual server, eliminating single points of failure (SPOF). • Built with off-the-shelf components, LVS is already in use in some of the highest-trafficked sites on the Web. • Requirements for LVS: • The service must scale: when the service workload increases, the system must scale up to meet the requirements. • The service must always be on and available, despite transient partial hardware and software failures. • The system must be cost-effective: the whole system must be economical to build and expand. • Although the whole system may be big in physical size, it should be easy to manage.
  • 11. LVS • In LVS, a cluster of Linux servers appear as a single (virtual) server on a single IP address. • Client applications interact with the cluster as if it were a single, high-performance, and highly-available server. • Inside the virtual server, LVS directs incoming network connections to the different servers according to scheduling algorithms. • Scalability is achieved by transparently adding or removing nodes in the cluster. • High availability is provided by detecting node or daemon failures and reconfiguring the system accordingly, on-the- fly. • For transparency, scalability, availability and manageability, LVS is designed around a three-tier architecture, as illustrated in next figure
  • 12. LVS architecture • The load balancer, servers, and shared storage are usually connected by a high- speed network, such as 100 Mbps Ethernet or Gigabit Ethernet, so that the intranetwork does not become a bottleneck of the system as the cluster grows.
  • 13. Three ways to balance load • IPVS supports following three ways to balance loads: • Virtual Server via NAT (VS/NAT) • Virtual Server via Tunneling (VS/TUN) • Virtual Server via Direct Routing (VS/DR)
  • 14. Virtual Server via NAT (VS/NAT)
  • 15. VS/NAT Workflow 1. When a user accesses a virtual service provided by the server cluster, a request packet destined for the virtual IP address (the IP address to accept requests for virtual service) arrives at the load balancer. 2. The load balancer examines the packet's destination address and port number. If they match a virtual service in the virtual server rule table, a real server is selected from the cluster by a scheduling algorithm and the connection is added to hash table that records connections. Then, the destination address and the port of the packet are rewritten to those of the selected server, and the packet is forwarded to the server. When an incoming packet belongs to an established connection, the connection can be found in the hash table and the packet is rewritten and forwarded to the right server. 3. The request is processed by one of the physical servers. 4. When response packets come back, the load balancer rewrites the source address and port of the packets to those of the virtual service. When a connection terminates or timeouts, the connection record is removed from the hash table. 5. A reply is sent back to the user.
  • 16. An example of Virtual Server via Nat
  • 17. Packet rewriting flow • The incoming packet for web service: • The load balancer will choose a real server and rewritten forwards the packet to it: • Replies get back to the load balancer: • The packet is rewritten and forwarded back to the client
  • 18. VS-NAT advantages and disadvantages • Advantages: • Real servers can run any OS that supports TCP/IP • Only an IP address is needed for the load balancer, real servers can use private IP address • Disadvantages • The maximum number of server nodes is limited, because both request and response packers are rewritten by the load balancer. When the number of server nodes increase up to 20, the load balancer will probably become a new bottleneck
  • 19. Virtual Server via IP Tunneling (VS/TUN) • IP tunneling (also called IP encapsulation) is a technique to encapsulate IP datagrams within IP datagrams, which allows datagrams destined for one IP address to be wrapped and redirected to another IP address. • This technique can also be used to build a virtual server: the load balancer tunnels the request packets to the different servers, the servers process the requests, and return the results to the clients directly. Thus, the service appears as a virtual service on a single IP address.
  • 22. VS-TUN advantages and disadvantages • Advantages: • Real servers send response packets to client directly, which can follow different network routes • Real servers can be in different networks, LAN/WAN • Greatly increasing the scalability of Virtual Server • Disadvantages: • Real server must support IP tunneling protocol
  • 23. Virtual Server via Direct Routing (VS/DR) • The load balancer and the real servers must have one of their interfaces physically linked by an uninterrupted segment of LAN such as an Ethernet switch. • The virtual IP address is shared by real servers and the load balancer. • Each real server has a non-ARPing, loopback alias interface configured with the virtual IP address, and the load balancer has an interface configured with the virtual IP address to accept incoming packets. • The workflow of VS/DR is similar to that of VS/NAT or VS/TUN. In VS/DR, the load balancer directly routes a packet to the selected server (the load balancer simply changes the MAC address of the data frame to that of the server and retransmits it on the LAN). • When the server receives the forwarded packet, the server determines that the packet is for the address on its loopback alias interface, processes the request, and finally returns the result directly to the user.
  • 26. VS-DR advantages and disadvantages • Advantages: • Real servers send response packets to clients directly, which can follow different network routes • No tunneling overhead • Disadvantages: • Servers must have non-arp alias interface • The load balancer and server must have one of their interfaces in the same LAN segment
  • 27. Comparison VS/NAT VS/TUN VS/DR Server any Tunneling Non-arp device server network private LAN/WAN LAN server number low (10~20) High (100) High (100) server gateway load balancer own router Own router Note: those numbers are estimated based on the assumption that load balancer and backend servers have the same hardware configuration.
  • 28. Scheduling algorithms • Round-Robin • Weighted Round-Robin • Least-Connection • Weighted Least-Connection