Flash sale control method and system based on nginx and electronic equipment
A control method and control system technology, applied in the computer field, can solve problems such as high operation and maintenance costs and inability to make full use of the advantages of nginx, so as to reduce risks, avoid seckill service downtime, and improve user experience
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0077] A seckill control method based on nginx, such as Figure 1-3 As shown, the spike control method may include the following steps:
[0078] Step S11: Read the information of the published seckill object, the information of the seckill object includes the inventory of the seckill object;
[0079] Step S12: Synchronize the inventory to the nginx instance;
[0080] Step S13: receiving a user's seckill request for the seckill object;
[0081] Step S14: Control the nginx instance to execute the inventory deduction logic according to the seckill request, wherein the deduction inventory quantity in the deduction logic corresponds to the quantity of the seckill object in the seckill request.
[0082] Said nginx is a lightweight, high-performance server that can support reverse proxy and e-mail proxy, etc., and supports high concurrent data traffic.
[0083] The seckill refers to a sales method in which all buyers rush to buy online at the same time when online sellers release ...
Embodiment 2
[0112] A seckill control method based on nginx, such as Figure 4 As shown, the seckill control method in this embodiment is a further improvement on the basis of Embodiment 1.
[0113] Further, after step S122, step S123 may also be included: scheduling the sub-inventory in the nginx instance every preset time, so that each nginx instance maintains an equal sub-inventory, wherein, The scheduling includes increasing the sub-stock, decreasing the sub-stock or maintaining the sub-stock.
[0114] In this embodiment, the preset time may be set to 30-200ms, preferably, the preset time is 100ms.
[0115] Further, in order to ensure that the execution process of each scheduling is traceable, after the step S123, a step S124 may also be included: generating a scheduling log for scheduling the sub-inventory.
[0116] When the scheduling is specifically executed, atomic deduction scheduling can be performed in units of m inventories, and the scheduling inventory deduction logic of all...
Embodiment 3
[0123] A seckill control method based on nginx, such as Figure 5 As shown, the seckill control method in this embodiment is a further improvement on the basis of Embodiment 1 or Embodiment 2.
[0124] In order to further improve the randomness and fairness of the seckill, the step S14 can be improved. The step S14 can be performed according to the following specific steps:
[0125] Step S141: Determine whether the difference between the time when the seckill request occurs and the preset seckill time is greater than a preset threshold;
[0126] If it is judged as no, execute step S142: delaying the preset seckill time by a preset adjustment value, so as to obtain the execution time of the seckill operation;
[0127] Step S143: judging whether the current time has reached the execution time of the seckill operation;
[0128] If the judgment is yes, execute step S144: control the nginx instance to execute the deduction logic of the inventory.
[0129] During specific implem...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


