-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add configurable warm up for remote datacenter connections #1198
Conversation
Previously, only local datacenter connections could be prewarmed in the router. This adds a new config to allow prewarming remote datacenter connections. This could be useful in deployments where cross-DC requests are likely.
Codecov Report
@@ Coverage Diff @@
## master #1198 +/- ##
=========================================
Coverage 83.62% 83.62%
Complexity 57 57
=========================================
Files 6 6
Lines 348 348
Branches 38 38
=========================================
Hits 291 291
Misses 45 45
Partials 12 12 Continue to review full report at Codecov.
|
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.
|
||
/** | ||
* The percentage of {@link RouterConfig#routerScalingUnitMaxConnectionsPerPortSsl} or | ||
* {@link RouterConfig#routerScalingUnitMaxConnectionsPerPortPlainText} to warm up for data nodes in the local |
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.
The comments for routerConnectionsRemoteDcWarmUpPercentage need to be changed perhaps!
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.
fixed!
routerConnectionsLocalDcWarmUpPercentage = | ||
verifiableProperties.getIntInRange("router.connections.local.dc.warm.up.percentage", 25, 0, 100); | ||
routerConnectionsRemoteDcWarmUpPercentage = | ||
verifiableProperties.getIntInRange("router.connections.remote.dc.warm.up.percentage", 0, 0, 100); |
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.
Should the default value be 25 here? We are setting default in the declaration decorator to 25.
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.
ah thanks for catching that. The default should be 0 since I feel that warming up cross DC connections only applies to specific ambry use cases, but I will fix the decorator.
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!
Previously, only local datacenter connections could be prewarmed in the
router. This adds a new config to allow prewarming remote datacenter
connections. This could be useful in deployments where cross-DC requests
are likely.