Skip to content
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

Support IDLE_TIMEOUT (client-side) #1719

Closed
ejona86 opened this issue Dec 7, 2017 · 4 comments
Closed

Support IDLE_TIMEOUT (client-side) #1719

ejona86 opened this issue Dec 7, 2017 · 4 comments
Assignees
Labels
P2 Status: Blocked Type: Feature New features or improvements in behavior

Comments

@ejona86
Copy link
Member

ejona86 commented Dec 7, 2017

IDLE_TIMEOUT is defined as a way for clients to drop unused connections after inactivity.

I could not find an API for this in Go. Java has had support since 1.0. Note that in Java, when the IDLE_TIMEOUT is reached, the NameResolver and LB are shutdown, returning the Channel to the same state as initially created. This does cause a nomenclature problem, because there are two levels of IDLEness; we've been calling the shutting down of all IO (NR and LB) "idle mode."

The server-side equivalent is MAX_CONNECTION_IDLE. But both are necessary.

C doesn't support this either (grpc/grpc#13212). It's likely more important for C as it can be very useful on mobile. But it is commonly a better alternative to KEEPALIVE_WITHOUT_CALLS and, since KEEPALIVE_WITHOUT_CALLS is not necessarily permitted, can be necessary.

@dfawley
Copy link
Member

dfawley commented Apr 3, 2019

Note that this needs a solution to #1786 which is about supporting idleness in general.

@stale stale bot added the stale label Sep 6, 2019
@dfawley dfawley removed the stale label Sep 6, 2019
@beef9999
Copy link

beef9999 commented Mar 14, 2020

Looks like I have to add a timer to implement client_idle_timeout by myself.
Also I noticed that gRPC C++ version had already implemented this feature.

Does the server side idle timeout achieve the same results by sending a GOAWAY?

@grpc grpc deleted a comment from stale bot Mar 16, 2020
@ejona86
Copy link
Member Author

ejona86 commented Mar 24, 2020

@beef9999, I don't think C++ has implemented this. I think Java is the only language to have this implemented.

Server-side idle timeout is a bit different, simply because different clients may need different settings and server-side doesn't achieve that. Also, with multiple LB policies (and all the time in grpc-go), when the client receives a GOAWAY it just reconnects.

@dfawley
Copy link
Member

dfawley commented Jul 5, 2023

Fixed by #6263

@dfawley dfawley closed this as completed Jul 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 Status: Blocked Type: Feature New features or improvements in behavior
Projects
None yet
Development

No branches or pull requests

5 participants