As a customer we know that, products will go out of stock quickly. So i won’t decrease the stock quantity even if there is an item in the cart. as soon as user reaches the payment page we check if the stock is available or not, if available either we can decrease or lock the item for fixed amount of time, incase payment fails we decrease the count or release the lock for item.
If I have 1000 iphones in stock and 1000 buyers add it to basket (but not payed yet), what shall I do? And if 80% of them not going to buy it? I do not want to loose my profits.
Perhaps a cache specifically for Black Friday items? Only certain items go on sale. Seems a reasonable assumption to say that those specific items will be handled more often than non-sale items.
Instead of "nginx", would it be better to say "reverse proxy" as the general concept?
we can use multi-master cache to divide the load
As a customer we know that, products will go out of stock quickly. So i won’t decrease the stock quantity even if there is an item in the cart. as soon as user reaches the payment page we check if the stock is available or not, if available either we can decrease or lock the item for fixed amount of time, incase payment fails we decrease the count or release the lock for item.
If I have 1000 iphones in stock and 1000 buyers add it to basket (but not payed yet), what shall I do? And if 80% of them not going to buy it? I do not want to loose my profits.
For the customer experience, maybe we need to decrease inventory first before doing payment...?
What is TPS here ? I am noob.
Transaction per second. Although I would prefer RPS (request per second) to describe high load
Transaction Per Minute.
number of transactions that a system can handle within a minute
For high concurrency, implement load balancing to distribute the traffic evenly across multiple servers and prevent crashes due to server overloading.
Having a backup system in place for high availability, so that the website can still function in case of technical issues.
Performance testing to verify the system scales to handle spike in the traffic during the Black Friday event.
Use gzip compression in front end to improve UI performance.
I dont understand how isolating the cache and db isntance helps in this case
Perhaps a cache specifically for Black Friday items? Only certain items go on sale. Seems a reasonable assumption to say that those specific items will be handled more often than non-sale items.