NetTalk Central

Author Topic: Google Cloud Platform - Load Balance  (Read 5889 times)

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Google Cloud Platform - Load Balance
« on: April 22, 2016, 03:15:24 PM »
Hi,

I have to deploy an NT app that will have to deal with a lot of connections and I'm testing GCP Load Balance and Automatic Scaling. For your first project you earn 300 bucks to be spent in 60 days.

Using a single VM machine it's ok but when adding VMs to the pool GCP is breaking a desktop NT app sending wrong session pages to client side. It seems that GCP is switching VMs in the middle of a session and loosing sequence.

Does anyone had an experience with GCP using Load Balance and Automatic Scaling?

Thank you.

Regards,

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Google Cloud Platform - Load Balance
« Reply #1 on: April 24, 2016, 11:06:20 PM »
alas I've not used GCP.

can you define "lot of connections"?

Cheers
Bruce

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Google Cloud Platform - Load Balance
« Reply #2 on: April 27, 2016, 11:40:07 AM »
Hi Bruce,

After lauching app it will receive a growing number of connections that it could have peaks of 1000's per second.or more as the final customer estimates.

Thank you.

Cheers,

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Google Cloud Platform - Load Balance
« Reply #3 on: April 29, 2016, 02:14:00 AM »
Hi Marcos,

I don't think GCP will be an effective load balancer for you in this case. At least not at this time.
You want to use a Session based load balancer (so that the requests for 1 user go to one server.)
Google says that is not yet ready for production use for them.
https://cloud.google.com/compute/docs/load-balancing/http/#session_affinity

If you did want to use it you would likely use Cookie Based Affinity;
https://cloud.google.com/compute/docs/load-balancing/http/backend-service#generated_cookie_affinity
which looks easy enough to turn on if you want to try that.

>> After lauching app it will receive a growing number of connections that it could have peaks of 1000's per second.or more as the final customer estimates

While it's good to have a plan, it will be interesting to see if they get anything like this kind of traffic. Most users overestimate the connections by a _lot_. I would deploy, keep an eye on performance metrics, and add in the load balancing, and extra servers as and when it becomes necessary.


Cheers
Bruce


Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Google Cloud Platform - Load Balance
« Reply #4 on: April 29, 2016, 11:55:21 AM »
Hi Bruce,

I'll try it and post here results.

In NT WebServer/NetSimpleObject/Settings/Security there's a configuration "Bind Session to IP Address". Do you think that this setting could help?

About end users yeah they overestimate a lot. And I will follow your directions.

Thank you.

Cheers,

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Google Cloud Platform - Load Balance
« Reply #5 on: May 03, 2016, 01:34:42 AM »
Hi Marcos,

>> In NT WebServer/NetSimpleObject/Settings/Security there's a configuration "Bind Session to IP Address". Do you think that this setting could help?

No, that setting is for something else.
It basically means that once a user has connected to the server, from a specific IP address, then the session is not allowed to "come from" another IP address - for the life of the session. This is a good security measure in some cases, but some people access via a "proxy farm" and in this case the IP address of the user can (legitimately) change.

I usually try with this setting on, and then turn it off if the hosting setup doesn't work well with it. I'm not sure in your case if it will like it or not.

cheers
Bruce

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Google Cloud Platform - Load Balance
« Reply #6 on: May 27, 2016, 10:57:26 PM »
Hi,

Here's my experiment with Google Compute Engine or GCE.

Installed NT application on VM with fixed external IP and without Load Balancer works fine.

Start with Load Balance tests.

If I use Network Load Balance it seems to work but as Bruce said if client is behind a proxy farm we could be in trouble when IP changes dynamically.

Without Session Affinity Load Balance mess with communication sending from/to different servers to the same client.

As Bruce suggested the only configuration possible is HTTP(S) Load Balance wiht Session Affinity. In this kind of configuration Load Balancer adds it's own cookie that grants that communication will not break between clients and servers.

But as Bruce pointed this feature is in alpha stage so Google can make changes that breaks down this feature and I have to update Session Affinity command and boot all VMs again to get it work again.

To use this feature you have to agree with a declation that you accept this behaviour. This took about a couple of weeks because I'm using a project with free test type and priority is very low...

So this solution is not meant to be used in production.

Google internal Loa Balancer is based on HAProxy Open Source project that I found in Google documentation later saying that you could use it building another VM with this software and using as a customized Load Balancer. I'd not tried yet but documentation describes how to implement it and integrate with Google Compute Engine.

There's another limitation with this HTTP(S) configuration. Google states that HTTP(S) does not support Web Sockets. As I understood Load Balancer could filter some packages. But if you use HAProxy your own I found that you can configure out of box that it could accpept Web Sockets.

So there's some ways to use Google Compute Engine but it will take a lot of effort to get Load Balancer to work.

Hope that this could help who's looking for Load Balance solution in Google Compute Engine with your projects.

Cheers,

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Google Cloud Platform - Load Balance
« Reply #7 on: May 30, 2016, 12:00:01 AM »
thanks for the feedback Marcos.