Clarification of nginx and load balancing needed -


i'm reading design of instagram , found such description of load balancing system.

every request instagram servers goes through load balancing machines; used run 2 nginx machines , dns round-robin between them. downside of approach time takes dns update in case 1 of machines needs decomissioned. recently, moved using amazon’s elastic load balancer, 3 nginx instances behind can swapped in , out (and automatically taken out of rotation if fail health check). terminate our ssl @ elb level, lessens cpu load on nginx. use amazon’s route53 dns, they’ve added pretty gui tool in aws console.

the question is. right have dns server uses rr decide on nginx server send request. , each of nginx servers @ turn resends request cluster?

and second question is. difference between nginx , load balancer. why cannot use nginx instead?

for first question, believe answer seems instagram uses route53 map dns elastic load balancer, 2 things: routes traffic evenly 3 nginx load balancers, , provides ssl traffic. nginx servers act load balancers content/application servers further down stack. using elb instead of round-robin dns means can add/remove/update instances attached elb without ever having worry dns updates or ttl.

as second question, can use nginx haproxy or other services load balancing. sure part of appeal instagram in choosing nginx incredible speed , it's asynchronous , "event-driven" instead of threaded apache2. when set properly, can mean less headaches under heavy loads.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -