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 persistent connections (aka HTTP/1.1 Keep-Alive) #39

Closed
clue opened this issue Sep 3, 2015 · 2 comments
Closed

Support persistent connections (aka HTTP/1.1 Keep-Alive) #39

clue opened this issue Sep 3, 2015 · 2 comments

Comments

@clue
Copy link
Member

clue commented Sep 3, 2015

Refs #5

@clue clue self-assigned this Sep 6, 2018
@clue clue changed the title Implement keep-alive connections Support persistent connections (aka HTTP/1.1 Keep-Alive) Sep 6, 2018
@clue
Copy link
Member Author

clue commented Sep 6, 2018

Small progress update: I've started working on this a while back and actually have a working prototype. The implementation is actually quite simple: Once a complete response is received, put the now idle connection into a list of idle connections. If a new outgoing request is to be sent, check if one idle connection to this destination already exists. After a very short grace period (defaults to a millisecond or so, possibly configurable), close the connection if no new outgoing request is sent.

This way, consumers of this library do have to take care of this feature. Also, by using a very short grace period, the loop does not keep running noticeably longer than without this feature. This doesn't matter for long running scripts, but it's important for short running scripts to not appear to be "blocked".

The implementation depends on proper message boundary detection, as such it is currently blocked by #136.

@clue
Copy link
Member Author

clue commented Jul 12, 2020

I have to close this one as per #152 now that future development will focus on https://github.com/reactphp/http instead.

I've migrated this ticket to reactphp/http#39.

@clue clue closed this as completed Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant