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
*`ACTIVE_VALIDATOR_HOURS` - number of hours to track active proposers in redis (default: `3`)
122
+
*`API_MAX_HEADER_BYTES` - http maximum header bytes (default: `60_000`)
123
+
*`API_TIMEOUT_READ_MS` - http read timeout in milliseconds (default: `1_500`)
124
+
*`API_TIMEOUT_READHEADER_MS` - http read header timeout in milliseconds (default: `600`)
125
+
*`API_TIMEOUT_WRITE_MS` - http write timeout in milliseconds (default: `10_000`)
126
+
*`API_TIMEOUT_IDLE_MS` - http idle timeout in milliseconds (default: `3_000`)
127
+
*`API_SHUTDOWN_WAIT_SEC` - how long to wait on shutdown before stopping server, to allow draining of requests (default: `30`)
128
+
*`API_SHUTDOWN_STOP_SENDING_BIDS` - whether API should stop sending bids during shutdown (nly useful in single-instance/testnet setups, default: `false`)
129
+
*`BLOCKSIM_MAX_CONCURRENT` - maximum number of concurrent block-sim requests (0 for no maximum, default: `4`)
- if that is `false`, then k8s will stop sending traffic to that pod but doesn't touch it otherwise
55
+
56
+
---
57
+
58
+
### API Startup + Shutdown Sequence
59
+
60
+
The proposer API needs to load all known validators before serving traffic, otherwise, there's a risk of missed slots due to `getPayload` not having all the information it needs to succeed.
61
+
62
+
**Correct startup sequence:**
63
+
1. Service starts
64
+
2. Does minimal initial checks
65
+
3. Starts HTTP server (`live=true`, `ready=false`)
66
+
4. Updates known validators from CL client (can take 10-30 sec)
67
+
5. Sets `ready=true`, and starts receiving traffic
68
+
69
+
At this point, the pod is operational and can service traffic.
70
+
71
+
**Correct shutdown sequence:**
72
+
73
+
1. Shutdown initiated (through signals `syscall.SIGINT` or `syscall.SIGTERM`)
74
+
2. Set `ready=false` to stop receiving new traffic
75
+
3. Wait some time
76
+
4. Drain pending requests
77
+
5. Shut down (setting `live=false` is not necessary anymore)
0 commit comments