Skip to content

Conversation

MasterPtato
Copy link
Contributor

Changes

@MasterPtato MasterPtato requested a review from NathanFlurry June 17, 2025 00:28
Copy link
Contributor Author

MasterPtato commented Jun 17, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 client field to ServiceDiscovery struct 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

Ok(client
async fn fetch_inner(&self) -> Result<ProvisionDatacentersGetServersResponse, reqwest::Error> {
Ok(self
.client
.get(self.fetch_endpoint.clone())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link

cloudflare-workers-and-pages bot commented Jun 17, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3abbbbc
Status: ✅  Deploy successful!
Preview URL: https://0ea1e4de.rivet.pages.dev
Branch Preview URL: https://graphite-base-2475.rivet.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Jun 17, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link

cloudflare-workers-and-pages bot commented Jun 17, 2025

Deploying rivet-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3abbbbc
Status:🚫  Build failed.

View logs

@MasterPtato 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 MasterPtato changed the base branch from graphite-base/2621 to 06-16-fix_add_cache_to_server_list_queries June 19, 2025 01:32
@MasterPtato MasterPtato force-pushed the 06-17-fix_make_service_discovery_use_a_single_client branch from 3abbbbc to a246cb7 Compare June 20, 2025 19:09
@MasterPtato MasterPtato force-pushed the 06-16-fix_add_cache_to_server_list_queries branch from 5d622b5 to 0e85267 Compare June 20, 2025 19:09
Copy link
Contributor

graphite-app bot commented Jun 20, 2025

Merge activity

  • Jun 20, 7:19 PM UTC: MasterPtato added this pull request to the Graphite merge queue.
  • Jun 20, 7:21 PM UTC: CI is running for this pull request on a draft pull request (#2630) due to your merge queue CI optimization settings.
  • Jun 20, 7:22 PM UTC: Merged by the Graphite merge queue via draft PR: #2630.

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 graphite-app bot closed this Jun 20, 2025
@graphite-app graphite-app bot deleted the 06-17-fix_make_service_discovery_use_a_single_client branch June 20, 2025 19:22
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.

1 participant