I’m trying to horizontally scale a LiveKit + SIP trunk setup on AWS when all traffic from the telco comes from a single fixed IP. Today I run one SIP gateway pod and one LiveKit server pod; they connect over WebSocket. In front I use an AWS Network Load Balancer (UDP) that points to an Auto Scaling Group.
In the docs: AWS Network Load Balancer, when handling UDP, distributes packets using a flow hash (5-tuple: src IP, src port, dst IP, dst port, protocol). Packets from the same client will go to the same target as long as the src IP and src port stay the same.
Because the telco uses one IP, the flow hashing keeps sending traffic to the same target. Even if I add more SIP/LiveKit pods, one pair ends up taking almost everything. A call that starts on one pod needs to stay on that pod. If I turn off stickiness, packets can be sent to another SIP gateway pod mid-call and that causes errors.
What’s a practical way to make this scale horizontally? How can I add a second SIP+LiveKit pair and actually get traffic to it?