docs/content/reference/routing-configuration/udp/service.md
Each of the fields of the service section represents a kind of service.
Which means, that for each specified service, one of the fields, and only one,
has to be enabled to define what kind of service is created.
Currently, the two available kinds are LoadBalancer, and Weighted.
The servers load balancer is in charge of balancing the requests between the servers of the same service.
The Servers field defines all the servers that are part of this load-balancing group, i.e. each address (IP:Port) on which an instance of the service's program is deployed.
A Service with One Server -- Using the File Provider
## Dynamic configuration
udp:
services:
my-service:
loadBalancer:
servers:
- address: "xx.xx.xx.xx:xx"
## Dynamic configuration
[udp.services]
[udp.services.my-service.loadBalancer]
[[udp.services.my-service.loadBalancer.servers]]
address = "xx.xx.xx.xx:xx"
The Weighted Round Robin (alias WRR) load-balancer of services is in charge of balancing the connections between multiple services based on provided weights.
This strategy is only available to load balance between services and not between servers.
!!! info "Supported Providers"
This strategy can currently be defined with the [File provider](../../install-configuration/providers/others/file.md)
and the [Kubernetes CRD provider (IngressRouteUDP)](../kubernetes/crd/udp/ingressrouteudp.md).
udp:
services:
app:
weighted:
services:
- name: appv1
weight: 3
- name: appv2
weight: 1
appv1:
loadBalancer:
servers:
- address: "xxx.xxx.xxx.xxx:8080"
appv2:
loadBalancer:
servers:
- address: "xxx.xxx.xxx.xxx:8080"
[udp.services]
[udp.services.app]
[[udp.services.app.weighted.services]]
name = "appv1"
weight = 3
[[udp.services.app.weighted.services]]
name = "appv2"
weight = 1
[udp.services.appv1]
[udp.services.appv1.loadBalancer]
[[udp.services.appv1.loadBalancer.servers]]
address = "xxx.xxx.xxx.xxx:8080"
[udp.services.appv2]
[udp.services.appv2.loadBalancer]
[[udp.services.appv2.loadBalancer.servers]]
address = "xxx.xxx.xxx.xxx:8080"
| Field | Description | Default | Required |
|---|---|---|---|
<a id="opt-services" href="#opt-services" title="#opt-services">services</a> | Defines the list of services to load balance between. | Yes | |
<a id="opt-services-name" href="#opt-services-name" title="#opt-services-name">services.name</a> | The name of the service to load balance to. | "" | Yes |
<a id="opt-services-weight" href="#opt-services-weight" title="#opt-services-weight">services.weight</a> | The weight applied to the service when balancing connections. | 1 | No |
{% include-markdown "includes/traefik-for-business-applications.md" %}