fix: setting gzip as default compression on grpc calls (#933)

This commit is contained in:
Karol Sójko 2023-11-20 13:52:54 +01:00 committed by GitHub
parent 7808cc8ed2
commit 2dff6a2ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View file

@ -167,6 +167,8 @@ export class ContainerConfigLoader {
{
'grpc.keepalive_time_ms': grpcAgentKeepAliveTimeout * 2,
'grpc.keepalive_timeout_ms': grpcAgentKeepAliveTimeout,
'grpc.default_compression_algorithm': grpc.compressionAlgorithms.gzip,
'grpc.default_compression_level': 2,
},
),
)
@ -177,6 +179,8 @@ export class ContainerConfigLoader {
{
'grpc.keepalive_time_ms': grpcAgentKeepAliveTimeout * 2,
'grpc.keepalive_timeout_ms': grpcAgentKeepAliveTimeout,
'grpc.default_compression_algorithm': grpc.compressionAlgorithms.gzip,
'grpc.default_compression_level': 2,
},
),
)

View file

@ -84,6 +84,7 @@ void container.load().then((container) => {
const grpcServer = new grpc.Server({
'grpc.keepalive_time_ms': grpcKeepAliveTimeout * 2,
'grpc.keepalive_timeout_ms': grpcKeepAliveTimeout,
'grpc.default_compression_algorithm': grpc.compressionAlgorithms.gzip,
})
const gRPCPort = env.get('GRPC_PORT', true) ? +env.get('GRPC_PORT', true) : 50051

View file

@ -92,6 +92,7 @@ void container.load().then((container) => {
const grpcServer = new grpc.Server({
'grpc.keepalive_time_ms': grpcKeepAliveTimeout * 2,
'grpc.keepalive_timeout_ms': grpcKeepAliveTimeout,
'grpc.default_compression_algorithm': grpc.compressionAlgorithms.gzip,
})
const gRPCPort = env.get('GRPC_PORT', true) ? +env.get('GRPC_PORT', true) : 50051