Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scaling a Meteor Cluster

arunoda
February 02, 2015

Scaling a Meteor Cluster

Let's try to scale a Meteor app using our new meteorhacks:cluster package. No need to use nginx or haproxy for load balancing and scaling.

arunoda

February 02, 2015
Tweet

More Decks by arunoda

Other Decks in Programming

Transcript

  1. Then we wanted to add more instances meteor instance (107.172.78.11)

    meteor instance (107.172.78.12) HaProxy (107.172.78.1)
  2. Then we had an issue with HaProxy meteor instance (107.172.78.11)

    meteor instance (107.172.78.12) HaProxy (107.172.78.1) HaProxy (107.172.78.2)
  3. Issues It’s a complex setup We are not really good

    at HaProxy debugging Adding new an instance is not easy
  4. Benefits No single point of failure Distribute the DDP Traffic

    between all instance Everyone is a master
  5. give me bulletproofmeteor.com here’s the initial HTML give me /sockjs/info

    PhantomJS How Meteor Works Here’s the sockjs configurations create the WebSocket Connections
  6. Benefits No need to install additional tools No configurations (built

    for Meteor) Automatic node discovery Every instance is a load balancer
  7. Benefits Works with any hosting provider by default can be

    used for A/B testing extend load balancing logic great for Mircoservices
  8. Future more load balancing algorithms more stability and tests load

    balance direct websocket connections discovery backend from Kadira