All Projects → twinformatics → Eureka Consul Adapter

twinformatics / Eureka Consul Adapter

Licence: mit
This project contains a Spring Boot Starter that registers HTTP endpoints on a Spring Cloud Eureka server to support Prometheus's service discovery mechanism for Consul (<consul_sd_config>)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Eureka Consul Adapter

Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (+655.91%)
Mutual labels:  spring-boot, spring, spring-cloud, consul, service-discovery
Bookstoreapp Distributed Application
Ecommerce project is being developed using Spring Boot Microservices and Spring Cloud (Backend) and React (Frontend). Splitting the Ecommerce functionality into various individual microservices so that they can be distributed, scale really well and make use of resources efficiently.
Stars: ✭ 63 (-32.26%)
Mutual labels:  eureka, spring-boot, spring-cloud, consul, prometheus
Springcloudlearning
《史上最简单的Spring Cloud教程源码》
Stars: ✭ 16,218 (+17338.71%)
Mutual labels:  eureka, spring-boot, spring, spring-cloud, consul
Jbone
jbone基于Spring Cloud框架开发,旨在为中小企业提供稳定的微服务解决方案,为开发人员提供基础开发骨架,jbone包含微服务中所有常用组件,例如注册中心、服务管理、服务监控、JVM监控、内存分析、调用链跟踪、API网关等等。业务功能包括系统权限的统一管理、单点登录、CMS、电商平台、工作流平台、支付平台等等。
Stars: ✭ 961 (+933.33%)
Mutual labels:  eureka, spring-boot, spring, spring-cloud
Spring Cloud Cli
Spring Cloud CLI features
Stars: ✭ 139 (+49.46%)
Mutual labels:  eureka, spring-boot, spring, spring-cloud
Mini Platform
Mini-Platform致力于更简洁易用的轻量级微服务治理平台。
Stars: ✭ 45 (-51.61%)
Mutual labels:  eureka, spring-boot, spring, spring-cloud
Springcloudexamples
Spring Cloud 学习教程
Stars: ✭ 208 (+123.66%)
Mutual labels:  eureka, spring-boot, spring-cloud, consul
Spring Cloud Learning
☁️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、服务网关、配置中心、熔断机制、应用监控。
Stars: ✭ 37 (-60.22%)
Mutual labels:  eureka, spring-boot, spring-cloud, consul
Spring Cloud Zookeeper
Spring Cloud Zookeeper
Stars: ✭ 481 (+417.2%)
Mutual labels:  spring-boot, spring, spring-cloud, service-discovery
Spring Cloud Cloudfoundry
Integration between Cloudfoundry and the Spring Cloud APIs
Stars: ✭ 83 (-10.75%)
Mutual labels:  spring-boot, spring, spring-cloud, service-discovery
Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+7253.76%)
Mutual labels:  eureka, spring-boot, spring-cloud, consul
Localstack Spring Boot
Spring Boot AutoConfiguration for LocalStack
Stars: ✭ 22 (-76.34%)
Mutual labels:  spring-boot, spring, spring-cloud
Febs Cloud
基于Spring Cloud Hoxton.RELEASE、Spring Cloud OAuth2 & Spring Cloud Alibaba & Element 微服务权限系统,开箱即用。预览地址:https://cloud.mrbird.cn
Stars: ✭ 1,295 (+1292.47%)
Mutual labels:  spring-boot, spring-cloud, prometheus
Spring Cloud Examples
Examples of microservice instrastructures
Stars: ✭ 11 (-88.17%)
Mutual labels:  spring-boot, spring, spring-cloud
Onetwo
一个基于spring和spring boot的快速开发框架……
Stars: ✭ 16 (-82.8%)
Mutual labels:  spring-boot, spring, spring-cloud
Devops Service
DevOps Service is the core service of Choerodon. It integrated several open source tools to automate the DevOps process of planning, coding, building, testing, and deployment, operation, monitoring.
Stars: ✭ 36 (-61.29%)
Mutual labels:  spring-boot, spring, spring-cloud
Fxshop
基于SpringBoot+SpringCloud微服务的商城项目(demo版 不可用于生产)
Stars: ✭ 82 (-11.83%)
Mutual labels:  eureka, spring-boot, spring-cloud
Spring Petclinic Microservices
Distributed version of Spring Petclinic built with Spring Cloud
Stars: ✭ 814 (+775.27%)
Mutual labels:  eureka, spring-cloud, prometheus
Spring Thrift Api Gateway
Gateway for Apache Thrift requests processing that is built on Spring Cloud stack
Stars: ✭ 38 (-59.14%)
Mutual labels:  spring-boot, spring, spring-cloud
Genesis
Spring cloud Example
Stars: ✭ 83 (-10.75%)
Mutual labels:  eureka, spring-boot, spring-cloud

