dhiaayachi / temporal

Temporal service
https://docs.temporal.io
MIT License
0 stars 0 forks source link

Make non-global rate limiters global #296

Open dhiaayachi opened 1 month ago

dhiaayachi commented 1 month ago

Is your feature request related to a problem? Please describe. The config for lost of rate limiters in the system is per instance, which is very hard to use. The ask is to provide a global (cluster-wide) config for them and auto adjust the actual used per-instance limit based on the # of instances in the ring.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dhiaayachi commented 1 month ago

Thank you for your feature request!

Currently, Temporal's rate limiters are configured on a per-instance basis. You're right, a global (cluster-wide) configuration with automatic per-instance adjustment based on the cluster size would be a valuable addition for task scheduler and persistence rate limiters.

While this feature is not yet available, you can consider using a workaround by setting the per-instance limit to a sufficiently high value that allows for the desired throughput across your cluster.

We appreciate your suggestion and will explore this feature for future releases.

dhiaayachi commented 1 month ago

Thank you for your feature request! We understand the need for global rate limiting configuration that can adapt to different cluster sizes.

Currently, Temporal doesn't offer cluster-wide rate limiting settings. However, a workaround could be to implement a custom rate limiter at the application level. You could use a library like Guava's RateLimiter to achieve this.

We appreciate your feedback and will consider it for future development.

dhiaayachi commented 1 month ago

Thank you for your feature request. We appreciate you taking the time to bring this to our attention.

Currently, Temporal doesn't support global rate limit configuration.

One possible workaround is to utilize a centralized monitoring system or your infrastructure's native rate limiting capabilities. This would allow you to dynamically adjust per-instance limits based on cluster-wide metrics.

We are actively working on improving our rate limiter configuration options, and we appreciate your feedback as we plan for future releases.

dhiaayachi commented 1 month ago

Thank you for your feature request. This is a great idea and we appreciate you bringing it to our attention. Currently, Temporal does not have a global configuration for rate limiters.

A workaround for this is to set the rate limiters to a high enough value that it doesn't become a bottleneck for the system. You could then potentially add custom code that dynamically adjusts the rate limit based on the number of instances in the ring.

We are always working to improve Temporal, and this feedback is valuable to us. Please continue to share your thoughts and ideas!