Examples

Overload Gauges

Publishes smoothed praxis_overload_pressure gauges for cgroup memory, anonymous resident memory, CPU stall time, connections, and file descriptors

Praxis v0.8.0 2 min read

Category: Practical
Task: Publishes smoothed praxis_overload_pressure gauges for cgroup memory, anonymous resident memory, CPU stall time, connections, and file descriptors

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

Run it: Use ghcr.io/praxis-proxy/praxis:0.8.0 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.

# Overload Pressure Gauges
#
# Publishes smoothed `praxis_overload_pressure` gauges for cgroup memory,
# anonymous resident memory, CPU stall time, connections, and file
# descriptors. The gauges never refuse work, but the `max_connections` and
# `max_memory_bytes` caps in this config do: requests over a cap receive HTTP 503.
#
admin:
  metrics_address: "127.0.0.1:9902"

runtime:
  overload_gauges: true
  # Connection pressure needs a cap. In-flight HTTP requests and active TCP
  # sessions hold permits; idle keep-alives do not.
  max_connections: 1000
  # Heap pressure is anonymous resident memory over this cap.
  max_memory_bytes: 1073741824

insecure_options:
  allow_private_endpoints: true

listeners:
  - name: web
    address: "127.0.0.1:8080"
    filter_chains:
      - routing

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