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

fix: reuse one http client across different requests #458

Merged
merged 3 commits into from
May 8, 2024

Conversation

viglia
Copy link
Contributor

@viglia viglia commented May 6, 2024

We should always reuse an http client across different requests as they're thread-safe and meant to be reused for better performance (connection pooling).

This will avoid creating a new one (and relative http transport) for each and every requests we make to send metrics.

Not doing this might lead to temporary port exhaustion and degradation of perfomances.

We should always reuse an http client across different requests as
they're thread-safe and meant to be reused for better performance
(connection pooling).

This will avoid creating a new one (and relative http transport) for
each and every requests we make to send metrics.

Not doing this might lead to temporary port exhaustion and degradation
of perfomances.
@viglia viglia requested a review from a team as a code owner May 6, 2024 11:20
@viglia viglia self-assigned this May 6, 2024
@viglia viglia merged commit a99f370 into main May 8, 2024
9 checks passed
@viglia viglia deleted the viglia/ref/reuse-http-client-across-metrics-requests branch May 8, 2024 18:03
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