SlideShare a Scribd company logo
1 of 22
Download to read offline
HA of Load Balancer
 for Small Company
          charsyam@naver.com
Agenda
• Why?
   –DNS RoundRobin
• Dedicated Server in IDC
   –Hardware L4
   –Using VIP
• AWS
   –Using EIP
Why?
• Let’s see in beginner’s point of view.
   – How to distribute clients’ requests.
                         Using DNS RR
       CLIENT
       CLIENT             Web Server
                                            DB
       CLIENT             Web Server
       CLIENT
Why?
• Let’s see in beginner’s point of view.
   – How to distribute clients’ requests.
   – But If one web server dies, half requests will fail.
   – And DNS RR needs lots of propagation time.
                          Using DNS RR
       CLIENT
       CLIENT              Web Server
                                                       DB
       CLIENT              Web Server
       CLIENT
Load Balancer!
• LB distributes clients’ requests.

                    Using Load Balancer
       CLIENT
       CLIENT                    Web
                        LB                DB
       CLIENT                    Web
       CLIENT
Load Balancer!
• LB distributes clients’ requests.
   – If one web server dies, LB will get rid of failed server.

                    Using Load Balancer
     CLIENT
     CLIENT                        Web
                         LB                          DB
     CLIENT                        Web
     CLIENT
Load Balancer FAIL
• If LB dies, It is critical disaster.
   – So we need HA of Load Balancer.
                     Using Load Balancer
        CLIENT
        CLIENT                     Web
                          LB               DB
        CLIENT                     Web
        CLIENT
How?
• How to HA of LB
   – It depends on your situation.
• Question?
   – Where do you host your service?
      • IDC, aws
• Let’s go to build.
Dedicated Server in IDC
• Using Hardware L4
   – Could your hosting service support Hardware L4
   – Pros
      • The easiest way to manage
   – Cons
      • Expensive solution.
• Using VIP
   – With HAProxy or Nginx
Hardware L4 #1
• You can choose 2 types of solution.
• Using L4 as LB
                 Using Hardware L4 #1
   CLIENT
   CLIENT                     Web
                      L4                DB
   CLIENT                     Web
   CLIENT
Hardware L4 #2
• Using L4 with LB
  – Hardware L4 can fail, but rarely

                 Using Hardware L4 #2
   CLIENT
   CLIENT                   LB         Web
                L4                           DB
   CLIENT                   LB         Web
   CLIENT
Using VIP
• Virtual IP Address
                                      CLIENT
                                             1.1.1.4
                                      Route
                                         1.1.1.2
                       1.1.1.2                          1.1.1.3
                        1.1.1.4
                       1.1.1.4 is VIP which is allocated 1.1.1.2
Using VIP
• We can give VIP to other Server.
                                   CLIENT
                                          1.1.1.4
                                   Route

                   1.1.1.2                           1.1.1.3
                                                      1.1.1.4
                    1.1.1.4 is VIP which is allocated 1.1.1.2
Software LB with Keepalived
• Virtual IP Address( HAProxy, Nginx doesn’t matter )


      192.168.1.2                  Web Web
       LB1 LB2                     192.168.1.10   192.168.1.11

      192.168.1.3
     Haproxy
                     192.168.1.4
                    Haproxy
                                   Web DB
     keepalived     keepalived     192.168.1.12   192.168.1.100
Software LB with Keepalived
• But you have to check failover time.


                         192.168.1.2   Web Web
       LB1 LB2                         192.168.1.10   192.168.1.11

      192.168.1.3
     Haproxy
                         192.168.1.4
                        Haproxy
                                       Web DB
     keepalived         keepalived     192.168.1.12   192.168.1.100
     Keepalived checks each other.
     And LB2 Keepalived reassign VIP
     to oneself.
