Let’s talk about second kill

The essence of second kill

Business: a promotional marketing activity

Technically: an active DDoS attack with technical uncertainty and complexity.

Technically, what are the optimization methods for second kill?

At the earliest stage, the volume was too large to carry. The front end rejected some requests randomly and returned the order grabbing failure. Simple and effective 2 Optimize throughput

In the early stage of the activity, prepare a large number of machines in advance, service-oriented, sub database and sub table, and solve the back-end performance, so that the front-end business can add a certain number of machines, and then engage in stability, dependency, capacity planning, flexibility and improve throughput. 3. Asynchronous queue

Use the stackable message queue or memory message queue. If the order grabbing is highly sequential, all the first n (second kills) will be taken out and smoothed, and all the rest will be processed as failure batches. You can even make a queue with a fixed length and write it in to directly prompt failure. 4. Memory allocation

Preheating will also be considered for some specific businesses. Allocate the inventory quantity in the memory of each machine node in advance, and then directly process your own inventory quantity in the memory. 5. Split extension

Different front-end promotion clusters are deployed for different types, businesses and sources of goods to disperse the pressure. Specific to each business, the volume is not so large. 6. Service degradation

The more important it is to grab orders, the more concerned we are about whether we have grabbed them, that is to say, grabbing the location is more valuable than handling the whole order process. For example, 12306 grabbing a ticket, as long as you tell the user that you have got the ticket, the user will not use the ticket immediately. You don't care whether the order is processed in one minute or one hour.

It should be noted that some of these models will lead to insufficient sales or oversold. Insufficient sales can be reissued by adding some lists from the rush purchase, or a second kill can be added. Oversold is troublesome, so usually more goods will be prepared, such as 100 mobile phones and 105. Because if we want to solve the oversold with a 1% probability, it is much easier to solve it from the business than from the technology.

Steps of system architecture design

Output: new requirements documents, relevant documents and design drawings of the current status of the system, feasibility analysis documents 2 Find path

Output: draft design scheme, key problem analysis, key technology selection report, POC verified scene design document and demo, test / pressure test results 3 Determine the scheme

Output: final draft of architecture design scheme and design drawing, organization meeting, synchronization, publicity and implementation.

System design document

Example of document structure:

Method of technology selection

In principle, relatively mature and stable appropriate technologies shall be comprehensively considered. Comply with the company's technical development route and model selection specifications.

Methods: write case based on key scenarios, implement demo, and verify various indicators of a variety of similar technologies.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>