Ericsson / libpaf

Pathfinder service discovery client library
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Conditional retry policy #1

Open m-ronnblom opened 4 years ago

m-ronnblom commented 4 years ago

The current exponential back-off retry policy is designed with restarted or crashed servers or lost network connectivity in mind.

In case a protocol connection is established, but the initial protocol handshake fails (e.g. due to incompatible protocol versions), the client will retry very quickly. This retry will be successful so far another handshake will be performed, likely with the same outcome. Repeat.

In the face of errors such as above, the client should immediately go to the max configured retry timeout, to avoid excessive server load. One way to classify errors would be to retry quickly with exponential back-off only in the face XCM connectivity issues, and not in errors on the Pathfinder protocol level (e.g. wrong protocol version, not enough versions, permission issues etc).

m-ronnblom commented 1 year ago

Current retry policy will reset to retry interval only if the Pathfinder protocol handshake has completed. This seems like a pretty robust solution, except for errors that repeatedly occurs past that point.