Home  >  Article  >  Backend Development  >  How to deal with concurrent ticket grabbing in 12306?

How to deal with concurrent ticket grabbing in 12306?

WBOY
WBOYOriginal
2016-09-29 09:19:101124browse

The company has a business of grabbing orders, which needs to be implemented on the website.

The solution I designed myself would like to ask everyone if it is feasible. If not, is there a more mature solution?

My plan: After the request comes in, first determine whether the current time is within the order grabbing time. If so, modify the order grabbing person id in the cache, indicating that the order was grabbed by the order grabbing person, and then modify the order grabbing allowed time to false.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn