You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[server] Streamline spicedb gRPC client usage and creation options
- instead of doing retries on two levels, rely on the gRPC-level retries
- to mitigate the loss of insights, introduce createDebugLogInterceptor
- client options: use sane defaults derived from the documentation instead of the excessive ones we had in place before
- use "waitForReady" option: it should a) make our calls for responsive on re-connects, while b) - because we keep re-trying on DEADLINE_EXCEEDED - should be as reliable as before
Tool: gitpod/catfood.gitpod.cloud
// we ping frequently to check if the connection is still alive
23
-
"grpc.keepalive_time_ms": 1000,
24
-
"grpc.keepalive_timeout_ms": 1000,
24
+
"grpc.keepalive_time_ms": 30_000,
25
+
"grpc.keepalive_timeout_ms": 4_000,
26
+
27
+
"grpc.max_reconnect_backoff_ms": 5_000,
28
+
"grpc.initial_reconnect_backoff_ms": 1_000,
25
29
26
-
"grpc.max_reconnect_backoff_ms": 5000,
27
-
"grpc.initial_reconnect_backoff_ms": 500,
30
+
// docs on client-side retry support: https://github.com/grpc/grpc-node/blob/0c093b0b7f78f691a4f6e41efc184899d7a2d987/examples/retry/README.md?plain=1#L3
31
+
"grpc.service_config_disable_resolution": 1,// don't resolve from external, but guarantee to take this config
28
32
"grpc.service_config": JSON.stringify({
29
33
methodConfig: [
30
34
{
35
+
// here is the code that shows how an empty shape matches every method: https://github.com/grpc/grpc-node/blob/bfd87a9bf62ebc438bcf98a7af223d5353f4c8b2/packages/grpc-js/src/resolving-load-balancer.ts#L62-L147
0 commit comments