M
M
martensit2019-08-30 15:03:50
Computer networks
martensit, 2019-08-30 15:03:50

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

1 answer(s)
I
Inviz Custos, 2019-08-30
@martensit

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 question

Ask a Question

731 491 924 answers to any question