Multi-tenant strategy for throttling

Hello there,
I’ve been using Tempral workflow engine for the last couple of year and become a big fan of this infrastructure.
Recently I’ve came a cross a design challenge that I hope this community could assist me with:
The system I’m working on is a go based, micro-services application that have few hundreds accounts. In order to protect accounts from “noisy neighbours” we would like to implement throttling on the account level: configure for each account maximum concurrency level or maximum calls per minutes.
I know it is possible to configure temporal task queues with this limitations, but to my understanding that would require also configuring an activity worker per task queue and that will make the deployment much more complex and expensive.
Is there a way to configure an activity worker to listen to multiple queues (about a hundred each)?
Is there a suggested way to implement large amount of accounts without deploying a worker for each task queue ?

Thanks,
Ron

Task queue throttling slows down the execution of activities to the desired rate. But it doesn’t limit the number of requests and parallelism of workflows and activities.

Currently Temporal supports throttling limits per namespace only. If you want to go more fine graned I would recommend using a separate system that you put in front of Temporal to throttle RPC requests to it. Another option is to implement your own interceptor in the Temporal frontend that rejects requests based on the customer limits.

2 Likes

Any plans to implement per-customer/tenant/key based rate limiting feature? Thanks

We are considering implementing this, but not ETA.

1 Like