Skip to Content
Web Caching
book

Web Caching

by Duane Wessels
June 2001
Intermediate to advanced
320 pages
9h 18m
English
O'Reilly Media, Inc.
Content preview from Web Caching

Throughput and Load Sharing

A cache cluster with load sharing can improve both throughput and reliability. Throughput is increased because N caches can handle more traffic than just one. Reliability is increased because when one cache fails, the other cluster members absorb the increased load.

The really cheap way to implement load sharing is with the DNS. You simply list the IP addresses of all members under a single host name. Most DNS resolver libraries change the order of the addresses for each lookup. Thus, requests are sent to the caches in a round-robin fashion. This technique provides very rudimentary failover when one cache goes down. When a browser cannot connect to one of the IP addresses, it should try the next one in the list. Unfortunately, this can take a long time (up to two minutes), and browsers don’t usually remember which addresses don’t work.

A more robust approach, if you can afford it, is to use a layer four switch or dedicated load balancing product (see Table 5-1). These products have a number of load sharing algorithms (see Section 5.2.2) and generally do a better job of spreading the load among cluster members. Furthermore, users are less likely to experience delays or other problems if one member fails.

You may notice that I am intentionally avoiding the word balance. Some of the load sharing techniques may not distribute the load evenly among caches. The DNS-based approach is difficult to predict and control. One or two really busy clients could send ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

How Netflix scales microservices with application data caching

How Netflix scales microservices with application data caching

Scott Mansfield
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck
NGINX Cookbook

NGINX Cookbook

Tim Butler

Publisher Resources

ISBN: 156592536XCatalog PageErrata