Answer the question
In order to leave comments, you need to log in
How is the client guaranteed to know that the response has reached the server?
The client sends a GET request to the server.
The server receives it, performs a certain operation, and sends a response that the request has been received and the operation has been completed.
But let's say there is a short network drop while the request flies to the server, or when the server's response flies to the client.
As a result, the client sent a request to the server and received no response. "timeout expired".
How can the client know for sure whether the desired operation was performed on the server or not?
You can, of course, resend this request, but then the operation can be performed twice, and we don’t need this either.
Answer the question
In order to leave comments, you need to log in
For such operations, use unique request IDs.
And on the server, add the appropriate validation logic to weed out requests with duplicate IDs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question