forked from dork/tarantool-java
-
Notifications
You must be signed in to change notification settings - Fork 19
Apply connection timeout for each connect attempt #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
nicktorwald
added a commit
that referenced
this issue
Apr 24, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
Apr 24, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
Apr 24, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
May 13, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
May 14, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
May 15, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
nicktorwald
added a commit
that referenced
this issue
May 15, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
Totktonada
pushed a commit
that referenced
this issue
May 16, 2019
Relax a socket provider contract. Now socket provider can throw a transient error and the client will try to obtain a socket again instead of being closed. Make built-in socket providers configurable. Now the client can set retries count and connection timeout for providers. Update README doc im scope of new socket provider contract. Closes: #167 Follows on: #144
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now TarantoolClientImpl (SingleSocketChannelProviderImpl) and TarantoolClusterClient (RoundRobinSocketProviderImpl) treats connection timeout as a time to successful connection despite attempts amount. When a user set connection timeout based on known network properties (say, based on rtt within a data center) it should be applied to one connection attempt.
It is possible that a user want to restrict overall time to connect to, say, fit its SLA. I think this should be controlled by a separate option.
Retries count in case of cluster client should be applied to one instance attempts I think.
I would also think whether we can pass this via configuration (and so a client should be able to pick up a default socket provider).
All this behaviour should be properly documented in README. Also I would replace the example with user-defined socket provider with an example that uses SingleSocketChannelProviderImpl.
It seems that this will not change behaviour of TarantoolClientImpl, because we don't provide built-in socket provider in the previous release.
This proposal changes user-visible behaviour of the cluster client. However it makes things a way more clear, so I guess it worth to do.
Requested by @akudiyar in PR #144.
The text was updated successfully, but these errors were encountered: