You may have a key called user:id , which will be the number you increment to get new identifiers. In your case, you can set the initial value to 1000:
SET user:id 1000
Then, using INCR , you can get a new identifier for the following user:
INCR user:id
Depending on the language you are using, there may already be some tools to solve this problem. I would recommend you check out Ohm or one of the ports .
source share