- Notifications
You must be signed in to change notification settings - Fork625
Service Configuration
Each service can register one or more URL prefixes for which it servestraffic. A URL prefix is ahost/path
combination without a scheme since SSLhas already been terminated and all traffic is expected to be HTTP. Toregister a URL prefix add a tagurlprefix-host/path
to the servicedefinition.
By default, traffic is distributed evenly across all service instances whichregister a URL prefix but you can set the amount of traffic a set of instanceswill receive ("Canary testing"). See [Traffic Shaping](#Traffic Shaping)below.
A background process watches for service definition and health status changesin consul. When a change is detected a new routing table is constructed usingthe commands described in [Config Commands](#Config Commands).
Consul allows to discover services by two different names:
mysvc.service.consul
mysvc.service.dc1.consul
Assuming thatdc1
is the datacenter of the local agent during servicediscovery the first name may return instances from a different datacenterwhereas the second name will only return instances fromdc1
.
If you have multiple environments with separate consul servers and distinguishthem via datacenter then you can use${DC}
in theurlprefix-
tag to simplifythe registration.
This way you can always register your service with the same set of tagsurlprefix-mysvc.service.consul,urlprefix-mysvc.service.${DC}.consul
withoutknowing the consul configuration.
- Home
- Quickstart
- Installation
- Verifying Releases
- Configuration
- Binding to low ports
- Deployment
- Features
- Access Logging ⭐️
- Certificate Stores
- Compression
- Circonus Support
- DataDog Support
- Docker Support
- Dynamic Reloading
- Graceful Shutdown
- Graphite Support
- HTTP Header
- HTTPS Upstream
- Metrics Support
- Path Stripping
- PROXY Protocol
- Request Debugging
- Request Tracing
- SSE Support
- StatsD Support
- TCP Proxy ⭐️
- TCP+SNI Support
- Traffic Shaping
- Vault Integration
- Websockets
- Web UI
- Performance
- Service Configuration
- Routing
- Debugging
- Contributing
- Why fabio?