Spring Reactive stream is not working with Netflix Zuul Reverse proxy - spring-boot

We created 7 micro-services for our project and all are exposed through zuul proxy.
One of the micro service(Live-dashboard) contains Spring boot reactive stream for live dashboard refresh using (Server sent events).
The reactive stream is working fine through Live Dashboard micro-service direct rest api (http://localhost:8092/live/dashboard).
But stream is not working through zuul proxy (http://localhost:8091/rest/livedashboard/live/dashboard) it is giving normal api response.
Please give suggestions anyone having any ideas, how reactive stream is working through zuul proxy?

If you are using 1.x version of zuul, it does not support server sent events. You can find the thread and the response of the contributor here.
As mentioned in the link, It is supported in zuul 2.x versions. So using 2.x versions of zuul might resolve the issue.
Good luck with that.

Related

Does Spring Cloud Gateway support Rsocket for load-balancing?

I'm implementing a microservices system with Spring Boot, and I want to have a service that using Rsocket to make real-time connecting between user and system. But in the document of Spring Cloud Gateway, that's seem not support Rsocket. Is this possible to using Rsocket in a microservices system with Spring Boot ? Or should I using websocket instead ?
Here is my idea
Don't try this, lost time. See authoritative article
https://spring.io/blog/2020/03/25/spring-tips-spring-cloud-loadbalancer
https://spring.io/guides/gs/spring-cloud-loadbalancer/
https://cloud.spring.io/spring-cloud-gateway/reference/html/#the-websocket-routing-filter
https://cloud.spring.io/spring-cloud-gateway/reference/html/#the-loadbalancerclient-filter
https://cloud.spring.io/spring-cloud-gateway/reference/html/#reactive-loadbalancer-client-filter
For load balancing with Spring Cloud Gateway, let use technology stack [Eureka Discovery Client + Cloud Loadbalancer + Reactive Web] or Ribbon (Netflix Open Source Software - Netflix OSS).
Rsocket for "... Reactive Streams", load balancing need something like request/response round robin, these are different.

Can Spring Cloud Gateway work with microservices that are not asynchronous?

I have a few synchronous microservices working on production using Spring Boot 2.X version. Soon, we need to implement a gateway if the number of instances of each microservice is going to be increased. I read that Zuul was in a maintenance phase and was replaced by Spring Cloud Gateway which is by default asynchronous technology. My question is, can I still implement Spring Cloud Gateway with my microservices?
Yes, you can use Spring Cloud Gateway without any doubts.
Basically, asynchronous technology means that your resources/threads on Api Gateway won't be blocked waiting for the response from downstream services and that increases a throughput.
Now, once your blocking services complete their internal logic they respond back to Api Gateway using an originally opened connection. Api Gateway in turn responds back to your client.

How we can integrate Springboot 2.x with Zuul 2

We have a springboot application which is currently having gateway as Zuul 1. Our application is running in Springboot 2.0.0.M2. We are trying to upgrade our Zuul gateway to Zuul 2. We created a springboot application with Zuul 2 dependency and added webflux dependency to get Netty server. The server starts fine, but we are still unclear that how the springboot application will understand that this is a gateway and filters needs to be executed. Although we have created Routes filter, but the same is not getting invoked.
Thanks in advance,
Ron
if you go through the video "https://www.youtube.com/watch?v=9wocKqF15B8" at 18:00 from spring developers. They clearly stated that zuul2 is not going to be supported by the spring ecosystem. Also, the replacement of zuul2 (non-blocking calls) is a spring cloud gateway which is also non-blocking calls.

Turbine stream double port binding issue

I'm using Spring Boot 1.5.4 and Spring Cloud Dalston SR4 to stand up a Turbine server on Cloud Foundry and aggregate my application Hystrix streams. In addition I want to add Spring Boot Actuator monitoring and management to the Turbine server. I realize there is ample documentation on how to do this in a local environment and I do have it working locally. However it is a different matter when deploying to Cloud Foundry where I cannot use port numbers in a Url binding.
The issue is that the Turbine stream is provided by an RxNetty server on one port and the Actuator endpoints are provided by via Tomcat on another port. In Cloud Foundry I can only bind my Url to RxNetty endpoint or the Tomcat endpoint, not both.
No combination of management.port and turbine.stream.port allows me to access the turbine stream and the actuator endpoints from one host binding. The following is an example of what I would expect to be able to do:-
https://myapp.mydomain.com/info (to report actuator info details)
https://myapp.mydomain.com/turbine.stream (to stream turbine metrics)
Note: There are no port numbers in these Urls.
Requests to your app on Cloud Foundry go through the Cloud Foundry Go Router, which uses the http host header to direct traffic to all the container instances running your app. The http based gorouter expecter only one port to be opened by the app to forward http traffic to. However, the gorouter also support tcp routing which should allow you to have multiple ports open. see the docsfor an explanation of tcp vs. http routes on cloud foundry.
If you are running on Pivotal Cloud Foundry you can use the Circuit Breaker Dashboard provided by Spring Cloud Serviecs for PCF then you won't need to setup the turbine stream. The Spring Cloud Services Dashboard uses RabbitMQ instead of SSE events see SCS docs for details
Just getting back to this now. As noted by spencergibb, moving to springboot 2.0 and cloud Finchley works.

Spring Boot Server using HTTPS, Management Server only HTTP?

Based on an answer from #andy-wilkinson to a past Spring Boot question, it appears that with the exception of a couple parameters (port for example), the management server leverages the same configuration as the regular servlet container.
I would like to configure the main Spring Boot server to use HTTPS (for the application/service it is serving) and to use just HTTP for the actuator endpoints. Has anyone done this? Is this even possible?
-Joshua
It's not possible at the moment. Please open an issue if it's an enhancement that you'd like to see.

Resources