I have a set of unique values, and I want to give each request one of those.
Each value may only be distributed once. The order is not important. I'm looking for a good tool to do this.
I've been thinking about using MySQL with SELECT .. LIMIT 1 FOR UPDATE
. Works, is there a way to select an unlocked row instead of waiting for the first lock the release?
I have tried using rabbitmq, registering each request as a consumer consuming just one message, but this method is slow. Taking almost a second over WAN.