-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[New Scheduler]Implement FPCEntitlementProvider #5029
[New Scheduler]Implement FPCEntitlementProvider #5029
Conversation
@@ -75,6 +75,9 @@ trait LoadBalancer { | |||
|
|||
/** Gets the size of the cluster all loadbalancers are acting in */ | |||
def clusterSize: Int = 1 | |||
|
|||
/** Gets the throttling for given action. */ | |||
def checkThrottle(namespace: EntityPath, action: String): Boolean = false |
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 would be great if you share how this will work in a new load balancer.
loadBalancer.checkThrottle(user.namespace.name.toPath, res.fqname) | ||
} | ||
if (checks.contains(true)) { | ||
Future.failed(RejectRequest(TooManyRequests, "Too many requests")) |
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.
Does this need to be consistent with the other throttling rejections where it differentiates between per minute and concurrent?
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.
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.
So now we only have one throttling limit that is the number of concurrent containers.
@@ -153,7 +153,7 @@ protected[core] abstract class EntitlementProvider( | |||
activationThrottleCalculator(config.actionInvokeConcurrentLimit.toInt, _.limits.concurrentInvocations)) | |||
|
|||
private val messagingProvider = SpiLoader.get[MessagingProvider] | |||
private val eventProducer = messagingProvider.getProducer(this.config) | |||
protected val eventProducer = messagingProvider.getProducer(this.config) |
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.
does this get used later? I don't see where this is needed in the child
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.
oh, there was one metric for throttling in FPCEntitlementProvider, I will add that
LGTM |
@style95 @bdoyle0182 below is a brief introducation for throttling in new scheduler: new scheduler is using a different throttling logic, it doesn't consider the per minute and concurrent limitations :
when any throttle is enabled, scheduler will save it into ETCD, and the And for an incoming activation, the
|
Very happy to hear about the new throttling mechanism. Will the throttles remain configurable per namespace? |
yes, we can configure that for each namespace |
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
Implement a FPCEntitlementProvider
Description
A new FPCEntitlementProvider for scheduler:
Since the new scheduler is using different throttler logic, so this PR is created
Related issue and scope
My changes affect the following components
Types of changes
Checklist: