-
Notifications
You must be signed in to change notification settings - Fork 617
Service Configuration
Each service can register one or more URL prefixes for which it serves
traffic. A URL prefix is a host/path
combination without a scheme since SSL
has already been terminated and all traffic is expected to be HTTP. To
register a URL prefix add a tag urlprefix-host/path
to the service
definition.
By default, traffic is distributed evenly across all service instances which register a URL prefix but you can set the amount of traffic a set of instances will receive ("Canary testing"). See [Traffic Shaping](#Traffic Shaping) below.
A background process watches for service definition and health status changes in consul. When a change is detected a new routing table is constructed using the commands described in [Config Commands](#Config Commands).
Consul allows to discover services by two different names:
mysvc.service.consul
mysvc.service.dc1.consul
Assuming that dc1
is the datacenter of the local agent during service
discovery the first name may return instances from a different datacenter
whereas the second name will only return instances from dc1
.
If you have multiple environments with separate consul servers and distinguish
them via datacenter then you can use ${DC}
in the urlprefix-
tag to simplify
the registration.
This way you can always register your service with the same set of tags
urlprefix-mysvc.service.consul,urlprefix-mysvc.service.${DC}.consul
without
knowing 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?