Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microservices styles and tradeoffs - Akka cluster vs Kubernetes vs

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! ;)

like image 533
Matjaz Muhic Avatar asked Aug 19 '15 10:08

Matjaz Muhic


People also ask

Is Akka good for Microservices?

In general we recommend against using Akka Cluster and actor messaging between different services because that would result in a too tight code coupling between the services and difficulties deploying these independent of each other, which is one of the main reasons for using a microservices architecture.

Will Serverless replace Kubernetes?

From this point of view, serverless doesn't come after Kubernetes and we cannot consider serverless as a replacement to the containers. They are just two different approaches to implement the hosting part in a web application. Maybe in some cases, you may prefer one or the other.

Is Kubernetes cheaper than serverless?

Serverless can become expensive. For example, AWS API Gateway is a great service but the cost can add up over time. All these integrations with more expensive service can drastically increase the cost. If you have a more or less steady load, Kubernetes will be cheaper.

What is difference between Docker and Kubernetes?

In a nutshell, Docker is a suite of software development tools for creating, sharing and running individual containers; Kubernetes is a system for operating containerized applications at scale. Think of containers as standardized packaging for microservices with all the needed application code and dependencies inside.


Video Answer


1 Answers

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 :)

like image 100
Tim Hockin Avatar answered Nov 15 '22 06:11

Tim Hockin