Microservices styles and tradeoffs - Akka cluster vs Kubernetes vs

2.1k views Asked by At

So, here's the thing. I really like the idea of microservices and want to set it up and test it before deciding if I want to use it in production. And then if I do want to use it I want to slowly chip away pieces of my old rails app and move logic to microservices. This I think I can do using HAProxy and set up different routing based on URLs. So this should be covered.

Then my next biggest concern is that I don't want too much overhead to ensure everything is running smoothly on the infrastructure side. I want preferrably low configuration and the ease of development, testing and deployment.

Now, I want to know what are the benefits and downsides of each styles. Akka (cluster) vs something like Kubernetes (maybe even fabric8 on top of it).

What I also worry about is fault tolerance. I don't know how do you do that with Kubernetes. Do you then have to include some message queue to ensure your messages don't get lost? And then also have multiple queue if one of the queues goes down? Or just retry until queue comes up again? Akka actors already have that right? Retrying and mail boxes? What are the strategies for fault tolerance for microservices? Do they differ for each approach?

Someone please enlighten me! ;)

1

There are 1 answers

0
Tim Hockin On

I don't know much about Akka, but from reading quickly it seems that it is an app framework. Kubernetes is at a bit of a lower-level. Kubernetes runs your containers and manages them for you. We don't have a concept of queues or mailboxes.

Kubernetes will soon have L7 load balancing so you can do URL maps.

As for fault tolerance - kubernetes ensures that your stated intentions are true - run N copies of this container. That container might be an Akka app or might be mysql - dopesn't matter.

There are a bunch of guides on Docker + Akka. Kubernetes makes managing docker containers easier, but the app is still yours :)