Throttling Temporal

Hi Team,

Can we throttle temporal how many transactions it can handle? If yes how we can do it and can we do it at temporal namespace level?

@raghudeshu
you can use dynamic config frontend.namespaceRPS to control namespace rps (per instance of frontend role).

So for example you can do it for all namespaces on a single host (set max 2000 rps):

frontend.namespacerps:
- value: 2000
  constraints: {}

Or per namespace on single host:

frontend.namespacerps:
- value: 1000
- value: 500
  constraints:
    namespace: "NameSpaceA"
- value: 600
  constraints:
    namespace: "NameSpaceB"

here NameSpaceA would have limit 500 rps NameSpaceB 600 and all other namespace 1000.

@tihomir Thank you. Below are my questions

  1. How do I do it in Helm ? Do I need to pass this in values.yaml?
  2. Also we don’t have to throttle worker and history?
  1. Yes you should be able to add it to server->dynamicconfig like for example here.

  2. For Java SDK you can use WorkerOptions:

  • maxWorkerActivitiesPerSecond (worker specific)
  • maxConcurrentActivityExecutionSize (worker specific limit on parallel activities)
  • maxTaskQueueActivitiesPerSecond (global across all workers)

See also worker tuning guide here.

Thanks @tihomir .

@tihomir quick question. If we don’t set any namespace throttling is the default number is 2400 runs per second?

frontend.namespaceRPS defines requests per second and yes its default is 2400, so it defines the throughput for namespace(s) for a single frontend host.

1 Like