-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[pulsar-broker] Make load-balancer config dynamic for the runtime tuning #13074
Conversation
@rdhabalia:Thanks for your contribution. For this PR, do we need to update docs? |
@@ -1722,6 +1723,7 @@ | |||
|
|||
@FieldContext( | |||
category = CATEGORY_LOAD_BALANCER, | |||
dynamic = true, | |||
doc = "load balance load shedding strategy" | |||
) | |||
private String loadBalancerLoadSheddingStrategy = "org.apache.pulsar.broker.loadbalance.impl.OverloadShedder"; |
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.
It seems this loadBalancerLoadSheddingStrategy
is used on broker start, dynamic won't take effect.
Please check if all these configs are only used on broker start up.
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.
we would like to change config without deploying new code and dynamic config helps in that case. for a safe deployment we would like keep existing config, change config dynamically and do process restart without redeploying new code. so, this is an intentional code change.
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.
I get your point. But is a little confusing, if we just mark it dynamic, but we need to restart to make it take effect.
Most importantly, we need to tell the difference that which of these dynamic configs need broker restart, and which ones don't.
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.
yes, we can add into doc. I will add it.
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.
done
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.
Only loadBalancerLoadSheddingStrategy needs restart? Have you checked others?
@rdhabalia can you please give me some pointers about how "dynamic" works ? |
@eolivelli dynamic config provides a way to change broker-config value dynamically using admin-api and it also persists those changed values and applies them on broker server startup. this feature is useful when you want to tune broker at runtime or experiment any value without deploying new release of changes. |
ping. |
I think it's a common require and we can add this as default feature for most of the configs. |
I think we kept most of them dynamic which are required. |
ping. can someone please review the PR? |
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.
+1
…ing (apache#13074) * [pulsar-broker] Make load-balancer config dynamic for the runtime tuning * add doc for dynamic restart
@momo-jun is doc updated for this PR? Can you help check? Thanks |
Motivation
There are a few load balancer config that requires tuning at runtime without restarting the broker. so, mark those configs dynamic so, admin can tune them based on cluster requirements.