Software Architecture

Distributed caching to improve system performance

Caching is a commonly used technique to improve system performance by storing frequently used data or files in memory or local file system to avoid roundtrip over the network. More specifically, by caching, we refer to storing data on the server memory hosting our system. And if we have multiple servers behind a load balancer, we use a distributed caching technology such as Redis.

We can further expand the context of distributed caching outside the system boundary. For static contents, we can use CDN (Content Delivery Networks). ISPs (Internet Service Provider) also cache contents for its users. On the user-side, web browsers also have the caching capability.

By closely analysing various system APIs and UI components, we can individually determine the corresponding cache lifecycle logic. This way we can leverage the inherent caching capability of the web browsers, ISPs and CDNs, and significantly improve our system performance without sending any workload to our application servers.