-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Issue: Inefficient gRPC Connection Management in Rewrap Requests
Current Behavior
- A new gRPC Client Connection is created for every rewrap request
- Each connection creation involves:
- New TCP handshake
- DNS resolution
- Connection setup/teardown
- Performance impact: ~40ms overhead per request spent on connection creation
- Primary bottleneck identified: repetitive DNS resolution
Expected Behavior
- Implement connection pooling to reuse existing connections
- Maintain persistent connections for frequently accessed endpoints
- Handle connection lifecycle efficiently
Impact
- Reduced latency per request
- Better resource utilization
- Improved overall performance
Proposed Solution
Implement a connection pool that:
- Caches and reuses connections based on endpoints
- Handles connection lifecycle (creation, reuse, cleanup)
- Provides thread-safe access to shared connections
Metrics
- Current overhead: ~40ms per request
- Expected improvement: Eliminate connection creation overhead for subsequent requests