Max Connections
HTTP listeners return 503 with Retry-After: 1. TCP listeners close the socket immediately
Category: Practical
Task: HTTP listeners return 503 with Retry-After: 1. TCP listeners close the socket immediately
Prerequisites: The product runtime and any backend services referenced by this configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# Max connections: reject new connections when the
# per-listener limit is reached.
#
# HTTP listeners return 503 with Retry-After: 1.
# TCP listeners close the socket immediately.
#
# Usage:
# cargo run -p praxis-proxy -- -c examples/configs/operations/max-connections.yaml
listeners:
- name: http
address: "0.0.0.0:8080"
max_connections: 100
filter_chains:
- main
filter_chains:
- name: main
filters:
- filter: router
routes:
- path_prefix: "/"
cluster: backend
- filter: load_balancer
clusters:
- name: backend
endpoints:
- "127.0.0.1:3001"
insecure_options:
allow_private_endpoints: true # example proxies to local backends