i'm facing an out of memory problem due to too many requests sending to gRPC server in the short period of time. The gRPC server is working at K8s platform with limited memory. Usually, the server works fine, but when the traffic increases rapidly ( short-term peak ) , memory consumption rises to the limit, and k8 kills the app. I know that the gRPC library offers a
ResourceQuota mechanism attached to the client channel
via ChannelArguments but I'm not sure what the configuration should look like and cannot find any useful example on the internet. It's the 3rd part app, so adding a memory quota into the application code is not an option. i'm trying to solve the problem without additional external solution e.g. sidecar proxy. Configuring resource quota via channel arguments passed as command line argument sounds reasonable for me.