Processing high-load, high-concurrency
Static page
Image server separation
Using memcache, redis caching service
DB separate read and write
Load Balancing
Commodities spike, oversold
redis queue (queue goods, queue queuing, snapping result queue)
Goods spike queues using pop atomicity operation, arrive at the same multi-user, is performed sequentially
Shopping Cart Principle
Related to: Add to Cart, shopping cart delete, modify the shopping cart, empty shopping cart, shopping cart list of goods, quantity, price
achieve:
1, using the cookie characteristics (establish a session on the server and client), the shopping information generated cookie value is stored in the client realize cart function
2, using a session (the session private clients and servers stored in the server), the server generates a session, the client generates a session ID and save the client, server, and the synchronization holding
Order split
Generating sub-order number, order schedule merchandise orders corresponding sub-order number table