Using Caching to Improve Website Performance
As the number of users gradually increased, too much pressure on the database led to access delays, which in turn affected the performance of the entire site and the user experience was compromised.
Website access characteristics follow the same twenty-eight law as the distribution of wealth in the real world: 80% of business access is concentrated on 20% of the data.
Caching this small portion of data in memory can reduce database access pressure, provide faster database access across the site, and improve database write performance.
The caches used by websites can be divided into two types.
The local cache on the application server.
Local caches are a bit faster to access, but are limited in the amount of data they can cache by the memory limitations of the application server, and can appear to commandeer memory with the application.
Remote caching on a dedicated distributed cache server.
Remotely distributed caching can be done using clustering, deploying large memory servers as dedicated caching servers, which can theoretically achieve caching services that are not limited by memory capacity.