Skip to content
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

API for setting RPS limits for activity tasks dispatch #6758

Open
Shivs11 opened this issue Nov 5, 2024 · 2 comments
Open

API for setting RPS limits for activity tasks dispatch #6758

Shivs11 opened this issue Nov 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Shivs11
Copy link
Member

Shivs11 commented Nov 5, 2024

Is your feature request related to a problem? Please describe.
Currently, users are able to control the activity task dispatch RPS (rate per second) as a configuration option before instantiating a worker. After a worker has started and polls for tasks, this RPS value can only be changed by re-deploying the workers. This has proved to be a pain-point for some users

Describe the solution you'd like
I shall be working on implementing an API which shall allow customers to set this RPS limit. My implementation shall also prevent re-deploying of new/existing workers for changing the RPS value.

Describe alternatives you've considered
NA - This seems to be a good solution to solve the problem at hand.

Additional context
This is how customers set this limit, as of today:

w := worker.New(c, "hello-world", worker.Options{
		TaskQueueActivitiesPerSecond: 100, // default value: 100K
	})
@Shivs11 Shivs11 added the enhancement New feature or request label Nov 5, 2024
@Shivs11 Shivs11 self-assigned this Nov 5, 2024
@spsoto
Copy link

spsoto commented Nov 6, 2024

What happens to TaskQueueActivitiesPerSecond when the value is set via API? Does it get it ignored?

@Shivs11
Copy link
Member Author

Shivs11 commented Nov 7, 2024

The idea is that the API set values would have the highest preference for these limits. So yes, TaskQueueActivitiesPerSecond will be ignored if you would have set a value using the API. This will effectively stop/remove the flapping behaviour thats present with the worker option.

Care will also be taken to have an "unset" feature for the API for those users who prefer to use the worker option as a way for setting the API limit. In that case, when unsetting is done, the value will be set the way it's being set as of today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants