Web Server Clustering - OSSCAMP

3,427 views
3,368 views

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,427
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
130
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Web Server Clustering - OSSCAMP

  1. 1. What is Cluster ? Abhishek Kumar Singh Uzanto Consulting India Pvt. Ltd. Web 2.O Company [email_address]
  2. 2. Types Of cluster Loadbalancing HighAvailability HPC GridComputing
  3. 3. DNS RR Loadbalancing www.example.com . IN A 192.168.1.1 www.example.com . IN A 192.168.1.1 www.example.com . IN A 192.168.1.1 Disadvantages Caching Issues Downed Web Server
  4. 4. DNS RR Loadbalancing www.example.com . IN A 192.168.1.1 www.example.com . IN A 192.168.1.1 www.example.com . IN A 192.168.1.1
  5. 5. OpenSource Loadbalancing Packages pen pound haproxy Ultramonkey LVS OpenSSI(Single System Image)‏
  6. 6. Proxy & Web Server's Loadbalncing Apache- mod_proxy, mod_proxy_balancer RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:8000 BalancerMember http://127.0.0.1:8001 BalancerMember http://127.0.0.1:8002 </Proxy>
  7. 7. Nginx------- http { .................. .................. upstream mongrel { server 127.0.0.1:6001 max_fails=1 fail_timeout=60s; server 127.0.0.1:6002 max_fails=1 fail_timeout=60s; server 127.0.0.1:6003 max_fails=1 fail_timeout=60s; } proxy_next_upstream error timeout http_500 http_503; }
  8. 8. server { .................. .................. .................. if (!-f $request_filename) { proxy_pass http://mongrel; break; } .................. .................. }
  9. 9. LVS(Linux Virtual Server)‏ OpenSource Project TCP/IP level loadbalancing Sheduling Algorithms:- 1) Static i- RR ii- WRR
  10. 10. 2) Dynamic i- LC overload=(AC*256+IC)‏ ii- WLC priority= overload/weight LVS Types LVS NAT performance issue for high volume traffic LVS DR ARP issue but performance is good LVS TUN Note: LVS Routers Uses GARP to update real servers ARP table .
  11. 11. HighAvailability:- Hearbeat Hearbeat Config 1) Heartbeat Configuration /etc/ha.d/ha.cf 2) Resource Configuration /etc/ha.d/haresources 3) Authentication Configuration /etc/ha.d/authkeys (sha1,md5)‏
  12. 12. Heartbeat Communication Messages:- 1) Heartbeats (statuc messages) 150 bytes long. 2) Cluster Transition Messages i- ip-request ii- ip-request-resp Note: When Primary Server comes online . 3) Retransmission request ( sequence mismatch )‏
  13. 13. Storage Cluster 1) DRBD 2) Heartbeat 3) NFS Distributed Replicaton Of Block Device Network File System
  14. 14. www.linuxvirtualserver.org www.linux-ha.org www.highscalability.com Resources www.slideshare.net/abhishek_singh
  15. 15. Questions ? I Love Questions .

×