Downstream Read Timeout

Protects against slow client attacks by limiting how long the proxy waits for data from downstream clients

Category: Practical
Task: Protects against slow client attacks by limiting how long the proxy waits for data from downstream clients

Prerequisites: The product runtime and any backend services referenced by this configuration.

Run it: Use ghcr.io/praxis-proxy/praxis:0.7.2 and follow the first reverse-proxy tutorial to mount and start the configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

# Downstream Read Timeout
#
# Protects against slow client attacks by limiting how long the
# proxy waits for data from downstream clients. Applied via
# Pingora's per-session read timeout.
#
# The timeout applies to body reads and (on keepalive
# connections when keepalive timeout is disabled) subsequent
# request header reads. Pingora's internal 60s default covers
# initial header reads on fresh connections.
#
listeners:
  - name: default
    address: "127.0.0.1:8080"
    downstream_read_timeout_ms: 10000   # 10 seconds
    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:3000"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends