For LocationOptimizer ConfigMaps that have policy: dynamic, the LocationOptimizer needs a traffic signal to select locations. The following describes the traffic signal currently in use.
The base metric is the count of incoming HTTP requests per second (rps) collected at the ingress of the environment. The metric has labels for the 2-digit geohash encompassing the geo-ip of the end-user. The metric identifies the incoming traffic rate per 2-digit geohash quadrangle.
The metric is smoothed with a moving average of 2 minute increments over a 30 minute span. In cases of low traffic, the smoothing span is extended to 24 hours to ensure that a stable signal is obtained. The "low traffic" condition is met when the total traffic rate for the environment is less than the minimumUsagePerLocation * minimumLocations. When total traffic is less than that product, the solution is dominated by the minimumLocations parameter and the challenge is to identify a stable selection of locations over time. At low levels, the traffic signal is prone to a low signal:noise ratio. Minor variations in traffic rate, variation that is not systematically related to valuable end-user behavior, can induce flapping in the location selections. To ameliorate this, we extend the smoothing period for low-traffic environments to enable better signal qualities and better location optimization.