Idempotence
What is idempotence?
Idempotence is the property of certain operations in mathematics and computer science that can be applied multiple times without changing the result beyond the initial application

Get charget multiple times

client request -> service A. If service A response on time, there is no problem But what if that service doesn't reply in a specific time, client keep retrying and make post request. So the backend must implement idempotency
Solution1 : Client create oder ID and request the same ID if the request failed
Solution 2: Hashing the content of the request
Avoid Replica databases, stick to master
A duplicate payment created as a result from replica lag

Duplicate payment avoided by storing idempotency information only on master

Handling Exceptions โ To Retry or Not to Retry?
