netflix-zuul

Use Eureka despite having random external port of docker containers

无人久伴 提交于 2019-12-04 08:21:12
问题 I am writing an application that is composed of a few spring boot based microservices with a zuul based reverse proxy in the front- It works when I start the services on my machine, but for server rollout I'd like to use docker for the services, but this seems not to be possible right now. Normally you would have a fixed "internal" port and randomized ports at the outside of the container. But the app in the container doesn't know the outside port (and IP). The Netflix tools match what I

Heroku load balancer vs Netflix zuul

感情迁移 提交于 2019-12-04 06:23:09
According to this answer https://stackoverflow.com/a/41811770/2849613 I would like to get a little bit more information about best practices with microservices on Heroku. The question is which approach is better? Install every services as independent app, and use one of them as REST "proxy" (for example Netflix Eureka)? Or Create docker based approach with, for example Netflix Zuul as a load balancer? On my own I see already some pros and cons of both approaches: Pros : better scalability (easy to create new machines for bigger load). Cons : communication between services goes "outside of

HandlerInterceptorAdapter and Zuul Filter

筅森魡賤 提交于 2019-12-03 20:34:27
It is possible add a HandlerInterceptorAdapter with Zuul Configuration. I need to intercept a request to a specific resource but I suppose because I have Zuul filter configuration, the interceptor is never called. Is possible to do so? I have tried to achieve the same. We have a few Spring MVC controllers and Zuul proxying. But I still wanted the same Interceptor to be used. The problem here is that zuul runs in its own ZuulServlet, and does not pick up the interceptors from your MVC servlet. Spring Cloud: ZuulConfiguration.java configures ZuulHandlerMapping, which is the only place

Spring plan for Zuul 2

前提是你 提交于 2019-12-03 17:18:11
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. 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. There's now spring-cloud-gateway . Which is Spring's replacement for Zuul 1. https://spring.io/blog/2017/07/06/spring-cloud-finchley-m1-is-available "Spring

Sticky Sessions and Zuul in Spring Cloud

孤人 提交于 2019-12-03 13:46:34
问题 I have a set of micro services and we use zuul for routing from the front end as a way of mapping a uri context path to a specific micro service using spring cloud. Internally and externally we use spring OAuth2 and that works quite well. However, for one specific service there has arisen a requirement for SAML and this imposes a sticky sessions requirement for that service. Has another considered this and what would eb the correct way to put in sticky session support for zuul. As a work

Can Zuul Edge Server be used without Eureka / Ribbon

有些话、适合烂在心里 提交于 2019-12-03 12:27:40
问题 We have an infrastructure with service discovery and load balancing (i.e. server side with STM and weblogic cluster). Now we are in the process of refactoring into micro-services. We would need an API gateway which does basic routing to other microservices. Netflix Zuul looks a good candidate however I could not get Zuul working without Eureka - but we do not need Eureka since we already have service discovery and load balancing in place. Is it possible to use Zuul without Eureka and Ribbon?

NetflixOSS Zuul Filter for rejecting requests

非 Y 不嫁゛ 提交于 2019-12-03 10:21:50
I am trying to use a ZuulFilter in a simple spring-cloud-Netflix Api gateway (reverse proxy) in order to authenticate requests against a custom authentication provider (via Rest call). The Filter should reject unauthorized requests with a 401 and don't pass those requests further down to the proxied services. Is that even possible for a ZuulFilter? I did not find documentation, example or something in Zuuls api. Any suggestions? I got this to work, took some digging. Make sure your request isn't cached already. Just call this method from your run() method inside your ZuulFilter. /** * Reports

Implementing authentication and authorization using Zuul Proxy, Oauth2 on REST Microservices

可紊 提交于 2019-12-03 09:00:36
I am trying to implement the above architecture in the workflow with Spring Boot. Web client makes a request to Resource Server (Microservices Endpoints) through Zuul Proxy. Zuul Proxy redirects to oauth2 server for authentication. Oauth2 redirects to Zuul Proxy if the request is authenticated or not. If not authenticated, Zuul redirects Web client with an unauthenticated response. If Authenticated, Zull proxy redirects to the requested microservice endpoint. Microservice endpoint checks if the user is authorized (user level access) to access the resource or not. Microservice also could make

Microservice to Microservice calls, authorization from a queue message

随声附和 提交于 2019-12-03 06:49:44
Context: I'm creating a cloud platform to support multiple applications with SSO. I'm using Keycloak for authentication and Netflix Zuul for authorization (API Gateway) thru Keycloak Spring Security Adapter . Each microservice expect an Authorization header, which contains a valid JWT, from which it will take the username (sub) to process the request. Each microservice-to-microservice call should go thru Netflix Zuul first, passing the Authorization header to maintain a stateless validation. That strategy allow to every microservice to know who is the user (sub) who is invoking the

How is Spring Cloud Gateway different from Zuul?

眉间皱痕 提交于 2019-12-03 04:04:27
问题 I have been using Zuul as the edge service and API Gateway. Recently I have noticed that Spring Cloud Platform release Spring Cloud Gateway. What is the difference between the two gateways? Why is the Zuul not extended to support the functionalities in S-C-Gateway? What was the driving factor for a new library altogether? When should it be used? 回答1: I am the author of spring cloud gateway. Zuul is built on servlet 2.5 (works with 3.x), using blocking APIs. It doesn't support any long lived