Repository navigation
fix: make service discovery use a single client - #2621
Closed
MasterPtato wants to merge 1 commit into
Closed
MasterPtato wants to merge 1 commit into
MasterPtato wants to merge 1 commit into
Conversation
Contributor
Author
There was a problem hiding this comment.
PR Summary
Optimizes service discovery by implementing connection pooling through a single reusable HTTP client instead of creating new clients per request in packages/common/service-discovery/src/lib.rs.
- Adds a persistent
clientfield toServiceDiscoverystruct for better connection reuse - Removes redundant client creation from request methods, improving performance
- Centralizes HTTP client configuration and lifecycle management in the constructor
1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile
| async fn fetch_inner(&self) -> Result<ProvisionDatacentersGetServersResponse, reqwest::Error> { | ||
| Ok(self | ||
| .client | ||
| .get(self.fetch_endpoint.clone()) |
There was a problem hiding this comment.
logic: clone() on Url for each request is unnecessary since Client already handles concurrent requests safely. Use &self.fetch_endpoint
Suggested change
| .get(self.fetch_endpoint.clone()) | |
| .get(&self.fetch_endpoint) |
Deploying rivet with
|
| Latest commit: |
3abbbbc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0ea1e4de.rivet.pages.dev |
| Branch Preview URL: | https://graphite-base-2475.rivet.pages.dev |
MasterPtato
force-pushed
the
06-16-fix_add_cache_to_server_list_queries
branch
from
June 17, 2025 00:33
283deec to
5d622b5
Compare
MasterPtato
force-pushed
the
06-17-fix_make_service_discovery_use_a_single_client
branch
from
June 17, 2025 00:33
24b7fef to
3abbbbc
Compare
This was referenced Jun 17, 2025
Deploying rivet-hub with
|
| Latest commit: |
3abbbbc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7e11980a.rivet-hub-7jb.pages.dev |
| Branch Preview URL: | https://graphite-base-2475.rivet-hub-7jb.pages.dev |
MasterPtato
changed the base branch from
06-16-fix_add_cache_to_server_list_queries
to
graphite-base/2621
June 18, 2025 23:47
MasterPtato
changed the base branch from
graphite-base/2621
to
06-16-fix_add_cache_to_server_list_queries
June 19, 2025 01:32
This was referenced Jun 19, 2025
MasterPtato
force-pushed
the
06-17-fix_make_service_discovery_use_a_single_client
branch
from
June 20, 2025 19:09
3abbbbc to
a246cb7
Compare
MasterPtato
force-pushed
the
06-16-fix_add_cache_to_server_list_queries
branch
from
June 20, 2025 19:09
5d622b5 to
0e85267
Compare
Contributor
Merge activity
|
graphite-app Bot
pushed a commit
that referenced
this pull request
Jun 20, 2025
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
graphite-app
Bot
deleted the
06-17-fix_make_service_discovery_use_a_single_client
branch
June 20, 2025 19:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changes