What Happens When a Cache Expires? Latency Spikes in Small E-Commerce Services

Authors

  • Chandran Kapoor Department of Computer Science and Engineering, University at Buffalo, Buffalo, NY, USA. Author
  • Terina Stubbs Department of Computer Science, University of Houston, Houston, TX, USA. Author

Keywords:

web caching; cache expiration; tail latency; cache stampede; e-commerce performance; queueing analysis

Abstract

Cache expiration is usually treated as a correctness or freshness rule, yet in small e-commerce services it is also a load-generation mechanism. A product page, category listing, or price fragment that remains cached for minutes may appear harmless under average traffic, but the moment its time-to-live elapses, the next requests must be served by the origin, and several concurrent requests can do so at once. This paper analyzes the latency consequences of expiration in modest deployments where a shared application server, database, and cache serve a skewed catalog. The central contribution is an expiration-centric analytical framework that links per-object time-to-live, request intensity, refill time, request coalescing, and origin capacity to the nonlinear growth of queueing delay. It derives a renewal expression for the probability that a request finds an expired object, aggregates expiration-driven origin load across a catalog, incorporates stampede amplification, and connects the resulting utilization to tail-latency behavior through a queueing approximation. The analysis shows why small services can experience sharp latency spikes even when average cache hit ratios remain high: expiration converts a low-rate miss process into synchronized background demand, and popular objects can generate repeated origin work if misses are not collapsed. The framework also clarifies design levers such as TTL jitter, request coalescing, headroom provisioning, and separating expiration-sensitive data from inventory-critical state. The implications are practical for operators who cannot rely on large-scale infrastructure but still need predictable response times.

References

1. Breslau, L., Cao, P., Fan, L., Phillips, G., & Shenker, S. (1999). Web caching and Zipf-like distributions: Evidence and implications. In Proceedings of IEEE INFOCOM 1999 (pp. 126–134). IEEE.

2. Barroso, L. A., Hölzle, U., & Ranganathan, P. (2018). The datacenter as a computer: Designing warehouse-scale machines (3rd ed.). Morgan & Claypool.

3. Rodriguez, P., Spanner, C., & Biersack, E. W. (2001). Analysis of web caching architectures: Hierarchical and distributed caching. IEEE/ACM Transactions on Networking, 9(4), 404–418.

4. Atikoglu, B., Xu, Y., Frachtenberg, E., Jiang, S., & Paleczny, M. (2012). Workload analysis of a large-scale key-value store. ACM SIGMETRICS Performance Evaluation Review, 40(1), 53–64.

5. Dean, J., & Barroso, L. A. (2013). The tail at scale. Communications of the ACM, 56(2), 74–80.

6. Vattani, A., Chierichetti, F., & Lowenstein, K. (2015). Optimal probabilistic cache stampede prevention. Proceedings of the VLDB Endowment, 8(8), 886–897.

7. Fielding, R., Nottingham, M., & Reschke, J. (2014). Hypertext Transfer Protocol (HTTP/1.1): Caching (RFC 7234). Internet Engineering Task Force.

8. Little, J. D. C. (1961). A proof for the queuing formula: L = λW. Operations Research, 9(3), 383–387.

9. Kleinrock, L. (1975). Queueing systems, Volume 1: Theory. Wiley.

10. Mitzenmacher, M. (2001). The power of two choices in randomized load balancing. IEEE Transactions on Parallel and Distributed Systems, 12(10), 1094–1104.

11. Welsh, M., Culler, D., & Brewer, E. (2001). SEDA: An architecture for well-conditioned, scalable internet services. In Proceedings of the 18th ACM Symposium on Operating Systems Principles (pp. 230–243). ACM.

12. DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., ... & Vogels, W. (2007). Dynamo: Amazon's highly available key-value store. In Proceedings of the 21st ACM Symposium on Operating Systems Principles (pp. 205–220). ACM.

13. Cao, P., & Irani, S. (1997). Cost-aware WWW proxy caching algorithms. In Proceedings of the USENIX Symposium on Internet Technologies and Systems. USENIX Association.

14. Wessels, D., & Claffy, K. (1998). ICP and the Squid web cache. IEEE Journal on Selected Areas in Communications, 16(3), 345–357.

15. Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., & Berners-Lee, T. (1999). Hypertext Transfer Protocol -- HTTP/1.1 (RFC 2616). Internet Engineering Task Force.

16. Schroeder, B., Wierman, A., & Harchol-Balter, M. (2006). Open versus closed: A cautionary tale. In Proceedings of the 3rd USENIX Symposium on Networked Systems Design and Implementation (pp. 239–252). USENIX Association.

Downloads

Published

2022-01-29