I am implementing a gRPC service and have a use-case where I need to rate limit RPC calls but would like the rate limiting server interceptor to run directly on the network thread as it is non-blocking(Using direct executor).
>Is there a problem with running it on another thread?This basic rate limiter just increments/decrements a counter and nothing more so it seems wasteful to use a thread to do this.
For such cases how do we switch executors? Even if it isn't recommended I would love to know how this can be done theoretically. Thank you for your response!
On Tuesday, November 14, 2023 at 10:24:53 AM UTC-8 Eric Anderson wrote:On Wed, Nov 8, 2023 at 9:46 AM Krishna Sai Veera Reddy <krishnasaiv...@gmail.com> wrote:I am implementing a gRPC service and have a use-case where I need to rate limit RPC calls but would like the rate limiting server interceptor to run directly on the network thread as it is non-blocking(Using direct executor).Is there a problem with running it on another thread? Even for fully-async workloads we would discourage using direct executor as it can significantly impact latencies.
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8d96019c-584c-4497-bcb7-821ee48b6b39n%40googlegroups.com.