Skip to content

Implementing request timeout support to ensure when things like network stall the socket or the ZooKeeper server instance freezes close and reconnect is attempted#16

Open
robskillington wants to merge 10 commits intoalexguan:masterfrom
robskillington:master
Open

Implementing request timeout support to ensure when things like network stall the socket or the ZooKeeper server instance freezes close and reconnect is attempted#16
robskillington wants to merge 10 commits intoalexguan:masterfrom
robskillington:master

Conversation

@robskillington
Copy link
Copy Markdown

No description provided.

Rob Skillington added 2 commits February 20, 2014 23:48
…ike network stall the socket or the ZooKeeper server instance freezes
@robskillington
Copy link
Copy Markdown
Author

@alexguan hey - the lack of request timeout is causing several issues using the library on our team, our callbacks never get called with failure events until a very long time after a connection stalls or process freezes.

I have tested this fix extensively with things like stalling the network and freezing the server instance and it seems to be very robust for our use case, thought it would be good to see if you would like to include in the core library.

@alexguan
Copy link
Copy Markdown
Owner

I will take a look at this this weekend.

@robskillington
Copy link
Copy Markdown
Author

Thanks mate!

@robskillington
Copy link
Copy Markdown
Author

@alexguan any thoughts?

@alexguan
Copy link
Copy Markdown
Owner

Thanks for the PR, I'm investigating the current Java implementation to see if there is any existing solutions to this timeout issue.

@robskillington
Copy link
Copy Markdown
Author

@alexguan any results from your investigation? I had to ship with a private build of this unfortunately and would love to have it in the mainline. I actually updated this PR to default to no requestTimeout (use boolean false) so this PR will not affect existing users out there. I'd love to have a 1:1 conversation some time about your thoughts on this, over IM or voice - its a feature I think that this client really desperately needs for production use.

@alexguan
Copy link
Copy Markdown
Owner

Sorry Rob, traveling in Japan now, I will try to have a solution this week.

@robskillington
Copy link
Copy Markdown
Author

@alexguan hope Japan was fun! Any thoughts/word?

…connecting under heavy network IO load - should keep trying to reconnect
@robskillington
Copy link
Copy Markdown
Author

I updated the expiry disconnect behavior just now by the way to retry on session expiry which can happen when reconnecting under heavy network IO load - should keep trying to reconnect.

We have had issues in our perf testing where this would occur and the client would be dead in the water and stop trying to reconnect.

@robskillington
Copy link
Copy Markdown
Author

@alexguan care to weigh in?

Comment thread lib/ConnectionManager.js Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct way to handle session expire is to create a new session and should handle by the client instead of the library.

Could you explain why you want to retry here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, considering the retry logic I had assumed that the client was intended for indefinite retry/long lived persistent connections.

No problems, can revert this change and then create a new client class if we want to reconnect with a new session?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main point is that the session expire should not be handled by the client library but application logic, since only application knows what's the correct action for a session expire event. You don't want to hide it from the client.

@robskillington
Copy link
Copy Markdown
Author

Sure thing. I'll revert this tonight, just out at dinner atm :)

@mosnicholas
Copy link
Copy Markdown

This is stopping me as well, @alexguan can this PR be merged?

Thanks

@estliberitas
Copy link
Copy Markdown

@alexguan +1 to @mosnicholas since druid-query depends on your module.

P.S.: are you still interested and have time for this project?

@alexguan
Copy link
Copy Markdown
Owner

alexguan commented Dec 4, 2014

I'm investigating the current Java client implementation to make sure the connection timeout is handled in the same manner.

@estliberitas
Copy link
Copy Markdown

So? 😉 @alexguan

@estliberitas
Copy link
Copy Markdown

@alexguan ?

@schulzetenberg
Copy link
Copy Markdown

+1

@samypr100
Copy link
Copy Markdown

samypr100 commented Aug 17, 2016

@alexguan
When is this going to be added???

@estliberitas
Copy link
Copy Markdown

@alexguan no, never? 😛

@ecasilla
Copy link
Copy Markdown

ecasilla commented Apr 7, 2017

It seems like this project is no longer maintained

@perseus086
Copy link
Copy Markdown

Please merge the PR

@montaro
Copy link
Copy Markdown

montaro commented Dec 13, 2017

Bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants