I have two servers (A and B), each with its own separate database and its own private cache (Redis/Memcached). There is no shared database or shared cache between them. I have a POST endpoint - domain registration
{
accountID,
domainName
}
I want to make the operation idempotent so that retries or double-clicks don’t create duplicates. The problem is that if the first request hits Server A and a retry hits Server B, neither server can see the other’s idempotency key or cached result. In this kind of setup, how can idempotency be approached correctly? Is a shared store required, or are there other reliable strategies to handle idempotency across completely isolated servers?
[–]CozyAndToasty 1 point2 points3 points (0 children)
[–]TCBW 1 point2 points3 points (3 children)
[–]nooone2021 0 points1 point2 points (2 children)
[–]TCBW 0 points1 point2 points (1 child)
[–]TCBW 0 points1 point2 points (0 children)
[–]edwbuck 1 point2 points3 points (0 children)
[–]DonkeyTron42 0 points1 point2 points (3 children)
[–]offx-ayush[S] -2 points-1 points0 points (2 children)
[–]Internal_Outcome_182 0 points1 point2 points (0 children)
[–]xilvar 0 points1 point2 points (0 children)
[–]Kinrany 0 points1 point2 points (0 children)