Creating custom routing strategies
Once you have at least two CDNs activated for a domain, the AI Load Balancing should be working automatically. You have the option to create/customize your routing strategy, however, we usually recommend leave it as-is unless you have special requirements.
Creating a strategy
Navigate to 'AI Load Balancing' > 'Routing strategies'.
By default, you'll see a built-in strategy which cannot be removed. This is the default intelligent traffic routing strategy that'll route your domain traffic to the best performing CDN by evaluating the performance and availability.
You can click 'Add strategy' to create a new strategy.
Currently, there are three strategies available:
- Static routing: select a (or multiple) locations and tell the system to always use a CDN in that location
- Best latency (Business, Enterprise plan only): always choose the CDN with the best latency, you can also set an availability threshold to prevent the system from selecting a CDN with bad availability
- Best availability (Business, Enterprise plan only): always choose the CDN with the best availability regardless of the latency
Ordering your strategies
The strategy order is extremely important because it dictates which strategy to trigger depending on the network status in the location of a request. Here's an example:
|test-01||Static routing||Always use: Akamai, Target location: United States||
|test-02||Best latency|| Availability threshold: 70%
Let's say your strategy list looks like this and you have an user accessing your domain from the UK, the system will skip the first strategy since it's targeting requests from the US. If the system can find a CDN that has 70% plus availability, it will assign the request to that CDN, otherwise, the system will choose the best CDN that's the most suitable.