Eureka Consul Adapter (for Prometheus)

This project contains a Spring Boot Starter that registers HTTP endpoints on a Spring Cloud Eureka server to support Prometheus's discovery mechanism for Consul (<consul_sd_config>)

Restrictions

This adapter does not support everything of Consul's HTTP API but only those endpoints and attributes that are required for Prometheus' service discovery mechanism.

Functionality

This starter adds the following HTTP endpoints:

  • /v1/agent/self Returns the name of the datacenter in use (Consul API: https://www.consul.io/api/agent.html#read-configuration). In Eureka, this can be set using the archaius.deployment.datacenter configuration property.
  • /v1/catalog/services Returns the names of the deployed applications (Consul API: https://www.consul.io/api/catalog.html#list-services). No service tags service will be returned as Eureka does not support this concept.
  • /v1/catalog/service/{service} Returns all available details for the particular application (instances, host names, ports, meta data, service tags). No service tags service will be returned as Eureka does not support this concept.

Long-polling

Consul HTTP API offers long-polling on some of its endpoints. Prometheus' client uses this functionality to get notified about changes in the registry (i.e. service de-/registrations). Prometheus adds the wait parameter (e.g. http://service-registry/v1/catalog/service/MY-SERVICE?wait=30000ms ), which causes the response to be delayed by specified time passed or returns immediately if the service itself changes within this time range. This behaviour has the benefit, that services changes are detected at once whithout have to wait the whole polling interval. Prometheus opens one long-polling request for each service. In order not to block one thread for each call, this adapter uses the async capabilities of Spring MVC. The default timeout for async requests is by default lower than 30 seconds and can cause AsyncRequestTimeoutExceptions. To prevent this you need to set spring.mvc.async.request-timeout to at least 35000 (35 seconds).

Configuration options

Add the following options to your config (e.g. application.properties), if required.

  • eurekaConsulAdapter.preferHostName: setting this to true uses the hostname rather than the ip address of the service (default is false)
  • eurekaConsulAdapter.useNodeMeta: use the ServiceMeta tag for metadata instead of NodeMeta (details see #16).
  • eurekaConsulAdapter.nodeMetaPrefix: only move those meta entries that match the prefix. the prefix will be trimmed from the entry key (details see #16).

How to use this starter

Simply add this dependency the your Spring Cloud Eureka Server (https://github.com/spring-cloud-samples/eureka):

Maven

<dependency>
  <groupId>at.twinformatics</groupId>
  <artifactId>eureka-consul-adapter</artifactId>
  <version>${eureka-consul-adapter.version}</version>
</dependency>

Gradle

dependencies {
    compile 'at.twinformatics:eureka-consul-adapter:${eureka-consul-adapter.version}'
}

Requirements

  • Java 1.8+

Versions 1.1.x and later

  • Spring Boot 2.1.x
  • Spring Cloud Greenwich

Versions 1.0.x and later

  • Spring Boot 2.0.x
  • Spring Cloud Finchley

Versions 0.x

  • Spring Boot 1.5.x
  • Spring Cloud Edgware
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].