All Projects → reactiverse → consul-cluster-manager

reactiverse / consul-cluster-manager

Licence: Apache-2.0 license
Consul - based cluster manager that can be plugged into Vert.x ecosystem.

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

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

Linux-admin
Shell scripts to automate download of GitHub traffic statistics, cluster administration, and create an animated GIF.
Stars: ✭ 23 (+35.29%)
Mutual labels:  clustering, cluster-manager
rabbitmq-peer-discovery-consul
Consul-based peer discovery backend for RabbitMQ 3.7.0+
Stars: ✭ 39 (+129.41%)
Mutual labels:  consul, clustering
pulseha
PulseHA is a active-passive high availability cluster daemon that uses GRPC and is written in GO.
Stars: ✭ 15 (-11.76%)
Mutual labels:  clustering, cluster-manager
IntroduceToEclicpseVert.x
This repository contains the code of Vert.x examples contained in my articles published on platforms such as kodcu.com, medium, dzone. How to run each example is described in its readme file.
Stars: ✭ 27 (+58.82%)
Mutual labels:  clustering, vertx
Sample Vertx Microservices
Two applications in different branches illustrates how to create asynchronous microservices with Vert.x, Consul and MongoDB, and how to secure them with Vert.x OAuth2 module and Keycloak
Stars: ✭ 37 (+117.65%)
Mutual labels:  consul, vertx
consul role
Ansible role to install Consul (cluster of) server/agent
Stars: ✭ 14 (-17.65%)
Mutual labels:  consul, clustering
doteasy.rpc
Inspired by microservices, a lightweight framework that looks like a rabbit, based on NET Core 2.0 Standard 2 core library
Stars: ✭ 62 (+264.71%)
Mutual labels:  consul
OcelotSample
Ocelot使用案例,结合IdentityServer4进行鉴权,结合Consul进行服务治理
Stars: ✭ 58 (+241.18%)
Mutual labels:  consul
quartz-scheduler-hazelcast-jobstore
An implementation of a Quartz Scheduler JobStore using Hazelcast distributed Collections
Stars: ✭ 42 (+147.06%)
Mutual labels:  clustering
reactiverse
The Reactiverse main entry point
Stars: ✭ 26 (+52.94%)
Mutual labels:  vertx
dtw-python
Python port of R's Comprehensive Dynamic Time Warp algorithms package
Stars: ✭ 139 (+717.65%)
Mutual labels:  clustering
Machine-learning
This repository will contain all the stuffs required for beginners in ML and DL do follow and star this repo for regular updates
Stars: ✭ 27 (+58.82%)
Mutual labels:  clustering
postsack
Visually cluster your emails by sender, domain, and more to identify waste
Stars: ✭ 288 (+1594.12%)
Mutual labels:  clustering
algorithms
The All ▲lgorithms documentation website.
Stars: ✭ 114 (+570.59%)
Mutual labels:  clustering
learn-layer5
A sample application for learning how to service mesh and for validating SMI conformance
Stars: ✭ 43 (+152.94%)
Mutual labels:  consul
scarf
Toolkit for highly memory efficient analysis of single-cell RNA-Seq, scATAC-Seq and CITE-Seq data. Analyze atlas scale datasets with millions of cells on laptop.
Stars: ✭ 54 (+217.65%)
Mutual labels:  clustering
acoustic-keylogger
Pipeline of a keylogging attack using just an audio signal and unsupervised learning.
Stars: ✭ 80 (+370.59%)
Mutual labels:  clustering
consulator
Import and synchronize your Consul KV data from JSON and YAML
Stars: ✭ 27 (+58.82%)
Mutual labels:  consul
vertx-kotlin-example
Vert.x + Kotlin example
Stars: ✭ 12 (-29.41%)
Mutual labels:  vertx
Leaflet.MarkerCluster.LayerSupport
Sub-plugin for Leaflet.markercluster plugin; brings compatibility with Layers Control and other plugins
Stars: ✭ 53 (+211.76%)
Mutual labels:  clustering

Consul cluster manager for Vert.x ecosystem

Build Status

Introduction

Consul - based cluster manager that is plugable into Vert.x ecosystem. Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Motivation

As we all know Vert.x cluster managers are pluggable and so far we have 6 cluster manager implementations:

If you are already using Consul along with Vert.x within your system - it might be a good fit to use Consul directly as main manager for :

  • discovery and group membership of Vert.x nodes in a cluster Maintaining cluster wide topic subscriber lists (so we know which nodes are interested in which event bus addresses)
  • distributed map support;
  • distributed locks;
  • distributed counters;

Note : Cluster managers do not handle the event bus inter-node transport, this is done directly by Vert.x with TCP connections.

Implementation details

Current consul cluster manager implementation is fully based on vertx-consul-client and vertx-core.

How to use

Version compatibility matrix

Cluster manager Vert.x
0.1.0 3.6.0
0.2.0 3.6.1
0.3.0 3.6.2
0.4.0 3.6.3
1.0.0 3.7.0
1.1.0 3.7.1
1.2.0 3.8.0
1.2.1 3.8.1
1.2.2 3.8.2
3.9.1 3.9.1

Gradle

compile 'io.reactiverse:consul-cluster-manager:${cluster-manager-version}'

Maven

<dependency>
  <groupId>io.reactiverse</groupId>
  <artifactId>consul-cluster-manager</artifactId>
  <version>${cluster-manager-version}</version>
</dependency>

There's more than one way to create an instance of consul cluster manager.

  • Defaut one:

ConsulClusterManager consulClusterManager = new ConsulClusterManager(); // Consul agent should be running then on localhost:8500.

  • Excplicilty specifying configuration:
JsonObject options = new JsonObject()
.put("host", "consulAgentHost") // host on which consul agent is running, if not specified default host will be used which is "localhost".
.put("port", consulAgentPort) // port on wich consul agent is runing, if not specified default port will be used which is "8500".
/*
 * There's an option to utilize built-in internal caching.
 * @{Code false} - enable internal caching of event bus subscribers - this will give us better latency but stale reads (stale subsribers) might appear.
 * @{Code true} - disable internal caching of event bus subscribers - this will give us stronger consistency in terms of fetching event bus subscribers,
 * but this will result in having much more round trips to consul kv store where event bus subs are being kept.
 */
.put("preferConsistency", false)
/*
 * Option to provide custom service name which is visible on web ui
 */
.put("serviceName", "my-custom-service")
/*
 * There's also an option to specify explictly host address on which given cluster manager will be operating on.
 * By defult InetAddress.getLocalHost().getHostAddress() will be executed.
 * Linux systems enumerate the loopback network interface the same way as regular LAN network interfaces, but the JDK
 * InetAddress.getLocalHost method does not specify the algorithm used to select the address returned under such circumstances, and will
 * often return the loopback address, which is not valid for network communication.
 */
 .put("nodeHost", "10.0.0.1");
 // consul client options can be additionally specified as needed.
ConsulClusterManager consulClusterManager = new ConsulClusterManager(options);
  • Once cluster manager instance is created we can easily create clustered vertx. Voilà!
VertxOptions vertxOptions = new VertxOptions();
vertxOptions.setClusterManager(consulClusterManager);
Vertx.clusteredVertx(vertxOptions, res -> {
    if (res.succeeded()) {
	    // clustered vertx instance has been successfully created!
	    Vertx vertx = res.result();
	} else {
	    // something went wrong :(
	}
}

Restrictions

  • Compliant with ONLY Vert.x 3.6.0+ release.
  • The limit on a key's value size of any of the consul maps is 512KB.
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].