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

Add option to cache connections within each agent #16

Merged
merged 1 commit into from
Sep 9, 2016

Conversation

mleinart
Copy link

@mleinart mleinart commented Sep 6, 2016

New option, -cache_connections (up for better naming suggestions).

Behavior

When specified on the commandline, causes each agent to keep a persistent TCP connection open to the target Carbon instance

Use case

Connection management can be a significant overhead of Carbon. Many clients (e.g. the latest versions of collectd's write_graphite plugin) purposely keep TCP connections open for this reason. Haggar should be able to simulate both clients with persistent connections and transient connections

Testing

Ran haggar with and without -cache_connections specified. Verified via netstat that connections remain open when the option is specified and are closed each time when not.
With -cache_connections specified, verified that when carbon is restarted, connection is reestablished once a send fails

@gorsuch
Copy link
Owner

gorsuch commented Sep 9, 2016

This is great! thank you.

@gorsuch gorsuch merged commit 113edc6 into gorsuch:master Sep 9, 2016
@obfuscurity obfuscurity mentioned this pull request Sep 15, 2016
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.

2 participants