Configure origins
What is an origin?
An origin is an IP address to which protection sends clean traffic after filtering.
An origin can be the final server that hosts your web application or another component in your infrastructure through which traffic reaches the resource. For example, if a load balancer with IP address 203.0.113.42 is in front of your application, specify it as the origin.
|
On some UI tabs, you may see |
How are origins used?
Protection sends clean traffic to the IP address that you specify as an origin.
If there are multiple origins, protection distributes traffic between them. By default, it uses round robin load balancing. On request, we can change it to sticky session or IP hash.
How does round robin distribute traffic?
In the settings, you specify the weight for each origin. Round robin distributes requests proportionally: the higher the weight, the more requests the origin receives.
Example. You add two origins:
-
A, with a weight of 100;
-
B, with a weight of 50.
Round robin compares the weights: A (100) is twice the weight of B (50). Therefore, protection sends twice as much traffic to A. It distributes requests as follows: A → A → B → A → A → B, and so on.
For more information about load balancing, see Load balancing methods.
If an origin becomes unavailable, protection temporarily removes it from load balancing so that traffic reaches only working servers. By default, it uses a passive health check to check availability. On request, we can enable an active health check, which is available only for round robin load balancing.
How does a passive health check work?
A passive health check monitors the responses your server returns to users. If an origin starts returning 5xx errors (500, 502, 503, or 504), and their number exceeds the configured threshold, protection temporarily removes the origin from load balancing. It then returns the origin to the pool.
For more information about health checks, see Load balancing methods.
How to configure origins
-
Go to
Application protection → Resources. Click the ellipsis (…) next to the required resource and selectSettings.
-
Open the
Originstab and click+ Add origin.
The Add origin window opens. Complete the remaining steps there.
-
Specify the origin settings:
-
Origin IP: the IP address of the server to which protection sends clean traffic. For example:203.0.113.42. -
Mode: the operating mode of the origin:-
Primary: receives traffic continuously. If there are multiple primary origins, traffic is distributed between them. -
Backup: receives traffic only when all primary origins are unavailable. Use this mode to designate a fallback origin. -
Inactive: does not participate in traffic processing. Use this mode to temporarily take an origin out of service, for example during maintenance.
-
-
Weight: a number from 1 to 100 that determines how much traffic an origin receives during load balancing. The default value is50.This setting is available only for round robin and IP hash. For more information about weight-based load balancing, see Load balancing methods.
-
Description: a text comment that helps you find the required origin in the list. -
Failover settings: passive health check parameters:-
Error threshold: the allowed number of consecutive 5xx errors the origin can return. If there are more errors, the system temporarily removes the origin from load balancing. The default value is50. -
Recovery timeout, sec: the number of seconds the origin remains out of load balancing after the threshold is exceeded. When this time expires, protection sends traffic to the origin again. The default value is3.
-
-
-
Click
Add. The origin appears in the list.
Manage origins
On the Origins tab, you can view all added origins.
The table provides the following information:
-
The origin IP address.
-
The operating mode:
Primary,Backup, orInactive. -
The weight.
-
The description.
-
The creation date.
-
The date when the settings were last updated.
You can manage origins directly from the list:
-
Edit: click the ellipsis (
…) at the end of the row and selectEdit. In the window that opens, you can change any origin setting. -
Delete: click the ellipsis (
…), selectDelete, and confirm the action.