These are chat archives for spring-cloud/spring-cloud

1st
Aug 2018
John D Giotta
@jdgiotta
Aug 01 2018 00:11
Why would I be getting a 401 when attempting to call the /encrypt resource for a Spring Cloud Config server?
I do have a security user set in my application.yml which will allow me to successfully perform a GET to a application config resource, but just fails for encryption calls
John D Giotta
@jdgiotta
Aug 01 2018 00:18
I'm using cloud version Finchley.RELEASE
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 08:06
@bilalahmed54
Hello Everyone,
I have reading different news on different forums regarding Zuul2 and its support to be integrated with Spring Cloud Netflix modules like Eureka etc. So, I just want to start with the implementation of Gateway and confused between Zuul2 and S-C gateway. @spencergibb your guidance required.
Thanks to all the members for knowledge sharing. You guys are doing a wonderful job.
Considering I am starting writing API gateway from scratch, so with which option should I go? Zuul2 (if compatible with other Spring components like cloud config, cloud netflix etc.) or S-C gateway?
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:15
@bilalahmed54 AFAIK zuul 2 is not integrated with Spring Cloud and zuul 1 is a little old and has quite a few limitations, for instance, it doesn't support WebSockets communication. So, I would go for spring-cloud-gateway.
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:20
@marcosbarbero thanks for your reply. What does it actually means when you say that zuul 2 isn't integrated with spring cloud? It can't be used with other spring cloud components like config etc. ?
I was just exploring support of load balance. Zuul provides it out of the box while with Spring clound gateway, we will have to use Spring Ribbon.
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:23
I mean there's no such thing as spring-cloud-netflix-zuul2, it's not a thing I a doubt that it will be in the near future (maybe ever). If you are willing to use plain zuul2 it will be on your own implementation and try to plug everything from spring that you need
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:24
okay, understood. thanks
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:24
what do you mean support of load balance? As far as I'm concerned Spring Cloud Gateway does support client side load balancer as well as zuul
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:26
Sending requests alternatively (or when one is down) if there are multiple instances of the same client.
And I think With spring cloud gateway, I will have to use Spring Robin explicitly, no? While in Zuul it is available out of the box
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:27
by client you mean routing to the downstream service? In which has multiple instances? not sure if I'm following
Do you mean Netflix Ribbon?
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:29
yes, exactly.
We generally create a service discovery like Eureka or Consul, where each service instance registers when bootstrapped. Eureka server maintains a service registry; it maintains all the instances of the service as a key/value map, where the {service id} of your microservice serves as the key and instances serve as the value. Now, if one microservice wants to communicate with another microservice, it generally looks up the service registry using DiscoveryClient and Eureka server returns all the instances of the calling microservice to the caller service. Then it was a caller service headache which instance it calls.
I wanna achieve this.
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:30
did you check this doc?
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:31
yes, but this doesn't explain that load balance thing.
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:32
that's exactly the same thing
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:33
Like this, Zuul supports out of the box as a built in feature
Marcos Barbero
@marcosbarbero
Aug 01 2018 13:37
I'm saying Spring Cloud Gateway also does support it out of the box, the main diff is simply the property (on the doc) that you need to enable
while using Zuul you don't need to enable it
Bilal Ahmed Yaseen
@bilalahmed54
Aug 01 2018 13:38
okay, perfect. let me try this. Thanks