Software LB with Keepalived
• Link
  – HAProxy with keepalived
     • http://haproxy.1wt.eu/download/1.3/doc/architecture.txt
     • http://andyleonard.com/2011/02/01/haproxy-and-keepalived-example-
       configuration/
     • http://aaronwalrath.wordpress.com/2011/06/28/configure-haproxy-and-
       keepalived-for-load-balancing-and-reverse-proxy-on-red-
       hatscientificcentos-linux-56/
  – Nginx with keepalived
     • http://www.cyberciti.biz/faq/handling-nginx-failover-with-keepalived/
     • http://evolution.voxeo.com/wiki/kb:swloadbalancingfailover
AWS
• What are different from IDC
   – You can’t use Hardware L4
   – You can’t use multicast
   – You can’t use VIP
• How?
   – ELB( Elastic Load Balancer )
   – EIP( Elastic IP )
ELB
• Auto Scaling is possible.
• ELB doesn’t support Fixed IP.

         CLIENT
         CLIENT                   EC2 Instance
                     ELB
         CLIENT                   EC2 Instance
         CLIENT
EIP
• Elastic IP Address
• We can associate and release EIP like VIP
Weakness of ELB,EIP
• Whenever we use it, we have to pay.
   – It is external IP.
• And it is impossible to apply ELB,EIP in AWS internal
  networks.
How to Handle in AWS?
• There is no Silver Bullet.
• DNS based Solution
   – Using Dynamic DNS Server for internal Network.
   – Using short TTL.
Thank you!

More Related Content

What's hot

Distributed automation sel_conf_2015
Distributed automation sel_conf_2015Distributed automation sel_conf_2015
Distributed automation sel_conf_2015aragavan
 
[En] IPVS for Docker Containers
[En] IPVS for Docker Containers[En] IPVS for Docker Containers
[En] IPVS for Docker ContainersAndrey Sibirev
 
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...Amazon Web Services
 
OSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitOSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitDon Marti
 
Distributed automation selcamp2016
Distributed automation selcamp2016Distributed automation selcamp2016
Distributed automation selcamp2016aragavan
 
Autoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know HowAutoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know Howaragavan
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Amazon Web Services
 
Getting Started with Docker on AWS - DevDay Austin 2017
Getting Started with Docker on AWS - DevDay Austin 2017Getting Started with Docker on AWS - DevDay Austin 2017
Getting Started with Docker on AWS - DevDay Austin 2017Amazon Web Services
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1Steven Shim
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapRuslan Meshenberg
 
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021StreamNative
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityJean-Paul Azar
 
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...Quinton Hoole
 
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUANatan Silnitsky
 
Apache Bookkeeper and Apache Zookeeper for Apache Pulsar
Apache Bookkeeper and Apache Zookeeper for Apache PulsarApache Bookkeeper and Apache Zookeeper for Apache Pulsar
Apache Bookkeeper and Apache Zookeeper for Apache PulsarEnrico Olivelli
 
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...Amazon Web Services Korea
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco OverdijkIntegrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco OverdijkMaxServ
 
Wido den hollander cloud stack and ceph
Wido den hollander   cloud stack and cephWido den hollander   cloud stack and ceph
Wido den hollander cloud stack and cephShapeBlue
 

What's hot (20)

Distributed automation sel_conf_2015
Distributed automation sel_conf_2015Distributed automation sel_conf_2015
Distributed automation sel_conf_2015
 
[En] IPVS for Docker Containers
[En] IPVS for Docker Containers[En] IPVS for Docker Containers
[En] IPVS for Docker Containers
 
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
 
OSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitOSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration Summit
 
Distributed automation selcamp2016
Distributed automation selcamp2016Distributed automation selcamp2016
Distributed automation selcamp2016
 
Autoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know HowAutoscaled Distributed Automation Expedia Know How
Autoscaled Distributed Automation Expedia Know How
 
Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017Building and Scaling a Containerized Microservice - DevDay Austin 2017
Building and Scaling a Containerized Microservice - DevDay Austin 2017
 
