Score:0

UDP LoadBalancer using Nginx for CoTURN

br flag

I am trying to add a Nginx UDP LoadBalancer in front of CoTURN.

  • Installed ejabberd in a VM
  • Installed nginx in a VM
  • Installed coturn in a VM

Nginx config:

log_format    basic    '$remote_addr [$time_local] '
                       '$protocol $status $bytes_sent $bytes_received '
                       '$session_time';

# Enable access_log statements for debugging

access_log /var/log/nginx/stream.log basic buffer=32k;

upstream stream_cluster {
#    hash $remote_addr consistent;
    least_conn;
    server 30.40.50.60:3478;
    server 30.40.50.61:3478;
}

server {
    listen 3478 udp reuseport;
    listen 3478;
    #All UDP/TCP traffic will be forwarded to the cluster
    proxy_buffer_size 4096k;
    proxy_responses 0;
    proxy_bind $remote_addr transparent;
    proxy_protocol on;
    proxy_pass stream_cluster;
    allow all;
#    error_log /var/log/nginx/stream.log;
}

coturn is working nicely when directly used along with ejabberd. All required ports are open in the Security Policy. But nginx is not passing the data to the upstream. I have followed the official nginx documentation.

Not sure what I am doing wrong.

Michael Hampton avatar
cz flag
Don't use public IPv4 addresses, especially when they belong to the US military. Your traffic could be accidentally routed out to the real owner of the IP address instead of your internal networks.
Jubayer Arefin avatar
br flag
These are just placeholder ipv4 addresses. We use private ipv4 in production.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.