Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gRPC Keepalive Behavior in Serverless Environments #2664

Open
pratik151192 opened this issue Feb 12, 2024 · 1 comment
Open

gRPC Keepalive Behavior in Serverless Environments #2664

pratik151192 opened this issue Feb 12, 2024 · 1 comment

Comments

@pratik151192
Copy link

(This ticket is more for documentation and educational purposes; and we aren't requesting a bug fix or new feature per se)

Background:

When deploying gRPC services on serverless platforms such as AWS Lambda (and potentially Google/Azure Cloud Functions), we have observed a specific behavior related to gRPC keepalives that can lead to unexpected timeouts. Serverless platforms often reuse containers/instances for multiple invocations of the same function, with invocations guaranteed to be sequential. There can be variable pauses between these invocations depending on the incoming traffic to a container.

Issue:

We have noticed that gRPC keepalive pings can timeout in these serverless environments. Specifically, the issue manifests as follows:

  • The first invocation of a function sends a keepalive ping and completes execution.
  • If a second invocation occurs after the keepalive timeout interval, the system declares the keepalive to have timed out, resulting in errors such as:
keepalive | (4) 54.xxx.xxx.xx:443 Ping timeout passed without response

This behavior appears to be linked to the unique operational dynamics of serverless platforms, where the idle time between function invocations does not align with the expected keepalive intervals. The primary goal of this ticket is to update any relevant documentation that can provide clarity and guidance to developers deploying gRPC services in serverless environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants