-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
sidecar: increase MaxIdleConnsPerHost or allow it to be configured #1953
Comments
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
2 tasks
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
blockloop
added a commit
to blockloop/thanos
that referenced
this issue
Jan 8, 2020
Signed-off-by: Brett Jones <blockloop@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The thanos sidecar is mounted to a single Prometheus instance where it establishes an HTTP connection for queries against that machine. It's using the
http.DefaultTransport
when connecting to that client which hasMaxIdleConnsPerHost
set to 2 by default see DefaultMaxIdleConnsPerHost. We run a large, heavily used cluster and we're receiving about 1.7k queries per second from some machines. Because of this load we are constantly over the connection pool limit so new connections are being established and destroyed. This causes our machines to run low on ports since each connection sits in a TIME_WAIT state for 60s, consuming a port.Since the connection pool size depends entirely on the setup I think there should be a flag to allow us to run sidecar with custom connection pool size. Perhaps
--prometheus.connection-pool-size
?Here are some examples showing the TIME_WAIT connections being created in excess in the second example: https://tleyden.github.io/blog/2016/11/21/tuning-the-go-http-client-library-for-load-testing/
This graph shows HTTP requests between sidecar and Prometheus on our machines.
The text was updated successfully, but these errors were encountered: