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

Make the max Dial concurrency limit configurable #507

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@erikdubbelboer
Copy link
Collaborator

erikdubbelboer commented Jan 4, 2019

Fixes #478

@erikdubbelboer erikdubbelboer requested a review from kirillDanshin Jan 4, 2019

@erikdubbelboer

This comment has been minimized.

Copy link
Collaborator

erikdubbelboer commented Jan 4, 2019

@kirillDanshin any thoughts on this?

Show resolved Hide resolved tcpdialer.go Outdated
@kirillDanshin
Copy link
Collaborator

kirillDanshin left a comment

I don't like const version, but I don't like global limits either. 👍 on the @valyala suggestion.

@erikdubbelboer erikdubbelboer force-pushed the dialconcurrency branch from cd6aa1b to 5ef6811 Jan 15, 2019

@erikdubbelboer

This comment has been minimized.

Copy link
Collaborator

erikdubbelboer commented Jan 15, 2019

@valyala @kirillDanshin please check my latest changes.

@erikdubbelboer

This comment has been minimized.

Copy link
Collaborator

erikdubbelboer commented Jan 15, 2019

There are no tests for the dialer because it's quite hard to test something like this. Instead I have been running this code in production for the last couple of days and it has been stable and working exactly like the old code.

// * foobar.baz:443
// * foo.bar:80
// * aaa.com:8080
func (d *TcpDialer) Dial(addr string) (net.Conn, error) {

This comment has been minimized.

@kirillDanshin

kirillDanshin Jan 16, 2019

Collaborator

Oops, didn't notice — I think we should use TCPDialer instead of TcpDialer. That's a common abbreviation.

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