Reading up on micro services for a few days now I was wondering how do people go about automating the load balancing and scaling these things?
I have a specific scenario in mind what I would like to achieve but not sure if it's possible or maybe I'm thinking about it wrong. So here it goes...
Let's say I have a cluster of 3 CoreOS machines named A,B and C.
First thing I want is transparent deployment for which I can probably use fleet.
Then I would like to detect, when one of the services is under huge load and deploy another instance of it and have that one and the first one deployed, automatically load balanced in a way that would not disrupt other services that are using it (traffic goes through load balancer from now on).
Another way could be that I manually deploy another version of the services which then gets load balanced automatically and traffic router to the load balancer.
Then the last question, how is this all different to something like Akka cluster and how does development of those differ from micro services?
In my opinion, In the question you asked, there's a hint to your answer "(traffic goes through load balancer from now on)".
I would say - traffic should always go thru load-balancer.
In your simplest case when you have 1 instance of each service, it still has to go thru load-balancer (btw, I think it's a good idea to have at least 2 of everything).
In that case, when you get 3x more traffic and want to spin up another container of the same service, once container is up and running it must register itself in service discovery tool and automatically update load-balancer config to add new 'upstream' entry.
And then using this approach you will be able to scale up/down your services more easily.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With