Hot Reload

Filter pipelines are swapped atomically at runtime when the config file changes

Category: Setup-dependent integration
Task: Apply configuration changes without restarting

Prerequisites: Praxis runtime; A writable configuration file; An HTTP backend

Expected outcome: A valid file change replaces the active configuration while the process stays running.

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.

# Hot Reload
#
# Filter pipelines are swapped atomically at runtime when the
# config file changes. In-flight requests complete on the old
# pipeline; new requests pick up the updated config.
#
listeners:
  - name: gateway
    address: "0.0.0.0:8080"
    filter_chains:
      - routing
      - api

filter_chains:
  - name: routing
    filters:
      - filter: router
        routes:
          - path_prefix: "/api/"
            cluster: backend
          - path_prefix: "/health"
            cluster: backend
      - filter: load_balancer
        clusters:
          - name: backend
            endpoints:
              - "127.0.0.1:3000"
              - "127.0.0.1:3001"

  - name: api
    filters:
      - filter: request_id
      - filter: static_response
        status: 200
        body: '{"message": "hello from praxis"}'
        headers:
          - name: content-type
            value: "application/json"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends