Jingdong spike high concurrency solutions

Spike systems often found in such as Taobao, Jingdong this type of shopping site, due to the preferential goods, quantity is limited, which is characterized by a certain time there will be a large number of users in the server to initiate the request, likely to cause great stress on the server. For a spike system, the need for a special design to solve the consistency problem of huge traffic spike at the scene as well as peak data.

Spike architecture design philosophy:

Anti-brush design: design effective anti brush mechanism, effectively blocking invalid request, the malicious user to avoid spike call related interfaces.

Tiered Parity data: as far as possible in the different layers will intercept and filter out invalid request, so that a truly effective requests fall into back-end services.

Limiting: Given that only a small number of users to spike success, so most of the traffic restrictions, allowing only a small part of the flow into the back-end service.

Traffic clipping: spike system for instantaneous influx of large numbers of users have, so start there will be a rush to buy high peak instantaneous flow. Peak flow system is overwhelmed very important reason, so how to become an instant peak traffic flow smoothly over a period of time is very important to design the system to spike the idea, commonly used method is to use clipping to achieve caching and messaging middleware and other technologies.

Oversold design: a limited number of stocks, how to effectively control the commodity is oversold spike system inevitably a problem;

Asynchronous processing: spike system is a highly concurrent systems using asynchronous mode processing system can greatly improve concurrency, asynchronous processing of course is an implementation of clipping.

Memory cache: the biggest bottleneck in the system are generally spike database read and write, because the database disk read and write belongs to IO, low performance, if we can put some data or business logic into the cache memory, the efficiency will be greatly improved.

Static and dynamic separation: the large number of static resource, CDN cache, reducing the pressure request back-end server.

Standby disaster recovery: good standby disaster recovery, prevent malicious attacks in advance in case of a conditional;

May expand: Of course, if we want to support more users, greater concurrency, it is best to design systems to elastically expand, if traffic increases rapidly, the machine can expand. Like when double eleven activities Taobao, Jingdong will increase the number of servers to cope with peak traffic.

Guess you like

Origin www.cnblogs.com/superyucong/p/12321408.html