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

Limit simultaneous connections #316

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gasinvein
Copy link
Collaborator

Should prevent some of the issue similar to #315.

Comment on lines +79 to +80
conn_limit_per_host: int = 5
conn_limit: int = 50
Copy link
Collaborator Author

@gasinvein gasinvein Jul 19, 2022

Choose a reason for hiding this comment

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

@nanonyme IIRC you were the one who previously suggested to limit simultaneousl connections to prevent upstreams from throttling us. Does this seem like a reasonable default?

Choose a reason for hiding this comment

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

@gasinvein in general you're better off having one connection per backend and using HTTP keepalive. TLS handshakes are slow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm afraid 1 connection per host will be way too slow: in many apps, there are several sources from GitHub.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 92.447% when pulling ac42cbf on gasinvein/limit-connections into 77eac1e on master.

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.

3 participants