Getting Started with Docker on AWS - DevDay Austin 2017
Getting Started with Docker on AWS - DevDay Austin 2017Getting Started with Docker on AWS - DevDay Austin 2017
Getting Started with Docker on AWS - DevDay Austin 2017
 
Spinnaker 파트 1
Spinnaker 파트 1Spinnaker 파트 1
Spinnaker 파트 1
 
NetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmapNetflixOSS meetup lightning talks and roadmap
NetflixOSS meetup lightning talks and roadmap
 
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
No Surprises Geo Replication - Pulsar Virtual Summit Europe 2021
 
Kafka Tutorial: Kafka Security
Kafka Tutorial: Kafka SecurityKafka Tutorial: Kafka Security
Kafka Tutorial: Kafka Security
 
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
Kubernetes "Ubernetes" Cluster Federation by Quinton Hoole (Google, Inc) Huaw...
 
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
 
Apache Bookkeeper and Apache Zookeeper for Apache Pulsar
Apache Bookkeeper and Apache Zookeeper for Apache PulsarApache Bookkeeper and Apache Zookeeper for Apache Pulsar
Apache Bookkeeper and Apache Zookeeper for Apache Pulsar
 
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
[AWS Dev Day] 이머징 테크 | Libra 소스코드분석 및 AWS에서 블록체인 기반 지불 시스템 최적화 방법 - 박혜영 AWS 솔...
 
Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco OverdijkIntegrating Puppet with Cloud Infrastructures-Remco Overdijk
Integrating Puppet with Cloud Infrastructures-Remco Overdijk
 
Wido den hollander cloud stack and ceph
Wido den hollander   cloud stack and cephWido den hollander   cloud stack and ceph
Wido den hollander cloud stack and ceph
 
Serverless
ServerlessServerless
Serverless
 

Viewers also liked

IP Multicast Explained
IP Multicast ExplainedIP Multicast Explained
IP Multicast ExplainedMetaswitch NTD
 
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...Tom Laszewski
 
Redis & Redis HA design with Keepalived
Redis & Redis HA design with KeepalivedRedis & Redis HA design with Keepalived
Redis & Redis HA design with KeepalivedToshiki Inami
 
Redis High availability and fault tolerance in a multitenant environment
Redis High availability and fault tolerance in a multitenant environmentRedis High availability and fault tolerance in a multitenant environment
Redis High availability and fault tolerance in a multitenant environmentIccha Sethi
 
Redis modules 101
Redis modules 101Redis modules 101
Redis modules 101Dvir Volk
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStackKamesh Pemmaraju
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWSAmazon Web Services
 
Multicast Routing Protocols
Multicast Routing ProtocolsMulticast Routing Protocols
Multicast Routing ProtocolsRam Dutt Shukla
 
Disaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsDisaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsHarish Ganesan
 

Viewers also liked (12)

IP Multicast Explained
IP Multicast ExplainedIP Multicast Explained
IP Multicast Explained
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...
Speeding up delivery of web content using Amazon Route 53, Elastic Load Balan...
 
Redis & Redis HA design with Keepalived
Redis & Redis HA design with KeepalivedRedis & Redis HA design with Keepalived
Redis & Redis HA design with Keepalived
 
Ip multicast
Ip multicastIp multicast
Ip multicast
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
Redis High availability and fault tolerance in a multitenant environment
Redis High availability and fault tolerance in a multitenant environmentRedis High availability and fault tolerance in a multitenant environment
Redis High availability and fault tolerance in a multitenant environment
 
Redis modules 101
Redis modules 101Redis modules 101
Redis modules 101
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStack
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
Multicast Routing Protocols
Multicast Routing ProtocolsMulticast Routing Protocols
Multicast Routing Protocols
 
Disaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprintsDisaster Recovery using AWS -Architecture blueprints
Disaster Recovery using AWS -Architecture blueprints
 

Similar to Ha of load balancer

Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Ontico
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 SystemsDavid Newman
 
Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Fabrizio Volpe
 
