Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Maximum outbound connections #28

Open
Stebalien opened this issue Dec 18, 2018 · 2 comments
Open

Maximum outbound connections #28

Stebalien opened this issue Dec 18, 2018 · 2 comments

Comments

@Stebalien
Copy link
Member

Given @raulk's dialer refactor, it should be pretty easy to plug-in a connection rate-limiter that blocks dialing if we have too many open connections.

The tricky part here will be not degrading service. We'll have to kill connections to get out of the way of new ones but that's going to be tricky...

@raulk
Copy link
Member

raulk commented Dec 20, 2018

Yeah, this would be a Preparer component that rejects the dial outright based on some criteria. It's not clear to me from the title if the idea is to limit outbound connections to a max by assigning in/out quotas, or if this it's simpler and we just want to block new attempts when the conn manager is maxed out.

Regardless, we could easily make the component take a predicate over a Conn slice.

@Stebalien
Copy link
Member Author

if this it's simpler and we just want to block new attempts when the conn manager is maxed out.

This is mostly what I'm suggesting. At the end of the day, we don't really care who started the connection (except in rare cases). It's just easier to control outbound connections.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants