Ha of load balancer
Upcoming SlideShare
Loading in...5
×
 

Ha of load balancer

on

  • 2,822 views

 

Statistics

Views

Total Views
2,822
Views on SlideShare
1,213
Embed Views
1,609

Actions

Likes
4
Downloads
22
Comments
0

4 Embeds 1,609

http://charsyam.wordpress.com 1581
http://www.hanrss.com 25
http://webcache.googleusercontent.com 2
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ha of load balancer Ha of load balancer Presentation Transcript

  • 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!