Network Functions Virtualization and CloudStack
Network Functions Virtualization and CloudStackNetwork Functions Virtualization and CloudStack
Network Functions Virtualization and CloudStackChiradeep Vittal
 
Escalando Foursquare basado en Checkins y Recomendaciones
Escalando Foursquare basado en Checkins y RecomendacionesEscalando Foursquare basado en Checkins y Recomendaciones
Escalando Foursquare basado en Checkins y RecomendacionesManuel Vargas
 
Network load balancing deep dive
Network load balancing deep diveNetwork load balancing deep dive
Network load balancing deep diveJohn Louis Garcia
 
Scaling Social Games
Scaling Social GamesScaling Social Games
Scaling Social GamesPaolo Negri
 
Apache Zeppelin & Cluster
Apache Zeppelin & ClusterApache Zeppelin & Cluster
Apache Zeppelin & ClusterJongyoul Lee
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's ArchitectureTony Tam
 
NIC - Understand how Lync integrates with Exchange - Level 300
NIC - Understand how Lync integrates with Exchange - Level 300NIC - Understand how Lync integrates with Exchange - Level 300
NIC - Understand how Lync integrates with Exchange - Level 300Ståle Hansen
 
Ståle Hansen - Understand how lync integrates with exchange
Ståle Hansen - Understand how lync integrates with exchangeStåle Hansen - Understand how lync integrates with exchange
Ståle Hansen - Understand how lync integrates with exchangeNordic Infrastructure Conference
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & ContainersKangaroot
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services ArchitectureRanjan Baisak
 
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAmazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAcquia
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress IIBarry Abrahamson
 
Fast is good
Fast is goodFast is good
Fast is goodl8d_
 

Similar to Ha of load balancer (20)

MCSA 70-412 Chapter 09
MCSA 70-412 Chapter 09MCSA 70-412 Chapter 09
MCSA 70-412 Chapter 09
 
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
 
Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004] Lync Server 2010: High Availability [I3004]
Lync Server 2010: High Availability [I3004]
 
Network Functions Virtualization and CloudStack
Network Functions Virtualization and CloudStackNetwork Functions Virtualization and CloudStack
Network Functions Virtualization and CloudStack
 
Escalando Foursquare basado en Checkins y Recomendaciones
Escalando Foursquare basado en Checkins y RecomendacionesEscalando Foursquare basado en Checkins y Recomendaciones
Escalando Foursquare basado en Checkins y Recomendaciones
 
Network load balancing deep dive
Network load balancing deep diveNetwork load balancing deep dive
Network load balancing deep dive
 
Scaling Social Games
Scaling Social GamesScaling Social Games
Scaling Social Games
 
Apache Zeppelin & Cluster
Apache Zeppelin & ClusterApache Zeppelin & Cluster
Apache Zeppelin & Cluster
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
Inside Wordnik's Architecture
Inside Wordnik's ArchitectureInside Wordnik's Architecture
Inside Wordnik's Architecture
 
NIC - Understand how Lync integrates with Exchange - Level 300
NIC - Understand how Lync integrates with Exchange - Level 300NIC - Understand how Lync integrates with Exchange - Level 300
NIC - Understand how Lync integrates with Exchange - Level 300
 
Ståle Hansen - Understand how lync integrates with exchange
Ståle Hansen - Understand how lync integrates with exchangeStåle Hansen - Understand how lync integrates with exchange
Ståle Hansen - Understand how lync integrates with exchange
 
CoAP Talk
CoAP TalkCoAP Talk
CoAP Talk
 
Performance out
Performance outPerformance out
Performance out
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
 
Micro Services Architecture
Micro Services ArchitectureMicro Services Architecture
Micro Services Architecture
 
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAmazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and Hosting
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 
Fast is good
Fast is goodFast is good
Fast is good
 

More from DaeMyung Kang

How to use redis well
How to use redis wellHow to use redis well
How to use redis wellDaeMyung Kang
 
