spring-cloud

Spring Eureka: gently shutdown a service

浪尽此生 提交于 2019-12-21 05:47:08
问题 I have service A, that is using services B1 and B2 (two instances of same service), all configured via Eureka. Now I would like to take B1 gently down (so that A has not problems/delays with handling failing B1 requests). I would like to have such a procedure for that: Tell B1 to stop pinging Eureka Make Eureka spread the word, that B1 is going down Wait until A gets the info and does not use B1 anymore Then shutdown B1 I have a problem with step 1. How can I request B1 to stop pinging?

Spring plan for Zuul 2

二次信任 提交于 2019-12-21 05:41:12
问题 I've heard that Zuul 2 is released. Are there any plan of updating Spring for it? I can't wait. I applied Spring cloud to build a microservice system and think they are awesome. So, Zuul 2 makes me feel excited. 回答1: As far as I can tell Zuul 2 has not been released. We are in the process of releasing Zuul 2 as open source. Once it is released... That being said, given enough lead time, we plan on integrating zuul 2 in the beginning of 2017. 回答2: There's now spring-cloud-gateway . Which is

Spring plan for Zuul 2

亡梦爱人 提交于 2019-12-21 05:41:02
问题 I've heard that Zuul 2 is released. Are there any plan of updating Spring for it? I can't wait. I applied Spring cloud to build a microservice system and think they are awesome. So, Zuul 2 makes me feel excited. 回答1: As far as I can tell Zuul 2 has not been released. We are in the process of releasing Zuul 2 as open source. Once it is released... That being said, given enough lead time, we plan on integrating zuul 2 in the beginning of 2017. 回答2: There's now spring-cloud-gateway . Which is

Simple Reverse Proxy with Spring Boot and Netflix Zuul

巧了我就是萌 提交于 2019-12-21 05:37:09
问题 I'm looking to implement a simple reverse proxy with Spring Boot that is: Easy to add routes Ability to add custom authentication on a per route basis Add additional headers as needed I've looked at the facilities provided by the @EnableZuulProxy annotation but it seems too heavyweight as I don't have a desire to use Eureka, Ribbon, or Hystrix. However, @EnableZuulServer is a bit light on configuration. Would anyone be able to provide an example of what I'm after? Is Netflix Zuul the right

How to use a custom ssh key location with Spring Cloud Config

自古美人都是妖i 提交于 2019-12-21 04:07:06
问题 I am trying to setup a Spring Cloud Config server that uses a custom location for the ssh private key. The reason i need to specify a custom location for the key is because the user running the application has no home directory ..so there is not way for me to use the default ~/.ssh directory for my key. I know that there is the option of creating a read-only account and provide the user/password in the configuration but the ssh way seams more clean. Is there a way I can setup this? 回答1: After

springcloud(五):熔断监控Hystrix Dashboard和Turbine

China☆狼群 提交于 2019-12-20 22:38:41
Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。但是只使用Hystrix Dashboard的话, 你只能看到单个应用内的服务信息, 这明显不够. 我们需要一个工具能让我们汇总系统内多个服务的数据并显示到Hystrix Dashboard上, 这个工具就是Turbine. Hystrix Dashboard 我们在熔断示例项目spring-cloud-consumer-hystrix的基础上更改,重新命名为:spring-cloud-consumer-hystrix-dashboard。 1、添加依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId> </dependency>

学习笔记--SpringCloud

时光怂恿深爱的人放手 提交于 2019-12-20 22:38:30
目录 构建SpringCloud项目 创建服务注册中心(Eureka Server) 创建服务提供者 创建服务提供者2 创建服务消费者(基于Feign) 启动项目 建立分布式配置中心组件config server 构建一个config client 构建高可用分布式配置中心组件config server 使用断路器Hystrix 在ribbon使用断路器 在Feign中使用断路器 使用Hystrix Dashboard(断路器:Hystrix 仪表盘) 路由网关(zuul) 服务过滤 消息总线 构建SpringCloud项目 创建服务注册中心(Eureka Server) 在IDEA中,new project - Spring Initializr,next,选择Cloud Discovery,右边勾选Eureka Server,next 配置文件如下 pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven

Zuul reverse proxy with Keycloak server

家住魔仙堡 提交于 2019-12-20 14:42:45
问题 I'm configuring a Spring Cloud (Angel.SR6) application using the Zuul reverse proxy utility, in order to hide the internal service ports. My zuul (edge) service is published in the 8765 port and my organizations service is in the 8083 one. Everything goes smoothly when I access the application with no security, http://localhost:8765/organization/organizations returns the JSON with all the organizations. However, now I want to integrate a Keycloak SSO (OAuth2) server for authorization purposes

Zuul reverse proxy with Keycloak server

元气小坏坏 提交于 2019-12-20 14:38:03
问题 I'm configuring a Spring Cloud (Angel.SR6) application using the Zuul reverse proxy utility, in order to hide the internal service ports. My zuul (edge) service is published in the 8765 port and my organizations service is in the 8083 one. Everything goes smoothly when I access the application with no security, http://localhost:8765/organization/organizations returns the JSON with all the organizations. However, now I want to integrate a Keycloak SSO (OAuth2) server for authorization purposes

Zuul - Api Gateway Authentication

守給你的承諾、 提交于 2019-12-20 08:37:57
问题 I want to introduce Zuul through Spring Cloud as an API Gateway in front of a few services. I have some design doubts around Authentication. The Authentication would be handled by Spring Security, which comes before Zuul in the servlet filter chain. My concern: the Gateway would sit in front of many services some services may expose endpoints which do not require authentication some services may expose endpoints which need a Session Id and some with a token", an arbitrary opaque value (for