CRDT Web Caching: Enabling Distributed Writes and Fast Cache Consistency for REST APIs
Published in 20th International Conference on Network and Service Management (CNSM 2024), 2024
Abstract:
Web Application developers have two main options to improve the performance of their REST APIs using Content Delivery Network (CDN) caches: define a Time to Live (TTL) or actively invalidate content. However, TTL-based caching is unsuited for the dynamic data exchanged via REST APIs, and neither can speed up write requests. Performance is important, as client latency directly impacts revenue, and a systems scalability is determined by its achievable throughput. A new type of Web proxy that acts as an information broker for the underlying data rather than working on the level of HTTP requests presents new possibilities for enhancing REST APIs. Existing Conflict- free Replicated Data Type (CRDT) semantics and standards like JSON:API can serve as a basis for such a broker. We propose CRDT Web Caching (CWC) as a novel method for distributing application data in a network of Web proxies, enabling origins to automatically update outdated cached content and proxies to respond directly to write requests. We compared simple forwarding, TTL-based caching, invalidation-based caching, and CWC in a simulated CDN deployment. Our results show that TTL-based caching can achieve the best performance, but the long inconsistency window makes it unsuitable for dynamic REST APIs. CWC outperforms invalidation-based caching in terms of throughput and latency due to a higher cache-hit ratio, and it is the only option that can accelerate write requests. However, under high system load, increased performance may lead to higher latency for non-acceleratable requests due to the additional synchronization. CWC allows developers to significantly increase REST API performance above the current state-of-the-art.
Recommended citation: Markus Sosnowski, Richard von Seck, Florian Wiedner, Georg Carle, "CRDT Web Caching: Enabling Distributed Writes and Fast Cache Consistency for REST APIs", 20th International Conference on Network and Service Management (CNSM 2024), Prague, Oct. 2024.
BibTeX
@inproceedings{sosnowski2024crdts, author = {Sosnowski, Markus and {von Seck}, Richard and Wiedner, Florian and Carle, Georg}, title = {{CRDT Web Caching}: Enabling Distributed Writes and Fast Cache Consistency for {REST} {APIs}}, booktitle = {Proc. 20th International Conference on Network and Service Management (CNSM)}, address = {Prague, Czech Republic}, keywords = {REST;CDN;CRDT}, year = {2024}, day = {28}, month = oct, month_numeric = {10} }