Skip to main content

Dynamic Traffic Controller

KubeSlice makes it easy to distribute applications to many different Kubernetes clusters. When an instance of the same service is present in multiple clusters, an anycast address is often associated with the service to direct traffic to the nearest site. However, this approach does not take into account the loading of the application at that site. To address this, we offer the combination of Dynamic Traffic Director and Avesha's enhanced ExternalDNS offering. With these tools, you can configure the distribution of traffic to your services based on the loading of the application at each site, ensuring that your users always have the best possible experience.

The Dynamic Traffic Controller automatically updates the weight attribute of services it is enabled on in the cluster. This causes ExternalDNS to update the weight with supported DNS providers. Supported providers can then direct more or less traffic to a given service instance in proportion with the advertised weight.

info

You can only configure and use Avesha's ExternalDNS without using Avesha's DTC.

However, you must configure and use Avesha's DTC with Avesha's ExternalDNS.

The Dynamic Traffic Controller calculates the average CPU usage of each monitored service in the cluster over the previous three minutes and uses this value to determine the weight of the service. When combined with ExternalDNS, the ExternalDNS tool will signal that the weight of the service should be updated to the calculated value. This ensures that as clusters become overloaded, traffic will be directed toward other clusters that are less utilized. By consistently monitoring and adjusting the weight of the service, the Dynamic Traffic Controller will ensure your Kubernetes clusters are running efficiently with an intelligent division of labor.

Imagine you are a DevOps engineer for a large e-commerce company and have two or more Kubernetes clusters running in multiple regions. One day, you notice a spike in usage of your application and want to ensure that your users have the best possible experience. Instead of manually making changes to your infrastructure whenever a fluctuation in usage occurs, you can use this tool to dynamically distribute the load. With automatic monitoring and adjustment of the weights of the DNS records, it would be easier to ensure that the workload is distributed evenly among the clusters and that the clusters with the lowest CPU usage receive the most traffic. Overall, this makes it much easier to distribute traffic between multiple Kubernetes clusters to improve user experience and site performance.