Timeout

Returns 504 if the upstream takes longer than timeout_ms to respond

Category: Practical
Task: Returns 504 if the upstream takes longer than timeout_ms to respond

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.

# Timeout Enforcement
#
# Returns 504 if the upstream takes longer than timeout_ms to respond.
# Measures elapsed time from request receipt to response headers.
#
listeners:
  - name: default
    address: "127.0.0.1:8080"
    filter_chains:
      - main

filter_chains:
  - name: main
    filters:
      - filter: router
        routes:
          - path_prefix: "/"
            cluster: backend

      - filter: timeout
        # Wall-clock time from request receipt to first response header byte.
        timeout_ms: 5000   # 5 seconds; adjust to match your upstream SLA

      - filter: load_balancer
        clusters:
          - name: backend
            endpoints:
              - "127.0.0.1:3000"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends