How Priority Algorithm works

View Categories

How Priority Algorithm works

2 min read

What is Priority used for #

Priority indicates “how many backends have to be unavailable before the backend can get in”.
It means priority property is used to put backends as spares.

The most common use is to define a primary backend and a backup backend in a service

In this case, all the connections will be forward to backend_master while it is available.
When backend_master becomes down, all the connections will be forward to backend_backup.

But a pool of backend masters can be used also

In this case, all the connections will be forward in balancing mode to the pool of backend_masters: backend_master1 and backend_master2.
When all the backends in the pool of backend_masters becomes down, all the connections will be forward to backend_backup.

Backend Priority setup in L4 Farms #

This feature is present in Layer 4 Farms and Layer 7 Farms when New Generation Proxy is enabled.
The Priority property can be configured on each backend.

Backend Priority setup in L7 Farms with New Generation Proxy Enabled #

This feature is present in Layer 7 Farms when New Generation Proxy is enabled.
The Priority property can be configured on each backend.

Backend Priority setup in L7 Farms with New Generation Proxy Disabled #

To get the Property feature without the backend property, the Farmguardian has to be used in order to disable/enable automatically the backend.

The Farmguardian command property can accept values for priority algorithm adding to the end of the command:
“;priority value_for_backend0 value_for_backend1 … value_for_backendN ”

  1. “;priority” identifies priority algorithm has to be used
  2. “priority_value_for_backendN” identifies priority values to be used with backends

The farmguardian process detects the use of New Generation Proxy, so if it is enabled, the priority settings in Farmguardian command will not be used.

Using this Farmguardian

Automatically the backend_backup ( in third position ) becomes in down state ( even with the check_tcp is OK ) due to the priority assigned in the farmguardian command (“;priority 1 1 3”).

SHARE ON:

Powered by BetterDocs