I am in the process of transitioning from Docker Swarm to Kubernetes for my WebRTC stack and have a query regarding networking. Before delving into my specific issue, I want to emphasize that network performance is critical for this project, as it involves a real-time video conferencing application where latency is a key concern.
Currently, my setup involves two deployments: one on AWS and another on-premises. In the AWS environment, I have a Coturn service (configured with a single replica per host) that handles a large volume of UDP packets, relaying them to the Janus WebRTC gateway server (multiple replicas, one replica per host). Both Coturn and Janus services utilize the host network, under the assumption that it offers better performance for high-throughput UDP traffic.
For the on-premises setup, I have multiple Janus servers running on a single bare-metal server. Each Janus server is assigned its own virtual IP using a macvlan network. The Coturn service, still on the host network, relays traffic to these Janus servers.
In both AWS and on-premises environments, I have opted out of the default service discovery by disabling the overlay network and instead use Consul for service discovery.
As I make the switch to Kubernetes, I’m reconsidering the network architecture and would like to gather opinions on the best approach. I am interested in the potential benefits of Kubernetes’ native service discovery and overlay network, which could simplify the setup by eliminating the need for macvlan networks.
Could you provide insights or recommendations on the optimal network configuration for this scenario in Kubernetes, especially considering the high importance of network performance for real-time video streaming?
Thank you for your guidance.