All Projects → sap1ens → akka-cluster-consul

sap1ens / akka-cluster-consul

Licence: MIT License
Example of bootstrapping Akka Cluster with Consul

Programming Languages

scala
5932 projects
shell
77523 projects

Projects that are alternatives of or similar to akka-cluster-consul

Constructr Consul
This library enables to use Consul as cluster coordinator in a ConstructR based node
Stars: ✭ 32 (+23.08%)
Mutual labels:  akka, consul
service-mesh-labs
Lab scenarios for learning how to service mesh.
Stars: ✭ 22 (-15.38%)
Mutual labels:  consul
Distributed-eStore
Ecommerce SPA application with a microservices architecture implemented from scratch. Tech stack - Docker, Consul, Fabio, RabbitMQ, .Net Core, Mediatr, CQRS, React, Redux. .NET Core Microservices template, .NET React Redux, .NET RabbitMQ, .NET Distributed, Docker, .NET Core with Docker.
Stars: ✭ 99 (+280.77%)
Mutual labels:  consul
akka-quickstart-scala.g8
A minimal seed template for an Akka with Scala build
Stars: ✭ 52 (+100%)
Mutual labels:  akka
mesos-executor
Customizable Apache Mesos task executor
Stars: ✭ 50 (+92.31%)
Mutual labels:  consul
nomad-consult-ansible-centos
Deploy nomad & consult on centos with ansible
Stars: ✭ 17 (-34.62%)
Mutual labels:  consul
AusweisBot
Telegram bot to generate self-authorizations for moving around during covid-19 pandemic in France
Stars: ✭ 13 (-50%)
Mutual labels:  akka
Akka-Streams-custom-stream-processing-examples
Demos of how to do custom stream processing using the Akka Streams GraphStages API
Stars: ✭ 13 (-50%)
Mutual labels:  akka
kamon-akka-http
Kamon integration for metrics, context and distributed tracing with Akka HTTP
Stars: ✭ 75 (+188.46%)
Mutual labels:  akka
consul-envoy
Consul to Envoy API listener
Stars: ✭ 35 (+34.62%)
Mutual labels:  consul
meshery-operator
The service mesh operator.
Stars: ✭ 41 (+57.69%)
Mutual labels:  consul
super-duper-vault-train
🚄▼▼▼▼▼▼
Stars: ✭ 19 (-26.92%)
Mutual labels:  consul
dns4s
Scala DNS implementation with Akka and Netty extension
Stars: ✭ 55 (+111.54%)
Mutual labels:  akka
atomic-store
Atomic event store for Scala/Akka
Stars: ✭ 17 (-34.62%)
Mutual labels:  akka
Study.Microservices
一步一步,由浅入深,学习如何使用.net core搭建微服务框架。
Stars: ✭ 18 (-30.77%)
Mutual labels:  consul
powerapi-scala
PowerAPI is a middleware toolkit for building software-defined power meters
Stars: ✭ 70 (+169.23%)
Mutual labels:  akka
image-hub
Image Hub is a sample application for exploring WebAssembly modules used as Envoy filters.
Stars: ✭ 56 (+115.38%)
Mutual labels:  consul
ssl-config
SSL configuration logic, extracted from Play's WS (for use in Akka et al).
Stars: ✭ 65 (+150%)
Mutual labels:  akka
TheAkkaWay
Akka Chinese Book / What should be included in it?
Stars: ✭ 19 (-26.92%)
Mutual labels:  akka
dropwizard-consul
Dropwizard Consul Bundle
Stars: ✭ 55 (+111.54%)
Mutual labels:  consul

Bootstrapping Akka Cluster With Consul

If you want to start using Akka Cluster you should solve cluster bootstrapping first. Almost every tutorial on the internet (including the official one) tells you to use seed nodes. It looks something like this:

akka.cluster.seed-nodes = [
  "akka.tcp://ClusterSystem@host1:2552",
  "akka.tcp://ClusterSystem@host2:2552"
]

but wait… Hardcoding nodes manually? Now when we have Continuous Delivery, Immutable Infrastructure, tools like CloudFormation and Terraform, and of course Containers?!

Well, Akka Cluster also provides programmatic API for bootstrapping:

def joinSeedNodes(seedNodes: Seq[Address]): Unit

So, instead of defining seed nodes manually we’re going to use service discovery with Consul to register all nodes after startup and use provided API to create a cluster programmatically. Let’s do it!

TL;DR

It’s very easy to try (with Docker):

$ git clone https://github.com/sap1ens/akka-cluster-consul.git
$ docker-compose up

Docker Compose will start 6 containers:

  • 3 for Consul Cluster
  • 3 for Akka Cluster

Everything should just work and in about 15 seconds after startup you should see a few Cluster is ready! messages in logs - it worked!

More details with explanations can be found here: http://sap1ens.com/blog/2016/11/12/bootstrapping-akka-cluster-with-consul/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].