meteorhacks / cluster

Clustering solution for Meteor with load balancing and service discovery
https://meteorhacks.com/cluster-a-different-kind-of-load-balancer-for-meteor.html
MIT License
632 stars 80 forks source link

terminology/semantics of "balancer" #117

Open SierraGolf opened 8 years ago

SierraGolf commented 8 years ago

Hi @arunoda,

first of all thank you for creating this awesome package. You are doing a really great job!

I recently went to production and started evaluating load-balancing strategies and I settled for cluster because it is the cheapest and most efficient I could find.

When I was reading through the docs I first had some issues understanding how exactly cluster works with regards to "load balancing". I think my confusion came from the fact that the environment variable which allows an instance to handle ddp-traffix for other instances is called CLUSTER_BALANCER_URL. Also the textual descriptions refer to the server becoming a balancer by setting the before mentioned environment variable.

As far as I understand each instance automatically becomes a "balancer" when it uses the cluster package and there are instances which declare that they can take ddp-traffic from other instances.

So setting the CLUSTER_BALANCER_URL does not make a node a "balancer" but makes it a "worker" in the distributed balancing scheme.

So every instance is a "balancer", but not every instance has to be a "worker".

Does that make any sense?

If so, I would suggest renaming CLUSTER_BALANCER_URL and the respective js-api to CLUSTER_DDP_WORKER_URL.