Interview glossary / Tech team vocabulary
Idempotency
Also called: Idempotent · Idempotency key
A property of an operation that has the same effect whether it runs once or many times. It makes retries safe, for example for payments.
Networks fail and clients retry. If "charge the card" runs twice, the customer pays twice, unless the operation is idempotent. A common pattern is an idempotency key: the client sends a unique id, and the server ignores repeats of the same id.
In an interview
Bring it up whenever a design involves retries, queues or webhooks, and say how you would implement it.
Related terms
Interview questions that use it
- The interviewer asks: “When do you use GET versus POST?” Strongest answer?
- The interviewer asks: “Which HTTP methods are safe to retry, and why?” Strongest answer?
- The interviewer asks: “PUT versus PATCH?” Strongest answer?
- The interviewer asks: “A downstream HTTP call timed out. Do you retry?” Strongest answer?
- A RabbitMQ consumer acknowledges each message as soon as it arrives and then processes it. Messages go…
- The interviewer asks: “Your queue consumer ran twice for the same message. What do you do?” Strongest answer?
- What do you tell them, and what does it force on your code?
- The interviewer asks: “How do you publish an event only if the order row actually committed?” Strongest…
← Hypothetical question · All terms · Illegal interview questions →