January 01, 2002
URL:http://drdobbs.com/load-balancing-your-web-site-web-techniq/184414169
www.foo.dom. IN CNAME www1.foo.dom IN CNAME www2.foo.dom IN CNAME www3.foo.dom IN CNAME www4.foo.dom IN CNAME www5.foo.dom IN CNAME www6.foo.dom
Figure 1
A DNS-based Web server cluster.
1 ;; 2 ;; named.boot -- BIND daemon boot configuration 3 ;; 4 5 : 6 : 7 ;type domain source-file 8 primary foo.dom db.foo 9 primary rr.foo.dom db.foo.rr 10 : 11 :
;NOS = ceil(RPM * SPR * (1/60) * (100/80)) MBR = ceil((SPS * NOS * (100/70)) / 16) * 16
Figure 2
A reverse-proxy-based Web server cluster.
1 ;; 2 ;; db.foo -- BIND DNS zone file for the foo.dom domain 3 ;; 4 5 @ IN SOA world.foo.dom. root.world.foo.dom. ( 6 1998021502 ; SERIAL 7 604800 ; REFRESH: Secondaries refresh after 1 week 8 3600 ; RETRY: Secondaries retry after 1 hour 9 604800 ; EXPIRE: Maximum TTL of Data is 1 week 10 86400 ; MINTTL: Minimum TTL of Data is 1 day 11 ) 12 13 IN NS world.foo.dom. 14 15 ;; 16 ;; the resource record for www.foo.dom which 17 ;; maps to the Round-Robin domain 18 ;; 19 www IN CNAME www.rr.foo.dom.
maxusers 256 options SOMAXCONN=256 options NMBCLUSTERS=4096 options CHILD_MAX=512 options OPEN_MAX=512
Figure 3
A reverse-proxy-based Web server cluster with dedicated back-end subnet.
1 ;; 2 ;; db.foo.rr -- BIND DNS zone file for the rr.foo.dom domain 3 ;; 4 5 ;; 6 ;; the start of authority (SOA) resource record which 7 ;; forces a minimal time-to-live (TTL) for this zone file 8 ;; 9 @ IN SOA world.foo.dom. root.world.foo.dom. ( 10 1998021501 ; SERIAL 11 3600 ; REFRESH: Secondaries refresh after 1 hour 12 600 ; RETRY: Secondaries retry after 10 minutes 13 3600 ; EXPIRE: Maximum TTL of Data is 1 hour 14 1800 ; MINTTL: Minimum TTL of Data is 30 minutes 15 ) 16 17 IN NS world.foo.dom. 18 19 ;; 20 ;; the multiple canonical name (CNAME) resource record 21 ;; which implies BIND's Round-Robin (RR) feature 22 ;; 23 www IN CNAME www1.rr.foo.dom. 24 IN CNAME www2.rr.foo.dom. 25 IN CNAME www3.rr.foo.dom. 26 IN CNAME www4.rr.foo.dom. 27 IN CNAME www5.rr.foo.dom. 28 IN CNAME www6.rr.foo.dom. 29 30 ;; 31 ;; the address (A) resource records for the 32 ;; final NAME -> IP mapping 33 ;; 34 www1 IN A 192.168.1.1 35 www2 IN A 192.168.1.2 36 www3 IN A 192.168.1.3 37 www4 IN A 192.168.1.4 38 www5 IN A 192.168.1.5 39 www6 IN A 192.168.1.6
(a) -DHARD_SERVER_LIMIT=256 -DDYNAMIC_MODULE_LIMIT=0 -DBUFFERED_LOGS (b) MinSpareServers 256 StartServers 256 MaxSpareServers 256 MaxClients 256 MaxRequestsPerChild 1000 KeepAlive on KeepAliveTimeout 15 MaxKeepAliveRequests 64 Timeout 400 IdentityCheck off HostnameLookups off <Files ~ "\.(html|cg)$> HostnameLookups on </Files> <Directory /> Options FollowSymLinks AllowOverride None </Directory>
Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.