How to Scale Meteor on Google Cloud?

Hello,

I have recently used meteor as a server in my application. clients that
connect to this server are build using Ionic and Angular js.
Following is my deployment architecture.

clients (mobile,web,tablet) are connected to meteor server via load
balancer on google cloud ( TCP proxy for Google Cloud Load Balancing).
According to my readings in this case load balancer should support
sticky sessions, and every request should go the same meteor for next
concurrent requests. As per Google cloud’s TCP load balancers doesn’t
support sticky sessions. But in my primary testing I found everything
working fine:

1.Assuming sticky session is
not supported then every request from client should have been equally
distributed to all available servers in round robin fashion.
2.If one of the meteor serve has user’s logged-in session information and it
goes down then same client request should have not been served by other servers.

Actual results :

  1. Once user is logged-in to the application and get connected to a meteor
    server all requests are routed to same server unless I refresh the
    browser page on web.
  2. If I shut-down one meteor server then all the client requests connected to that servers are redirected to
    another meteor server and responded without any failure, (without any browser refresh).

Though everything is working as expected and I am able to scale multiple meteors as I need, I wonder: Is there anything missing which can cause issues in production? In future is there any performance or scaling issues that can occur? Is there any other way which can enable scaling? What could be the reason in above set-up things are working?

References:

https://meteorhacks.com/how-to-scale-meteor/

2 Likes

Interesting. It’s over 1 year ago, is there any update? Thank you.

HTTPS load balancing has session affinity. I think it’s kind of sticky sessions:

Session affinity sends all request from the same client to the same virtual machine instance as long as the instance stays healthy and has capacity.

1 Like