Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion crates/soth-cli/src/cli_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ impl Default for ForwardProxyConfig {
// response. 120s gives streaming LLM responses the headroom
// they need without hiding genuinely-stuck upstreams.
upstream_timeout: DurationSetting::millis(120_000),
upstream_retry_on_failure: false,
// On by default: a single retry (after upstream_retry_delay, bounded
// by the connect deadline) for transient connect failures — refused
// / unreachable / reset — which are routine during hotspot handoffs
// and gateway blips. Without it a single blip surfaces to the user
// as a 502. The retry only fires on transient errors, never on
// timeouts, so it can't mask a genuinely-stuck upstream.
upstream_retry_on_failure: true,
upstream_retry_delay: DurationSetting::millis(200),
capture_max_body_bytes: 64 * 1024 * 1024,
buffer_request_bodies: true,
Expand Down
5 changes: 4 additions & 1 deletion crates/soth-proxy/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ impl Default for MitmRuntimeConfig {
h2_body_idle_timeout_ms: 60_000,
h2_response_overflow_mode: H2ResponseOverflowModeConfig::TruncateContinue,
upstream_connect_timeout_ms: 5_000,
upstream_retry_on_failure: false,
// On by default (matches the CLI-generated config): one retry for
// transient connect failures during hotspot/gateway blips; never
// retries timeouts.
upstream_retry_on_failure: true,
upstream_retry_delay_ms: 200,
verify_upstream_tls: true,
max_connections_per_host: 64,
Expand Down
8 changes: 8 additions & 0 deletions soth.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ forward_proxy:
cache_ttl: "1h" # Certificate cache TTL
cache_max: 10000 # Maximum cached certificates

# Upstream connect retry. On by default: a single retry (after
# upstream_retry_delay, bounded by the connect deadline) for transient
# connect failures — refused / unreachable / reset — which are routine
# during hotspot handoffs and gateway blips. Timeouts are never retried,
# so it can't mask a genuinely-stuck upstream. Set to false to disable.
upstream_retry_on_failure: true
upstream_retry_delay: "200ms"

# Connection pool settings
pool:
max_connections_per_host: 10
Expand Down
Loading