php - ecshop group purchasing function development
黄舟2017-05-16 13:15:17
0
2
848
ecshop group purchasing function development, if there is a plug-in, please share it, or share your development ideas and implementation process at that time?
Group buying will cause large concurrency problems. Considering the number of concurrencies per second or tens of thousands, then simply writing and reading through the database is definitely not enough. First, consider the number of PVs users visit to avoid slow loading. Please use CDN acceleration to accelerate static resources. The second point is that dynamic data should be stored in redis and other nosql, which can speed up data loading. Third, the occupied inventory only occurs during the group purchase phase (when clicking to buy, or when paying). This needs to be considered. Of course, in general, I think it is better to take inventory after payment. Because this link is not good enough for the server or a single server can reduce the risk of concurrency Considering the concurrency issue, it is of course better to save it in nosql when calculating whether there is still inventory on the day. When the degree of concurrency is too high, nosql may not be able to process a large amount of concurrent data in a timely manner , this requires queue discipline, and then asynchronously returns data to the user. You may need to find corresponding information online~~~
Group buying will cause large concurrency problems. Considering the number of concurrencies per second or tens of thousands, then simply writing and reading through the database is definitely not enough.
First, consider the number of PVs users visit to avoid slow loading. Please use CDN acceleration to accelerate static resources.
The second point is that dynamic data should be stored in redis and other nosql, which can speed up data loading.
Third, the occupied inventory only occurs during the group purchase phase (when clicking to buy, or when paying). This needs to be considered. Of course, in general, I think it is better to take inventory after payment. Because this link is not good enough for the server or a single server can reduce the risk of concurrency
Considering the concurrency issue, it is of course better to save it in nosql when calculating whether there is still inventory on the day. When the degree of concurrency is too high, nosql may not be able to process a large amount of concurrent data in a timely manner , this requires queue discipline, and then asynchronously returns data to the user. You may need to find corresponding information online~~~
ecshop Xiaojingdong brings this, it can be downloaded online, just refer to it