Serving Content


Now that we have six servers clustered together, we need to set up a high-performance web serving platform to meet our needsa peak demand of 11,750 requests per second.

Installing Squid is fairly straightforward with a familiar ./configure; make; make install. However, configuring it can be complicated.

The main squid.conf file should be modified to make the Squid instance act as an HTTP accelerator only for images.example.com.

http_port 80 accel vhost vport=80 defaultsite=images.example.com acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl Safe_ports port 80 acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny to_localhost http_access deny CONNECT http_access allow all acl acceld dstdomain images.example.com always_direct allow acceld 


This allows requests to this cache from anywhere but only pulls content to satisfy those requests of images.example.com. images.example.com should be added to the local /etc/hosts file to be the published IP of www.example.com. This configuration achieves the content placement approach shown previously in Figure 6.3.




Scalable Internet Architectures
Scalable Internet Architectures
ISBN: 067232699X
EAN: 2147483647
Year: 2006
Pages: 114

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net