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
| Property | Description | Type |
|---|---|---|
threads | Worker threads. Defaults to host CPU core count. | Integer |
listen | IP and port the proxy binds to, e.g., 0.0.0.0:3000 | String |
Health Checks
| Property | Description | Type |
|---|---|---|
liveness_path | Liveness probe URL (K8s). Responds 200 OK. | String |
readiness_path | Readiness probe URL (K8s). Returns 503 during shutdown. | String |
grace_period_seconds | Delay before starting graceful shutdown. | Integer |
graceful_shutdown_timeout_seconds | Time to await active connections before termination. | Integer |
Load Balancing
| Property | Description | Type |
|---|---|---|
upstreams | Target backend servers. See Load Balancing. | Array |
load_balancer_algo | Distribution strategy: round_robin or random. | String |
Caching
| Property | Description | Type |
|---|---|---|
redis_url | Redis connection URL for Tier 2 cache. | String |
cache.tier1_capacity | Max elements in RAM cache. | Integer |
cache.tier1_ttl_seconds | Tier 1 TTL in seconds. | Integer |
cache.tier2_ttl_seconds | Tier 2 (Redis) TTL in seconds. | Integer |
cache.status | Allowed HTTP statuses. Default: [200]. | Array<Integer> |
cache.content_types | Allowed Content-Types. Default: ["text/html"]. | Array<String> |
Cache Rules
| Property | Description | Type |
|---|---|---|
bypass.paths | URL prefixes that should never be cached. | Array<String> |
bypass.extensions | File extensions that should never be cached. | Array<String> |
cache_control | Rules 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.