The easiest consistent hashing
The easiest consistent hashingThe easiest consistent hashing
The easiest consistent hashingDaeMyung Kang
 
How to name a cache key
How to name a cache keyHow to name a cache key
How to name a cache keyDaeMyung Kang
 
Integration between Filebeat and logstash
Integration between Filebeat and logstash Integration between Filebeat and logstash
Integration between Filebeat and logstash DaeMyung Kang
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advanceDaeMyung Kang
 
Massive service basic
Massive service basicMassive service basic
Massive service basicDaeMyung Kang
 
Data Engineering 101
Data Engineering 101Data Engineering 101
Data Engineering 101DaeMyung Kang
 
How To Become Better Engineer
How To Become Better EngineerHow To Become Better Engineer
How To Become Better EngineerDaeMyung Kang
 
Kafka timestamp offset_final
Kafka timestamp offset_finalKafka timestamp offset_final
Kafka timestamp offset_finalDaeMyung Kang
 
Kafka timestamp offset
Kafka timestamp offsetKafka timestamp offset
Kafka timestamp offsetDaeMyung Kang
 
Data pipeline and data lake
Data pipeline and data lakeData pipeline and data lake
Data pipeline and data lakeDaeMyung Kang
 
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbieDaeMyung Kang
 

More from DaeMyung Kang (20)

Count min sketch
Count min sketchCount min sketch
Count min sketch
 
Redis
RedisRedis
Redis
 
Ansible
AnsibleAnsible
Ansible
 
Why GUID is needed
Why GUID is neededWhy GUID is needed
Why GUID is needed
 
How to use redis well
How to use redis wellHow to use redis well
How to use redis well
 
The easiest consistent hashing
The easiest consistent hashingThe easiest consistent hashing
The easiest consistent hashing
 
How to name a cache key
How to name a cache keyHow to name a cache key
How to name a cache key
 
Integration between Filebeat and logstash
Integration between Filebeat and logstash Integration between Filebeat and logstash
Integration between Filebeat and logstash
 
How to build massive service for advance
How to build massive service for advanceHow to build massive service for advance
How to build massive service for advance
 
Massive service basic
Massive service basicMassive service basic
Massive service basic
 
Data Engineering 101
Data Engineering 101Data Engineering 101
Data Engineering 101
 
How To Become Better Engineer
How To Become Better EngineerHow To Become Better Engineer
How To Become Better Engineer
 
Kafka timestamp offset_final
Kafka timestamp offset_finalKafka timestamp offset_final
Kafka timestamp offset_final
 
Kafka timestamp offset
Kafka timestamp offsetKafka timestamp offset
Kafka timestamp offset
 
Data pipeline and data lake
Data pipeline and data lakeData pipeline and data lake
Data pipeline and data lake
 
Redis acl
Redis aclRedis acl
Redis acl
 
Coffee store
Coffee storeCoffee store
Coffee store
 
Scalable webservice
Scalable webserviceScalable webservice
Scalable webservice
 
Number system
Number systemNumber system
Number system
 
webservice scaling for newbie
webservice scaling for newbiewebservice scaling for newbie
webservice scaling for newbie
 

