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

CARP

CARP is an algorithm and not a protocol per se. It was designed to address a particular problem: how to achieve efficient and scalable load balancing while maximizing hit ratios and minimizing latency. It is useful in situations where a proxy caching service consists of a number of machines tightly clustered together. For example, a large ISP may need five web caches to handle all the traffic from their customers. Given a cache cluster or array, how can we distribute the load among the members?

One technique is known as DNS round-robin. Each cache has its own IP address, but all are listed under a single hostname. For example:

$ORIGIN us.ircache.net.
bo                      IN      A       192.52.106.30
                        IN      A       192.52.106.31

A DNS server, such as BIND, cycles the order of the addresses for every lookup. When one client asks for bo.us.ircache.net, it receives the answer (192.52.106.30, 192.52.106.31). The next client that asks gets the same addresses in a different order: (192.52.106.31, 192.52.106.30).[31] Clients normally try the first IP address in the list. They’ll try the next address only if there is a failure with the first. With this technique, each cache should receive about half of the the requests.

The drawback to this approach is that client requests are randomly assigned among the member caches. One client may request http://www.web-cache.com from cache A, while another requests the same URL from cache B, thereby missing the opportunity for a cache hit. Of course, the caches can use ICP among themselves ...

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