Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ cfg := config.GetColdBrewConfig()

| Variable | Type | Default | Description |
|----------|------|---------|-------------|
| `GRPC_SERVER_MAX_CONNECTION_IDLE_IN_SECONDS` | int | `0` | Close idle connections after this duration (0 = disabled) |
| `GRPC_SERVER_MAX_CONNECTION_AGE_IN_SECONDS` | int | `0` | Maximum connection lifetime with ±10% jitter (0 = disabled) |
| `GRPC_SERVER_MAX_CONNECTION_AGE_GRACE_IN_SECONDS` | int | `0` | Grace period after max connection age before force-closing |
| `GRPC_SERVER_MAX_CONNECTION_IDLE_IN_SECONDS` | int | `300` | Close idle connections after this duration. Set to `-1` to disable (infinite) |
| `GRPC_SERVER_MAX_CONNECTION_AGE_IN_SECONDS` | int | `1800` | Maximum connection lifetime with ±10% jitter. Set to `-1` to disable (infinite) |
| `GRPC_SERVER_MAX_CONNECTION_AGE_GRACE_IN_SECONDS` | int | `30` | Grace period after max connection age before force-closing. Set to `-1` to disable (infinite) |

Comment thread
ankurs marked this conversation as resolved.
Outdated
## HTTP Gateway

Expand Down
16 changes: 8 additions & 8 deletions howto/production.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,19 @@ env:

### Connection keepalive

For services behind load balancers with idle connection timeouts, configure keepalive:
ColdBrew ships sane defaults for connection keepalive (idle: 300s, age: 1800s, grace: 30s). These ensure connections rotate for balanced load distribution and timely DNS updates. Override only if your service has specific requirements:

```yaml
env:
# Close connections idle for more than 5 minutes
# Override: close idle connections after 10 minutes instead of 5
- name: GRPC_SERVER_MAX_CONNECTION_IDLE_IN_SECONDS
value: "300"
# Force connection refresh every 30 minutes (with ±10% jitter)
value: "600"
# Override: force connection refresh every hour instead of 30 minutes
- name: GRPC_SERVER_MAX_CONNECTION_AGE_IN_SECONDS
value: "1800"
# Allow 30s grace period for in-flight RPCs on aged connections
- name: GRPC_SERVER_MAX_CONNECTION_AGE_GRACE_IN_SECONDS
value: "30"
value: "3600"
# Disable connection age limit entirely (not recommended)
# - name: GRPC_SERVER_MAX_CONNECTION_AGE_IN_SECONDS
# value: "-1"
Comment thread
ankurs marked this conversation as resolved.
Outdated
```

## Production checklist
Expand Down
Loading