From the Blogosphere
The Impact of Web Caching | @DevOpsSummit #DevOps #Storage #WebPerf
Caching is a way of temporarily storing the contents of a webpage in locations near the user, similar to the way memory works
By: Mehdi Daoudi
May. 5, 2017 12:00 PM
The Impact of Web Caching
Try to remember something that happened on your last vacation. How long did it take you to recall? Now, try to remember it again. You were probably able to recall it faster the second time — but, why? This is because as soon as you recalled the event the first time, your brain saved the information to your recent memory.
The same concept applies to caching. Caching is a way of temporarily storing the contents of a webpage in locations near the user, similar to the way our memory works. There are several types of caching options available like database caching, application caching, and distributed caching. In this article, we’ll talk about web caching and how it affects user experience.
What is web caching?
Web caching minimizes network traffic and improves the perceived performance of the web page. Caching can be implemented at different levels along the network path. The following are the possible caching entities between the origin server and the browser:
How do the caching entities know what to cache?
Here is an example of an HTTP Response with Cache-Control header
How does caching help in improving user experience?
1. Reduced latency
The speed at which the webpage loads is crucial in ensuring a good digital experience and caching can reduce load time as it serves content from a location nearest to the users – either on the user’s hard disk or a nearby server.
The above image illustrates the impact of caching. As you can see, the page loads 50% faster when cached. Caching reduces latency in the roundtrip time by retrieving the content much faster. The time taken to retrieve the resource from the cache will be lower than the time it takes from the origin server and this speeds up the content delivery process.
2. Content availability
3. Avoids network congestion
To understand this better, let’s use a restaurant as an example. Assume that there is only a single location for this restaurant in the city, making it a crowded spot with customers coming in every few minutes. If the restaurant ends up exhausting all of its resources trying to manage everyone, service could be delayed as they are working above their existing capacity, resulting in a long line of customers waiting to be served. The restaurant would be able to manage better if they had more than one location in the city to help distribute the customers and balance the load.
The same logic applies to the Internet as well. Network congestion can be greatly reduced with caching, as the path traveled in fetching the content is cut short when it’s cached. Since all the requests are not directed towards the origin, it frees up the network and reduces the load on the origin server, helping it serve non-cached content faster.
The image above demonstrates the difference in the number of requests with or without cache on the wire.
Disadvantages of Caching
Caching entities include third-party proxy servers shared by multiple users which are always at risk of being compromised. If caching servers are hacked then it impacts all users connected to this server.
Troubleshooting Caching Issues
Implementation of caching will help grow your business positively by being a vital cog in ensuring business sustenance. But at the same time, it is very important to ensure optimal caching policies are in place to suit your business. Tailored solutions are the way to go because there is no one-size-fits-all solution. Caching may not be the talisman, but it will ensure that your business stays afloat and affluent with minimal exertions.
Latest AJAXWorld RIA Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week