Configuring GRPC keepalive

This page summarizes the projects mentioned and recommended in the original post on /r/grpc

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • gRPC

    The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)

  • So, a keep-alive operation consists of 4 packets, all four are 68 bytes long; eg. one keep-alive operation is 272 bytes long. There are 86400 seconds in a day, so 86400/15 = 5760 keep-alive operations are done in a day; it means 5760*272 = 1 566 720 bytes ~ 1.5 MB/day! My whole month data usage could be that much, not my daily. As https://www.emnify.com/pricing: 1 MB/month is around 1 EUR/month/device, 50 MB is 2.65 EUR/month/device. So, I've tried to set the keep-alive options on client side: conn, err := grpc.Dial(*addr, grpc.WithInsecure(), grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 60 * time.Second, Timeout: 5 * time.Second, PermitWithoutStream: true})) But after 3 minutes the connection is dropped. The keep-alive documentation (https://github.com/grpc/grpc/blob/master/doc/keepalive.md and https://pkg.go.dev/google.golang.org/grpc/keepalive) is contradictory.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts