Has anyone used compression (gzip) with the Javasc...
# community
z
Has anyone used compression (gzip) with the Javascript client? Running into some size limits and its because we're sending uncompressed json
basically we're trying to enable gzip on our requests to "isAllowed" so we can get back under the 5mb limit. We have a longer term fix coming, but compression would allow us more time without prod issues.
c
Hey, I don't think the SDK allows enabling gzip. However, it looks like you're hitting the default gRPC max request size of 4MB, You can temporarily increase that by changing the
server.advanced.grpc.maxRecvMsgSizeBytes
configuration setting in Cerbos and restarting the service.
It's not documented specifically because we don't recommend changing the default for performance reasons. But you can see where it fits in the config file here: https://docs.cerbos.dev/cerbos/latest/configuration/#full-configuration
As always, you can pass it as a command line parameter too:
--set=server.advanced.grpc.maxRecvMsgSizeBytes=10485760
z
This is helpful, thank you
@Charith (Cerbos) I opened a PR to potentially add the options I'm looking for around compression, would love if y'all take a peek. https://github.com/cerbos/cerbos-sdk-javascript/pull/1119 cc @Emre (Cerbos)