What is Idempotency and Why We Need Itby@ecojuntak
1,401 reads

What is Idempotency and Why We Need It

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Idempotency is a strategy that makes sure an event that executed multiple times will give the same result. For example, GET method is not idempotent because every time you call an endpoint with POST method will create a new record on the database (the database state changes) Backend should have a mechanism to store the unique identifier for each request. Maybe we can use Redis to store it temporarily. Backend receives the request, makes a new transaction, and reduces the user’s balance. But somehow network failure happened and the frontend app does not receive the response.
featured image - What is Idempotency and Why We Need It
Eko Simanjuntak HackerNoon profile picture

@ecojuntak

Eko Simanjuntak

SRE @ Gojek


Receive Stories from @ecojuntak

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!