zzzming opened a new issue #190: retry/backoff configuration and timeout 
configuration in seconds
URL: https://github.com/apache/pulsar-client-go/issues/190
 
 
   #### Expected behavior
   The client connect retry and backoff should be configurable and working 
correctly. I suggest to use exponential backoff and a default number of retries 
for any transient fault that can be configurable.
   
   There are papers to discuss exponential backoff algorithm and 3rd party  
golang backoff library (i.e. cenkalti/backoff) for reference.
   
   #### Actual behavior
   The backoff and retry mechanism currently is specified in non-configurable 
fashion
   1. Min and max back off time is specified at
   
https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/backoff.go#L30
   2. Back off step up is always doubled the previous back off
   
https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/backoff.go#L37
   
   It takes total 11 retries in the non-configurable retry. This is too many 
and retries too close to one another.
   
   3. To make things more complicated, the client connection time out is also 
determined by this line
   
https://github.com/apache/pulsar-client-go/blob/master/pulsar/internal/rpc_client.go#L117
   
   The evaluation is against the requestTimeout and the last backoff wait time. 
I think the requestTimeout 
   
   4. Another issue is that OperationTimeout and RequestionTimeout under 
ClientOption is in nanosecond. This should be `second` as document describes.
   
https://github.com/apache/pulsar-client-go/blob/master/pulsar/client_impl.go#L90
   
   #### Steps to reproduce
   
   Described ^
   
   #### System configuration
   **Pulsar version**: 2.5.0
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to