This service is a remote session pool. I need to ask for a session to work with other services. In most cases, this pool will have a session available, so in 15ms I will have a response. But sometimes, it will need to create a session on demand, requiring up to 800ms to create it.I have two options in mind to handle this situation:To set a 15ms timeout, and to implement a retry policy up with an exponential back off until 800ms. This service will create the required session no matter whether I am connected to it.To set a 800ms timeout, and to keep connected to the service until a session is available for me.In both cases, there's no guarantee that I will have a session after 800ms.Which are the pro/cons for each option?
Which timeout should I set to an external service?
api;rest