Disable brotli compression

I’m compressing my assets at build-time, so is it possible to disable serve-time compression?

Hey Alec,

We don’t currently support disabling compression. What is your use case for compressing the assets at build time?

I suppose each asset is cached after compression, so there’s not much of a use case, I guess.

That’s correct. There is only a performance impact on the initial request. The latency for a cache miss is generally less than 300 ms (which includes compression and transit), so it’s reasonably fast regardless.

I’m also confused about the Brotli compression. In my use case, I’m trying to get a Rust and Tonic based gRPC client to connect to a GoLang based API service at Render, and I’m getting:

Failed upgrading connection to gRPC: Status { code: Internal, message: “protocol error: received message with invalid compression flag: 103 (valid flags are 0 and 1) while receiving response with status: 500 Internal Server Error”

And likewise if I try to troubleshoot the API endpoint with grpc_cli, it is also unable to make the connection:

$ grpc_cli ls api.on-prem.net

Received an error when querying services endpoint.

ServerReflectionInfo rpc failed. Error code: 14, message: failed to connect to all addresses, debug info: {"created":"@1626575165.063397000","description":"Failed to pick subchannel","file":"/tmp/grpc-20210625-60141-75v1ce/src/core/ext/filters/client_channel/client_channel.cc","file_line":3009,"referenced_errors":[{"created":"@1626575165.063394000","description":"failed to connect to all addresses","file":"/tmp/grpc-20210625-60141-75v1ce/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}

My question is how can Render use Brotli to encode all responses, without regard to the Accept-Encoding content negotiation header, which a client uses to inform Render that it does not have Brotli support?

David

Render will acknowledge the Accept-Encoding header so not all responses use Brotli, however we default to using Brotli for compression.