Skip to content

Conversation

@youngyjd
Copy link
Collaborator

@youngyjd youngyjd commented Dec 8, 2025

What changes were proposed in this pull request?

Added configurable HTTP connection pool settings for Gravitino Java client:

  • New configs: gravitino.client.maxConnections and gravitino.client.maxConnectionsPerRoute (default: 200)
  • Updated HTTPClient to configure connection manager with these settings
  • Updated GravitinoLanceNamespaceWrapper to pass client configs to GravitinoClient
  • Added comprehensive unit tests (9 tests total across configuration and integration)

Why are the changes needed?

Apache HttpClient 5.x defaults to only 25 total connections and 5 per route, causing severe bottlenecks in high-throughput scenarios. With Lance REST server running 800 threads, requests queue for connections, resulting in P99 latency of 4 seconds.

Fix: #(issue)

Does this PR introduce any user-facing change?

Yes - Adds two new optional configuration properties:

  • gravitino.client.maxConnections - Max total HTTP connections (default: 200, previously 25)
  • gravitino.client.maxConnectionsPerRoute - Max connections per destination (default: 200, previously 5)

For Lance REST server users: Add these configs to gravitino-lance-rest-server.conf to tune performance.
Performance improvement: Default configuration now provides 8x more connections, significantly reducing latency out-of-the-box.

How was this patch tested?

  • Added 5 unit tests in TestGravitinoClientConfiguration (defaults, custom values, validation, integration)
  • Added 4 unit tests in TestHTTPClient (connection manager configuration, high-throughput scenarios)
  • Added 6 unit tests in TestGravitinoLanceNamespaceWrapper (property extraction, filtering, edge cases)

@youngyjd youngyjd force-pushed the introduce-http-connection-configs branch from 0ade864 to c42dc39 Compare December 8, 2025 22:55
update client initialization
@youngyjd youngyjd force-pushed the introduce-http-connection-configs branch from 245ab3e to acce6a2 Compare December 9, 2025 06:33
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