Home > Backend Development > PHP Tutorial > The most commonly used caching strategy architecture for e-commerce websites, e-commerce website architecture_PHP tutorial

The most commonly used caching strategy architecture for e-commerce websites, e-commerce website architecture_PHP tutorial

WBOY
Release: 2016-07-12 08:50:07
Original
923 people have browsed it

A commonly used caching strategy architecture for e-commerce websites, e-commerce website architecture

Cache is an important component in a distributed system, mainly solving hot spots in high concurrency and big data scenarios Data access performance issues. Provide high-performance and fast access to data.

This time I mainly share an architectural solution for a cache strategy that I think is more common and easier to understand. Comments are welcome.

If you have more awesome ideas, please share them:

Cache is an important component in a distributed system. It mainly solves the performance problem of hot data access in high concurrency and big data scenarios. Provide high-performance and fast access to data.

The principle of caching

(1) Storage (device) that writes/reads data faster;

(2) Cache data to the location closest to the application;

(3) Cache data to the location closest to the user.

Caching categories

In distributed systems, caching is widely used. From a deployment perspective, there are the following caching applications.

(1) CDN cache;

(2) Reverse proxy cache;

(3) Distributed Cache;

(4) Local application cache;

Caching media

Commonly used middleware: Varnish, Ngnix, Squid, Memcache, Redis, Ehcache, etc.;

Cached content: files, data, objects;

Caching media: CPU, memory (local, distributed), disk (local, distributed)

Caching design

Cache design needs to solve the following problems:

(1) What to cache?

Which data needs to be cached: 1. Hot data; 2. Static resources;

(2) Where is the cache?

CDN, reverse proxy, distributed cache server, local machine (memory, hard disk)

(3) How to cache?

  • Expiration Policy

1. Fixed time: For example, the specified cache time is 30 minutes;

2. Relative time: For example, data that has not been accessed in the last 10 minutes;

  • Synchronization mechanism

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1135476.htmlTechArticleA cache strategy architecture commonly used by e-commerce websites. E-commerce website architecture cache is an important component in a distributed system. Mainly solves the problem of hot data access in high concurrency and big data scenarios...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template