Network Load Balancer for UDP (SIP)

2,009 views
Skip to first unread message

Oussama Hammami

unread,
Dec 13, 2017, 9:05:12 AM12/13/17
to gce-discussion
Hi,

I'm working in a project to move our SIP infra. to GCP.

I'm using a SIP proxy (kamailio) in front of my PBX servers (Asterisk) and now I've configured a Google Network LB to load balance the incoming SIP traffic (udp:5060). it works but i would like to confirm some point and share my configuration maybe will help someone to spare some time.

NB
Network load balancing relies on legacy HTTP Health checks for determining instance health. Even if your service does not use HTTP, you'll need to at least run a basic web server on each instance that the health check system can query.

> Don't fall into the trap like I did :D I hope we will have the UDP health check soon !

1. I created a Network LB with a Regional address IP not a Global, is that correct ?
because I don't need one the gcp Network LB is regional and not global like https LB.

2. I when I started sending traffic to the LB IP "35.198.YY.XX" (frontend), the traffic was send from the google proxy to my instance interface without a NAT resolution 

Example of packets received in my instance:

U 79.142.ZZ.ZZ:27183 -> 35.198.YY.XX:5060
....data....

79.142.ZZ.ZZ:27183: the client.
35.198.YY.XX:5060: on my instance.


Without the using the Network IP and if I send the traffic to the static IP assigned to this machine, I receive the traffic assigned to my internal IP

U 79.142.ZZ.ZZ:27183 -> 10.156.YY.XX:5060
....data....

79.142.ZZ.ZZ:27183: the client.
10.156.YY.XX:5060: instance internal IP.


so my solution to resolve this issue was to add an network alias in all backend instances on the primary interface eth0 with the Frontend IP; eth0:0 = "35.198.YY.XX". this alias must use the default gateway for the outgoing traffic (eth0 gw).

the behavior of this Network LB in my case is exactly the same described in the Internal load balancing
https://cloud.google.com/compute/docs/load-balancing/internal/

Thanks,
/Ouss



Fady (Google Cloud Platform)

unread,
Dec 13, 2017, 6:48:07 PM12/13/17
to gce-discussion

Oussama,


Thank you for the information provided. To clarify (to the community) the difference between both Internal and Network LBs:


Internal LB :

Per this document, “Internal Load Balancing enables you to run and scale your services behind a private load balancing IP address that is accessible only to your internal virtual machine instances.”


Network LB:

Per this document, ”Network load balancing is a regional, non-proxied load balancer. You can use it to load balance UDP traffic, and TCP and SSL traffic on ports that are not supported by the (Global)  SSL proxy and TCP proxy load balancers.” and  “A Network load balancer is a pass-through load balancer. It does not proxy connections from clients.”


As for Global LBs, and in addition to the Global TCP (SSL) LBs mentioned above, there are the Global HTTP(S) LBs. For more information about the differences between all load balancers you may check this document.


Magnus Solution

unread,
Feb 11, 2019, 4:35:28 PM2/11/19
to gce-discussion
Hi, can you help how I can add the network alias?

Sunny J (Google Cloud Support)

unread,
Feb 14, 2019, 2:52:05 PM2/14/19
to gce-discussion
Hello Magnus, 

Thank you for the post.


However, the Google Group forum is intended for discussion about GCE Products rather than troubleshooting of specific issues.


To get the most out of your interactions, we recommend you ask specific technical questions like "how do I…" or "what does this error mean?" on StackOverflow or ServerFault tagged with [google-cloud-platform] for more visibility.


Furthermore, you may also see the main Community Support page for a list of the tags we monitor. On Community Help Center  on StackOverflow and ServerFault for information on how to ask a good question.


For the meantime,the following page may help you understand how to configure Alias IP Ranges.


Thank you for using Google Cloud Platform Services.

Madhava Rao Yejarla

unread,
Apr 6, 2019, 5:29:39 PM4/6/19
to gce-discussion
hi, 
i'm also install asterisk  pbx server but my issue is voice is not coming please help me

Jason

unread,
Apr 10, 2019, 9:14:56 PM4/10/19
to gce-discussion
Hi Madhava,

As Sunny has suggested, it would be best to post the issue on either StackOverflow or ServerFault if you need help troubleshooting an issue as there will be more visibility towards it. I would suggest following the advice that Sunny has provided in the previous message.
Reply all
Reply to author
Forward
0 new messages