Ha of load balancer

  • 1. HA of Load Balancer for Small Company charsyam@naver.com
  • 2. Agenda • Why? –DNS RoundRobin • Dedicated Server in IDC –Hardware L4 –Using VIP • AWS –Using EIP
  • 3. Why? • Let’s see in beginner’s point of view. – How to distribute clients’ requests. Using DNS RR CLIENT CLIENT Web Server DB CLIENT Web Server CLIENT
  • 4. Why? • Let’s see in beginner’s point of view. – How to distribute clients’ requests. – But If one web server dies, half requests will fail. – And DNS RR needs lots of propagation time. Using DNS RR CLIENT CLIENT Web Server DB CLIENT Web Server CLIENT
  • 5. Load Balancer! • LB distributes clients’ requests. Using Load Balancer CLIENT CLIENT Web LB DB CLIENT Web CLIENT
  • 6. Load Balancer! • LB distributes clients’ requests. – If one web server dies, LB will get rid of failed server. Using Load Balancer CLIENT CLIENT Web LB DB CLIENT Web CLIENT
  • 7. Load Balancer FAIL • If LB dies, It is critical disaster. – So we need HA of Load Balancer. Using Load Balancer CLIENT CLIENT Web LB DB CLIENT Web CLIENT
  • 8. How? • How to HA of LB – It depends on your situation. • Question? – Where do you host your service? • IDC, aws • Let’s go to build.
  • 9. Dedicated Server in IDC • Using Hardware L4 – Could your hosting service support Hardware L4 – Pros • The easiest way to manage – Cons • Expensive solution. • Using VIP – With HAProxy or Nginx
  • 10. Hardware L4 #1 • You can choose 2 types of solution. • Using L4 as LB Using Hardware L4 #1 CLIENT CLIENT Web L4 DB CLIENT Web CLIENT
  • 11. Hardware L4 #2 • Using L4 with LB – Hardware L4 can fail, but rarely Using Hardware L4 #2 CLIENT CLIENT LB Web L4 DB CLIENT LB Web CLIENT
  • 12. Using VIP • Virtual IP Address CLIENT 1.1.1.4 Route 1.1.1.2 1.1.1.2 1.1.1.3 1.1.1.4 1.1.1.4 is VIP which is allocated 1.1.1.2
  • 13. Using VIP • We can give VIP to other Server. CLIENT 1.1.1.4 Route 1.1.1.2 1.1.1.3 1.1.1.4 1.1.1.4 is VIP which is allocated 1.1.1.2
  • 14. Software LB with Keepalived • Virtual IP Address( HAProxy, Nginx doesn’t matter ) 192.168.1.2 Web Web LB1 LB2 192.168.1.10 192.168.1.11 192.168.1.3 Haproxy 192.168.1.4 Haproxy Web DB keepalived keepalived 192.168.1.12 192.168.1.100
  • 15. Software LB with Keepalived • But you have to check failover time. 192.168.1.2 Web Web LB1 LB2 192.168.1.10 192.168.1.11 192.168.1.3 Haproxy 192.168.1.4 Haproxy Web DB keepalived keepalived 192.168.1.12 192.168.1.100 Keepalived checks each other. And LB2 Keepalived reassign VIP to oneself.
  • 16. Software LB with Keepalived • Link – HAProxy with keepalived • http://haproxy.1wt.eu/download/1.3/doc/architecture.txt • http://andyleonard.com/2011/02/01/haproxy-and-keepalived-example- configuration/ • http://aaronwalrath.wordpress.com/2011/06/28/configure-haproxy-and- keepalived-for-load-balancing-and-reverse-proxy-on-red- hatscientificcentos-linux-56/ – Nginx with keepalived • http://www.cyberciti.biz/faq/handling-nginx-failover-with-keepalived/ • http://evolution.voxeo.com/wiki/kb:swloadbalancingfailover
  • 17. AWS • What are different from IDC – You can’t use Hardware L4 – You can’t use multicast – You can’t use VIP • How? – ELB( Elastic Load Balancer ) – EIP( Elastic IP )
  • 18. ELB • Auto Scaling is possible. • ELB doesn’t support Fixed IP. CLIENT CLIENT EC2 Instance ELB CLIENT EC2 Instance CLIENT
  • 19. EIP • Elastic IP Address • We can associate and release EIP like VIP
  • 20. Weakness of ELB,EIP • Whenever we use it, we have to pay. – It is external IP. • And it is impossible to apply ELB,EIP in AWS internal networks.
  • 21. How to Handle in AWS? • There is no Silver Bullet. • DNS based Solution – Using Dynamic DNS Server for internal Network. – Using short TTL.