Nylon Mesh

Configuration

Full YAML reference for nylon-mesh.yaml.

Nylon Mesh is entirely declarative—its behavior is controlled through a single YAML file.

Full Example

threads: 10
liveness_path: "/_health/live"
readiness_path: "/_health/ready"
grace_period_seconds: 0
graceful_shutdown_timeout_seconds: 0
listen: "0.0.0.0:3000"

upstreams:
  - "127.0.0.1:3001"
  - address: "127.0.0.1:3002"
    weight: 5

load_balancer_algo: "round_robin"
redis_url: "redis://localhost:6379"

cache:
  tier1_capacity: 10000
  tier1_ttl_seconds: 3
  tier2_ttl_seconds: 60
  status: [200, 404]
  content_types:
    - "text/html"

bypass:
  paths:
    - "/_next/"
    - "/api/"
  extensions:
    - ".ico"
    - ".png"

cache_control:
  - value: "public, max-age=31536000, immutable"
    paths:
      - "/_next/static/"
    extensions:
      - ".ico"
      - ".png"
      - ".jpg"

Property Reference

Server

PropertyDescriptionType
threadsWorker threads. Defaults to host CPU core count.Integer
listenIP and port the proxy binds to, e.g., 0.0.0.0:3000String

Health Checks

PropertyDescriptionType
liveness_pathLiveness probe URL (K8s). Responds 200 OK.String
readiness_pathReadiness probe URL (K8s). Returns 503 during shutdown.String
grace_period_secondsDelay before starting graceful shutdown.Integer
graceful_shutdown_timeout_secondsTime to await active connections before termination.Integer

Load Balancing

PropertyDescriptionType
upstreamsTarget backend servers. See Load Balancing.Array
load_balancer_algoDistribution strategy: round_robin or random.String

Caching

PropertyDescriptionType
redis_urlRedis connection URL for Tier 2 cache.String
cache.tier1_capacityMax elements in RAM cache.Integer
cache.tier1_ttl_secondsTier 1 TTL in seconds.Integer
cache.tier2_ttl_secondsTier 2 (Redis) TTL in seconds.Integer
cache.statusAllowed HTTP statuses. Default: [200].Array<Integer>
cache.content_typesAllowed Content-Types. Default: ["text/html"].Array<String>

Cache Rules

PropertyDescriptionType
bypass.pathsURL prefixes that should never be cached.Array<String>
bypass.extensionsFile extensions that should never be cached.Array<String>
cache_controlRules for injecting Cache-Control headers.Array<Object>

TLS / HTTPS

Terminate TLS directly at the proxy:

tls:
  listen: "0.0.0.0:443"
  certs:
    - host: "default"
      cert_path: "cert.pem"
      key_path: "key.pem"

Tip

For production Kubernetes deployments, it's recommended to terminate TLS at the ingress controller and let Nylon Mesh handle plain HTTP internally.

On this page