For a WAF Policy, sampling is the process of assigning a percentage of the incoming requests to participate in the Application Learning process. This topic details the steps to enable sampling and modify sampling percentage through the application UI.
The sampling rate controls the frequency of the Service Engine collecting data while Analyzing happens in the Controller.
If the value of sampling frequency is set to 50%, the Service Engine will only collect 50% of the incoming requests or every alternate request.
It is recommended to use the sampling percentage of 100% in the initial phase of Application Learning. This helps in faster data aggregation and more efficient application learning.
Using a lower sampling rate conserves SE resources when no new data is available for learning. When the learning is in progress, the quantum of URI information that is sent to the Avi Load BalancerController tends to peak or fall.
The Avi Load BalancerController sends the adjusted sampling percent (reduced) to the SEs. After the sampling, the SEs have to inspect or evaluate only a small percentage of the incoming traffic. The maximum sampling percent for the application learning is set to 100%, the minimum percentage can be set as 1%.
By default, the value of the enable_adaptive_config
parameter available under the analytics profile, is set to true
.
To disable adaptive learning, set the value of enable_adaptive_config
to false
.
In adaptive application Learning, when the new type of traffic is received by SEs, the Avi Load BalancerController changes the sampling rate for the learning.
The option to manually set the Sampling Percentage is available under the Learning tab of WAF Policy.
To change the sampling percentage for the incoming request for a WAF Policy.
Navigate to
.Click on Learning Tab as shown below.
The value for this parameter can be set to any value between 1 and 100.
It is recommended to keep the default setting for sampling rate.