Nylon Mesh

Load Balancing

Configure upstream routing with round-robin, random, and weighted algorithms.

Nylon Mesh uses Pingora's production-proven load balancing engine to route incoming HTTP requests across your upstream pool.

Selection Algorithms

AlgorithmBehavior
round_robin (default)Distributes traffic sequentially and equally across upstreams.
randomRandomly assigns each request to an available upstream.
load_balancer_algo: "round_robin"

Defining Upstreams

Simple Configuration

Just provide the address and port of each backend:

upstreams:
  - "127.0.0.1:3001"
  - "127.0.0.1:3002"

Weighted Configuration

For backends with different hardware capabilities, assign weight to route proportionally more traffic:

upstreams:
  - address: "127.0.0.1:3001"
    weight: 10
  - address: "127.0.0.1:3002"
    weight: 2

Tip

In this example, for every 12 requests the first server handles 10 while the second manages 2. Use this to route more traffic to machines with stronger CPU/RAM.


Health Probes

Integrated Liveness and Readiness endpoints for orchestration platforms like Kubernetes:

liveness_path: "/_health/live"
readiness_path: "/_health/ready"
grace_period_seconds: 0
graceful_shutdown_timeout_seconds: 0
ProbePathBehavior
Liveness/_health/liveReturns 200 OK while the proxy process is healthy.
Readiness/_health/readyReturns 200 OK when ready to receive traffic. Returns 503 during graceful shutdown to drain connections.

Warning

Health probe paths are handled natively by Nylon Mesh and never forwarded to your backend. Make sure these paths don't conflict with your application routes.

On this page