Skip to main content
Version: 0.10.0-dev

Services

An ingress configuration file may define zero or more services. Each service groups a set of routes with one or more upstreams and an optional load balancing strategy.

services = [
{
# Load balancing strategy for this service.
load_balancing_strategy = "round_robin"

# Optional: health checking for upstreams.
health_check = {
enable = false
failure_threshold = 3
unhealthy_cooldown_seconds = 10
}

# Optional: circuit breaker for upstream protection.
circuit_breaker = { ... }

# Routes and upstreams are defined within the service.
routes = [ ... ]
upstreams = [ ... ]
}
]

Fields

FieldTypeDefaultDescription
load_balancing_strategystring"failover"The load balancing strategy. See supported strategies below.
health_check.enablebooleantrueEnable health checking for upstreams.
health_check.failure_thresholdinteger5Number of consecutive failures before marking an upstream as unhealthy.
health_check.unhealthy_cooldown_secondsinteger10Seconds to wait before re-checking an unhealthy upstream.
circuit_breakerobject(optional)Circuit breaker configuration. See Circuit Breaker.
routeslist(object)(required)Route matching rules. See Routes.
upstreamslist(object)(required)Backend upstream servers. See Upstreams.

Load Balancing Strategies

  • failover: Always picks the first healthy upstream in the list.
  • round_robin: Distributes requests evenly across upstreams. Respects the weight field on each upstream.
  • request_pressure: Picks the upstream with the lowest recent request pressure (heuristic-based, not transport-level).
  • random: Picks a random healthy upstream.
  • sticky_hash: Consistent hashing based on request characteristics.