spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.52k stars 3.32k forks source link

Provide sample/guidance on implementing @EnableZuulProxy using the new Spring Cloud Gateway MVC (fn) in a Spring MVC app. #3100

Closed sandipchitale closed 10 months ago

sandipchitale commented 1 year ago

Is your feature request related to a problem? Please describe. We have an implementation in a SpringMVC (gateway+angular frontend app) with embedded @EnableZuulProxy. We are looking for a replacement functionality for it.

Describe the solution you'd like It will be helpful if there some guidance provided on how to replace @EnableZuulProxy functionality with Spring Cloud Gateway MVC. Or the provided functionality is already doing what @EnableZuulProxy?

Ideally there is a annotation equivalent of @EnableZuulProxy along the lines of @EnableSCGMVCProxy or some such with the corresponding implementaion.

Describe alternatives you've considered Now that NetFlix Zuul is EOLed we tried to implement some of this using ProxyExchange with mixed success.

Additional context Add any other context or screenshots about the feature request here.

spencergibb commented 10 months ago

Any specific questions?

sandipchitale commented 10 months ago

I guess it will be helpful for people migrating from @EnableZuulProxy to give some guidance on what are equivalets of this section:

https://cloud.spring.io/spring-cloud-netflix/multi/multi__router_and_filter_zuul.html#netflix-zuul-reverse-proxy

e.g. Eureka, Ribbon, Hystrix as applicable

spencergibb commented 10 months ago

hystrix and ribbon have been replaced with spring cloud circuit breaker and spring cloud loadbalancer and are documented https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway-server-mvc/filters/circuitbreaker-filter.html and https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway-server-mvc/filters/loadbalancer.html respectively.

Can you be more specific? The doc you linked to is just the whole of the zuul docs.

sandipchitale commented 10 months ago

That helped somewhat. I guess a lot of people are looking to migrate their embedded NetFlix Zuul based apps ( I know - still). So I was looking for some official guidance. Or even support for @EnableSpringCloudGatewayProxy (equivalent to @EnableZuulProxy) and @EnableSpringCloudGatewayServer (equivalent of @EnableZuulServer).

I will close this. I may do a blog post about the migration in near future.

bkopchains commented 4 months ago

@sandipchitale did you ever end up writing a blog post about your upgrade? Looking into something similar as well 😅