Analysis on e-commerce flash sales and flash sales

Source: Internet
Author: User

Analysis on e-commerce flash sales and flash sales

Flash sales and flash sales of e-businesses are not a stranger to us. However, from a technical point of view, this is a huge test for Web systems. When a Web system receives tens of thousands or more requests within one second, system optimization and stability are crucial. This time, we will focus on the technical implementation and optimization of flash sales and flash sales.

Large e-commerce flash sales, there must be a lot of awesome technologies, balance of liabilities, and north-south images... Wait. I just want to write a solution for my flash sales business!

First go to the flowchart:

What should I do with the concurrency of a flash sales activity on an e-commerce website? Message Queue

AMQP (Advanced Message Queuing Protocol) is an open standard for application layer protocols and is designed for Message-oriented middleware. Message-oriented middleware is mainly used for decoupling between components. message senders do not need to know the existence of message users, and vice versa.
AMQP features message-oriented, queue-oriented, routing (including point-to-point and publish/subscribe), reliability, and security.
RabbitMQ is an open-source AMQP implementation. The server side is written in Erlang and supports multiple clients, such as Python, Ruby, and ,. NET, Java, JMS, C, PHP, ActionScript, XMPP, STOMP, etc. AJAX is supported. It is used to store and forward messages in a distributed system, and has good performance in terms of ease of use, scalability, and high availability. I have some friends who are playing RabbitMq!

The user request will post some background information such as (user information, product information) to the message queue.

Message Queues use the Windows service to process parsed information and process it in a single thread (multithreading may cause problems, you know )!

If it is successful, it will be inserted into the success record table of this activity; if it fails, it will be inserted into the intentionally purchased table (to facilitate sales by business personnel )!

How to notify users?

1. ajax asynchronous request (request a successful record every two minutes. If the database is not requested, we will use Redis cache)

2. persistent connection (websocket, signalr, etc)

In short, I want to do a good job in flash sales and other businesses, and the road is long enough. I hope you can provide more guidance!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.