All Projects → calvinlfer → akka-cluster-sample

calvinlfer / akka-cluster-sample

Licence: other
A sample Akka Cluster application that uses ZooKeeper for service discovery

Programming Languages

scala
5932 projects
groovy
2714 projects
shell
77523 projects

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

endless
Scala library to describe sharded and event sourced entities using tagless-final algebras
Stars: ✭ 70 (+438.46%)
Mutual labels:  akka, akka-cluster
distributed-cache-on-k8s-poc
[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes
Stars: ✭ 15 (+15.38%)
Mutual labels:  akka-cluster, akka-cluster-sharding
akka-cookbook
提供清晰、实用的Akka应用指导
Stars: ✭ 30 (+130.77%)
Mutual labels:  akka, akka-cluster
simplexspatial
The Reactive Geospatial Server
Stars: ✭ 17 (+30.77%)
Mutual labels:  akka, akka-cluster
akka-cluster-on-kubernetes
Sample project for deploying Akka Cluster to Kubernetes. Presented at Scala Up North on July 21, 2017.
Stars: ✭ 35 (+169.23%)
Mutual labels:  akka, akka-cluster
khermes
A distributed fake data generator based in Akka.
Stars: ✭ 94 (+623.08%)
Mutual labels:  akka, akka-cluster
akka-cluster-minimal
Akka Cluster - absolute minimal
Stars: ✭ 16 (+23.08%)
Mutual labels:  akka, akka-cluster
Every Single Day I Tldr
A daily digest of the articles or videos I've found interesting, that I want to share with you.
Stars: ✭ 249 (+1815.38%)
Mutual labels:  akka
akka-react-cloudant
A Soccer Dashboard created by scraping EPL website using Akka backend and ReactJS frontend and IBM Cloudant for object storage. IBM Cloud Foundry is used to host both frontend and backend app.
Stars: ✭ 21 (+61.54%)
Mutual labels:  akka
Kmq
Kafka-based message queue
Stars: ✭ 239 (+1738.46%)
Mutual labels:  akka
kafka-elk-docker-compose
Deploy ELK stack and kafka with docker-compose
Stars: ✭ 78 (+500%)
Mutual labels:  zookeeper
young-crawler
scala结合actor编写的分布式网络爬虫
Stars: ✭ 15 (+15.38%)
Mutual labels:  akka
Akka Kryo Serialization
Kryo-based serialization for Akka
Stars: ✭ 229 (+1661.54%)
Mutual labels:  akka
eagle
Eagle分布式rpc调用,借助Zookeeper实现服务注册和发现,基于AQS实现高性能连接池,支持分布式追踪、监控、过载保护等配置。提供Spring和SpringBoot插件,方便与Spring和SpringBoot集成。
Stars: ✭ 77 (+492.31%)
Mutual labels:  zookeeper
Powerjob
Enterprise job scheduling middleware with distributed computing ability.
Stars: ✭ 3,231 (+24753.85%)
Mutual labels:  akka
tasktick
An example Task Manager project that has been created using Lagom.
Stars: ✭ 19 (+46.15%)
Mutual labels:  akka
Lagom
Reactive Microservices for the JVM
Stars: ✭ 2,590 (+19823.08%)
Mutual labels:  akka
NZookeeper
A zookeeper client library based on ZookeeperEx,easily use for Zookeeper.
Stars: ✭ 14 (+7.69%)
Mutual labels:  zookeeper
elec-master-demo
这是个demo代码,想使用请见 brotherbin/electing-master
Stars: ✭ 18 (+38.46%)
Mutual labels:  zookeeper
shield
基于Strom的日志实时流量分析主动防御(CCFirewall)系统
Stars: ✭ 68 (+423.08%)
Mutual labels:  zookeeper

Akka Cluster Sample (using ConstructR with ZooKeeper)

This is a demonstration of how to use ZooKeeper with the help of ConstructR to bootstrap an Akka Cluster.

Build Status

Problem statement

The process of discovering seed nodes and joining an existing cluster is a perilous journey especially in cloud environments due to the ephemeral nature of instances. You can get into situations where you form two or more clusters if you incorrectly detect that no seed nodes are up causing massive problems for your data. Thankfully, service discovery mechanisms like Consul, etcd and ZooKeeper are there to help find out if existing seed nodes exist and ensure that a single cluster forms correctly.

What does this project do?

This project uses ConstructR backed by ConstructR-ZooKeeper in order to bootstrap the cluster i.e. discover existing seed nodes if they exist and ensure that new nodes join the existing cluster. Once the application is ready, Greeter Actors on all nodes will begin messaging Cluster Sharded Member Actors so you can see some activity.

Running the cluster

In order to run the cluster, we make use of Docker Compose and the SBT Native Packager. First, create a Docker image in your local Docker registry using sbt docker:publishLocal or using ./scripts/docker-image.sh. Once this has been complete, spin up the set of services (ZooKeeper and 3 clustered application nodes) that represent this application via docker-compose up. When you are satisfied, use docker-compose down -v to bring down the application.

Note: If you want to run multiple clustered applications directly on your host machine, you will need to change the default port Akka Cluster uses for gossip since all applications use the default port.

Under the hood

Using Docker Compose means that a Docker network is created and containers are automatically placed into this network. This means that the containers are free to communicate with each other. We make the Akka Cluster applications talk to ZooKeeper by using the Container DNS mechanism offered by Docker. The Akka Cluster applications will use ZooKeeper (via ConstructR) to discover the seed nodes and join the same cluster and will communicate with each other.

Note: This does not take care of Split Brain Resolution, this takes care of bootstrapping a cluster. If you are looking for an open-source Split Brain Resolver then see akka-batteries for an excellent example and also refer to Niko Will's talk.

Where to go next

  • See a more detailed example
  • A talk we did that goes through all the problems we encountered and how we solved them
  • A detailed blog post of the entire process
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].