Our great sponsors
-
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.
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.