Table of Contents
What is Caching ?
The word caching literally means to store something. In Software design caching means to store copy of the data locally or externally for faster future reads/retrieval.
In Client server architecture when requests are made to server for any data/information server reaches out to database to fetch the corresponding information.
Now every time if server reaches out to database for similar/new information it will result in latency and delays.
To overcome these redundant calls caching is implemented which stores data at server(local memory) for faster retrieval.

Based on where this cache is placed there are different types of caching strategies.
Application Server Cache
Application sever caching is also known an server side caching.
Here cache is present in server to avoid frequent read operations for most used data.
This helps to improve performance and reduce load on servers.
So whenever requests comes it first checks cache and if data/webpage is present in cache it is served from cache. And this is Known as Cache Hit.
And if is not found in cache its known as Cache Miss.
Common server side caching tools are Redis, Memcached
Distributed Cache
Distributed cache is advanced version of normal caching solution to resolve single point failure of caching solution.
Here we have multiple nodes of a cache which are interconnected. It resolves to problems:-
- Resolve Singe Point of failure
- To further speed up caching solutions under high traffic.
Common Distributed cache tools are Redis Cluster , hazelcast , Amazon Elasticache
Global Cache
Global Cache is a Single Cache where all requests would come in and data is served.
Global Cache is uniform for all requests, if any data is put on any node of the server it will be replicated into the global cache
CDN (Content Delivery Network)
CDN consist of cache/servers which delivers data on the basis of user location.
For Example if we have a cache/server in India and a user request is coming in from US then there must be a latency due to the distance between client and server this holds true for vice versa as well and also for any other combination for client server which are very apart from each other.
To overcome this CDN’s are added.
This also helps in compliance with local laws of not moving data out of local jurisdiction.
Advantages
- Reduce Network Calls
- Reduced Latency
- Reducing Server Load
- Increasing Data Availability
Leave a Reply