Skip to content

Commit 039b60c

Browse files
committed
instructions on http fallback in config for high latency connections
1 parent d30b9f8 commit 039b60c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎docs/docs/get_started/configuration.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,21 @@ If the handshake fails, PBS falls back to a plain HTTP `get_header` at the relay
140140

141141
There is no fallback if the handshake is still unanswered when the window ends (recorded as `555`), or if it fails too late to leave time for an HTTP request. There is also none once the stream is open. If it breaks before any bid arrives, that relay contributes no header for the slot (recorded as `556`). If a bid already arrived, PBS validates and returns it as usual.
142142

143+
On a high-latency connection, where the handshake risks timing out, you can add the relay a second time with `get_header = "http"` and a different `id`. PBS asks both entries every slot and keeps the better bid, so the HTTP entry still returns a header when the stream does not.
144+
145+
```toml
146+
[[relays]]
147+
id = "relay-1-stream"
148+
url = "https://0xa1cec75a3f0661e99299274182938151e8433c61a19222347ea1313d839229cb4ce4e3e5aa2bdeb71c8fcf1b084963c2@relay-1.xyz"
149+
get_header = "stream"
150+
headers = { X-Api-Key = "..." }
151+
152+
id = "relay-1-http"
153+
url = "https://0xa1cec75a3f0661e99299274182938151e8433c61a19222347ea1313d839229cb4ce4e3e5aa2bdeb71c8fcf1b084963c2@relay-1.xyz"
154+
get_header = "http"
155+
headers = { X-Api-Key = "..." }
156+
```
157+
143158
#### Metrics
144159

145160
Stream and fallback outcomes are recorded separately. `cb_pbs_relay_status_code_total` and `cb_pbs_relay_latency` carry `endpoint="get_header_stream"` for the stream and `endpoint="get_header"` for the fallback, and four `cb_pbs_relay_stream_*` series cover handshake latency, updates per window, unparseable frames and fallbacks. See [Metrics > Bid stream](./running/metrics.md#bid-stream).

0 commit comments

Comments
 (0)