-
Notifications
You must be signed in to change notification settings - Fork 237
feat: max connection age #1811
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
feat: max connection age #1811
Conversation
The latest Buf updates on your PR. Results from workflow Buf Proto / buf (pull_request).
|
Claude finished @litt3's task —— View job Nitpicker PR ReviewUsed the nitpicker subagent to review this PR. Here is the verbatim output: Todo List:
Now I have a complete picture of the changes made. Let me provide a comprehensive code review: Code Review: Max Connection Age FeatureOverviewThis PR implements max connection age configuration for both relay servers and API servers to prevent clients from being stuck with a small subset of servers after scaling up. The implementation uses gRPC's built-in keepalive functionality. Detailed Findings1. Code Correctness and Potential Bugs✅ Generally correct implementation - The code properly integrates gRPC keepalive parameters.
2. Security Considerations✅ No immediate security issues identified
3. Performance Implications✅ Good performance design
4. Configuration Management✅ Consistent configuration pattern across both services
5. Code Style and Maintainability✅ Good consistency between relay and disperser implementations
6. Error Handling✅ No new error paths introduced - uses existing gRPC error handling 7. Testing Considerations❌ Critical Gap - No Tests The PR lacks:
Recommended test additions: func TestMaxConnectionAgeConfig(t *testing.T) {
// Test zero values
// Test negative values
// Test grace period >= max age
// Test successful parsing
}
func TestKeepaliveConfiguration(t *testing.T) {
// Integration test to verify gRPC server accepts keepalive params
} 8. Documentation Needs
9. Architecture and Consistency✅ Excellent consistency - Both relay and disperser implementations follow identical patterns:
10. Specific Code Issuesdisperser/server_config.go:20-21: Comment refers to "MaxConnectionAgeSeconds" but field is named "MaxConnectionAge" relay/config.go:83: Same comment inconsistency Overall AssessmentStrengths:
Critical Issues to Address:
Recommendation: The implementation is functionally sound but needs testing and validation improvements before merge. The core functionality appears correct for the stated goal of preventing client stickiness to scaled-down server pools. Risk Level: Medium - mostly due to lack of tests and validation, not fundamental implementation issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why are these changes needed?
For both the relays and API servers, enforce a maximum connection age. The goal of this change is to ensure that clients aren't stuck talking to a small subset of relays/API servers after the number of those servers has been increased.
I will not merge this PR until it has been tested on preprod.