[[ranked-affinity-load-balancer]]
= Enabling ranked affinity support in load balancer

ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]

Enabling ranked affinity support in the <<distributable-web-subsystem,server>> must be accompanied by a compatible load balancer with ranked affinity support enabled.
When using WildFly as a load balancer ranked routing can be enabled with the following CLI command:

[source,options="nowrap"]
----
/subsystem=undertow/configuration=filter/mod-cluster=load-balancer/affinity=ranked:add
----

The default delimiter which delimiters the node routes is "." which encodes multiple routes as `node1.node2.node3`.
Should the delimiter be required to be different, this is configurable by the `delimiter` attribute of the `affinity` resource.
See the following CLI command:

[source,options="nowrap"]
----
/subsystem=undertow/configuration=filter/mod-cluster=load-balancer/affinity=ranked:write-attribute(name=delimiter,value=":")
----
