Asynchronous Request Batching and Caching
Get familiar with the basics of asynchronous request batching and caching.
We'll cover the following
In high-load applications, caching plays a critical role and it’s used almost everywhere on the web, from static resources such as web pages, images, and stylesheets, to pure data such as the result of database queries. In this section, we’re going to learn how caching applies to asynchronous operations and how a high request throughput can be turned to our advantage.
What’s asynchronous request batching?
When dealing with asynchronous operations, the most basic level of caching can be achieved by batching together a set of invocations to the same API. The idea is very simple: if we invoke an asynchronous function while there’s still another one pending, we can utilize the already running operation instead of creating a brand new request. Take a look at the illustration given below.
Get hands-on with 1400+ tech skills courses.