Databases

order_id PRIMARY KEY AUTO INCREMENT

Some time back, I had a system design interview. One of the questions that I was asked was: “How would you assign unique IDs in a distributed event processing system.” I proposed UUIDv7, however the interviewer didn’t agree. Then I suggested Snowflakes but nah, he didn’t like that either. After the interview, I did a deep dive in Distributed Sequencers and: 1. I discovered the correct answer is Vector Clocks.