Cache Policy architecture commonly used by e-commerce websites, and e-commerce website architecture
Cache is an important component in distributed systems. It mainly solves the performance problems of hotspot Data Access in high concurrency and Big Data scenarios. Provides high-performance fast data access.
This is mainly to share the architecture scheme of a cache policy that I think is more common and easy to understand.
You are also welcomed to say:
Cache is an important component in distributed systems. It mainly solves the performance problems of hotspot Data Access in high concurrency and Big Data scenarios. Provides high-performance fast data access.
Cache Principle
(1) Storage (device) with faster data writing/reading speed );
(2) cache data to the closest location to the application;
(3) cache data to the nearest user location.
Cache category
Cache is widely used in Distributed Systems. From the perspective of deployment, there are the following cache applications.
(1) CDN cache;
(2) reverse proxy cache;
(3) distributed Cache;
(4) Local Application cache;
Cache Media
Common middleware: Varnish, Ngnix, Squid, Memcache, Redis, Ehcache, etc;
Cached content: files, data, and objects;
Cache media: CPU, memory (local, distributed), disk (local, distributed)
Cache Design
The cache design needs to solve the following problems:
(1) What is cached?
What data needs to be cached: 1. hotspot data; 2. Static resources;
(2) cache location?
CDN, reverse proxy, distributed cache server, Local Machine (memory, hard disk)
(3) how to cache?
1. fixed time: for example, the specified cache time is 30 minutes;
2. Relative time: for example, data not accessed in the last 10 minutes;
- Synchronization Mechanism