Home > Article > Backend Development > How to deal with concurrent ticket grabbing in 12306?
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.