netflix-zuul

Seeking advice on proper approach to development on Netflix Eureka discoverable Spring Boot services with minimal overheads

早过忘川 提交于 2019-12-11 03:08:42
问题 We are running a Spring Boot-based environment with about 15 microservices and a Zuul edge gateway registered with Eureka. Currently, I have set up all microservices to call other microservices through the Zuul gateway (e.g. if serviceA needs to call serviceB, the URL configuration property would be serviceB.baseUrl=http://zuul.mydomain.com:7001 where zuul.mydomain.com is our development server on AWS with all other microservices running behind it). Zuul in turn proxies to the microservices

Spring Cloud Zuul: how to add route without restart

萝らか妹 提交于 2019-12-10 17:13:14
问题 I am writing microservices with Spring Cloud. I'm also using Zuul as the API Gateway which routes some URLs to destination services which are not registered into Eureka. When a new route needed to be added to Zuul, we often edit the application.yml file and then restart the Zuul server. I was wondering is there a way to add new route into Zuul without restarting the Zuul server? I found this link useful but it only works for services registed in Erueka. 来源: https://stackoverflow.com/questions

Zuul behind an AWS ELB over HTTPS/SSL

醉酒当歌 提交于 2019-12-10 15:17:13
问题 I have an AWS Elastic Load Balancer with the certificates for my domain and which terminates the SSL traffic. The ELB has a listener on the https port and forwards it as http to Zuul . When I use Spring Boot HATEOAS , Zuul will replace the links with the correct address but with http instead of https : "_links": { "self": { "href": "http://my.domain.com:80/rest/foo/bar" } } but what I want is: "_links": { "self": { "href": "https://my.domain.com/rest/foo/bar" } } The request that generates

Exporting Client Cert to Backend with Zuul

大兔子大兔子 提交于 2019-12-10 11:36:37
问题 It is possible to export/forward the client certificate to the backend services using Zuul as a proxy/load balancer? I finally have a working example of zuul with spring-cloud using https and forwarding requests to a secure service on the backend using https as well. Now I need to forward the client's certificate information in addition to using https. You can do this with Apache and Tomcat using the SSLOptions +StdEnvVars/+ExportCertData, which adds the information to the headers, but I don

Spring-cloud Zuul retry when instance is down

别来无恙 提交于 2019-12-09 22:38:05
问题 Using Spring-cloud Angel.SR6: Here is the configuration of my Spring-boot app with @EnableZuulProxy: server.port=8765 ribbon.ConnectTimeout=500 ribbon.ReadTimeout=5000 ribbon.MaxAutoRetries=1 ribbon.MaxAutoRetriesNextServer=1 ribbon.OkToRetryOnAllOperations=true zuul.routes.service-id.retryable=true I have 2 instances of service-id running on random ports. These instances, as well as the Zuul instance, successfully register with Eureka, and I can access RESTful endpoints on the 2 service-id

Setting the route programmatically in Spring Cloud Netflix Zuul

最后都变了- 提交于 2019-12-09 18:38:01
问题 I have created two AWS Beanstalk envs, each with their own version of the applications. The urls for these envs are https://beta.myserver.com/v1073 and https://beta.myserver.com/v1084. These urls point to the load balancer. Now I also have a Zuul implementation that have the following configurations. zuul: routes: beta: path: /api/** serviceId: beta-root strip-prefix: false sensitive-headers: Cookie,Set-Cookie ribbon: eureka: enabled: false hystrix: command: default: execution: isolation:

Spring Cloud: default redirecting from Gateway to UI

扶醉桌前 提交于 2019-12-08 12:52:45
问题 I'm new to microservices and Spring Boot. I have a few Spring Cloud microservices with a Zuul gateway running on port 8080. browser | | gateway (:8080) / \ / \ / \ resource UI (:8090) There is a UI microservice on port 8090, which has a controller with a method inside, returning index.html. I configured Zuul routing like this for UI (I'm using Eureka too): zuul: routes: ui: path: /ui/** serviceId: myproject.service.ui stripPrefix: false sensitiveHeaders: If I call http://localhost:8080/ui/

Authorizing requests through spring gateway with zool via oauth server

会有一股神秘感。 提交于 2019-12-08 09:14:35
问题 My application has microservices behind (spring) gateway with zuul proxy. There is also internal (spring) oauth2 authorization server. I want to implement client_credentials grant type for my microservices calls from outside - for M2M communication. When I configure for the gateway client_id and client_secret in its application.yml requests come through the gateway but there is no requester check - oauth authorizes the gateway itself, as a result there is no authorization at all. I could use

ZuulException (SendErrorFilter) at first call

帅比萌擦擦* 提交于 2019-12-08 08:57:27
I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refresh the browser it's working fine. The error is given below-- 2019-03-10 04:54:55.440 WARN [netflix- zuul-api-gateway- server,1855093598d4f99c,1855093598d4f99c true] 1 --- [nio-8765-exec-1] o.s.c.n.z.filters.post.SendErrorFilter : Error during filtering com.netflix.zuul.exception.ZuulException at org

Zuul Routing on Root Path

有些话、适合烂在心里 提交于 2019-12-08 07:18:55
问题 I want to config zuul to route request to root / to a home page. I tried: root: path: / url: http://hostname/home/index.jsp and root: path: /** url: http://hostname/home/index.jsp But neither of them works. I just got a 404 NOT FOUND. I think the path match config should be similar to those with contexts, such as /service/** , but it's not. 回答1: This is what I have done to make this work. Within Zuul -> controller: @RequestMapping(value = "/", method = RequestMethod.GET) public String