Question - Can we do autoscaling of coturn server running on EC2 Instance ?
Hello Team,
Is it possible to enable auto scaling on turn server ? We deployed coturn on AWS EC2 instance and trying to use auto scaling group to add more coturn server in the load balancer target group.
Please let us know if this is feasible solution to auto scale coturn ?
@eakraly
Yes possible. So you could scale out based on CPU or network capacity
How do you plan to load balance traffic across those instances?
We are using Network load balancer to auto scale coturn ec2 instance.
Are you trying to route all the traffic through NLB? Or just using ASG and LB as a scaling mechanism? One thing is scaling but another thing is how the traffic is getting in and out
If you are trying following:
- NLB and EC2 ASG for turn address (so you have a single turn "endpoint")
- Maybe you can even have NLB terminate SSL
- Your EC2 (and turnservers) have public IPs and those are the actual relay candidates that will be used
- ASG scales based on CPU
Sounds like something that can work. Never tried it myself.
An important point to look out for in any scaling mechanism - draining during scale in. When you take an instance offline (scaling in) you want it to have 0 sessions (ideally) to get best UX. Of course depends on your application - some are more sensitive than others to disconnects.
Hi @eakraly
Does the application work if we use the TCP protocol and port 3478? I notice that the application is listening on both protocols, i.e., UDP and TCP. It is working with the UDP protocol on port 3478, but it fails when I use the TCP protocol on port 3478. Therefore, I was wondering if TCP on port 3478 is supported? And because of that my TLS encryption at NLB is not working as I registered the coturn server on port TCP 3478 behind the NLB.