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

19th
Apr 2018
CH4:D
@chad_d_stud_twitter
Apr 19 2018 06:09
how to enable the hystrix dashboard? i already have the actuator enabled and exposed the endpoint but it’s not being foud
found
ManteshJ
@ManteshJ
Apr 19 2018 06:28
Hi anyone help me regarding the Multi instance Eureka replication is not working and I have used this configuration please find this link spring-cloud/spring-cloud-netflix#2864
Sushant
@bsushant-athena
Apr 19 2018 12:03
Hey Guys! I want to implement health check for my app based on a. Registration to Eureka is successful b. My app endpoints can be accessed.
I am trying to do this for a sorts of Zero Downtime Deployment. Which essentially means I want to kill my old instance only when newly deployed instance is reachable from Eureka.
Is there an easy way to get this information from Eureka server? Any suggestions for implementing this are also welcome.
Ryan Baxter
@ryanjbaxter
Apr 19 2018 13:11
@dragontree101 RC1 will be released soon, most likely next week
@chad_d_stud_twitter we need more information, I assume you have followed the steps in the documentation
@ManteshJ please be patient, we will get to the issue
@fiunchinho did you try @spencergibb's suggestion? I also put a link to a repo that might provide more information on the topic
Ryan Baxter
@ryanjbaxter
Apr 19 2018 13:18
@bsushant-athena what information are you trying to get from the Eureka server? The app status?
Sushant
@bsushant-athena
Apr 19 2018 13:21
yes the app status
in particular that instance status
Ryan Baxter
@ryanjbaxter
Apr 19 2018 13:22
Eureka has a number of rest apis you can use to obtain that information https://github.com/Netflix/eureka/wiki/Eureka-REST-operations
CH4:D
@chad_d_stud_twitter
Apr 19 2018 14:47
@ryanjbaxter umm the documentation doesn’t tell me much. Only that I CAN use hystrix and that including in a gradle build exposes /hystrix which it doesn’t.
Jose Armesto
@fiunchinho
Apr 19 2018 14:49
@ryanjbaxter but I'm asking how to do what @spencergibb suggested. How do I make my application to wait before exitting?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 14:50
that isnt something we can really help with
instead of just killing the app the suggestion is to change its status to OUT_OF_SERVICE and then wait a bit for the status to replicate to the clients before shutting it down
Jose Armesto
@fiunchinho
Apr 19 2018 14:52
yeah, and how to do that is exactly my StackOverflow question
Ryan Baxter
@ryanjbaxter
Apr 19 2018 14:52
do what? change the service status?
Jose Armesto
@fiunchinho
Apr 19 2018 14:52
chante the status and wait a bit
Ryan Baxter
@ryanjbaxter
Apr 19 2018 14:53
the repo i liked to in SO shows you how to change the status
again you need to wait to kill the app
spring cloud cant do that
Jose Armesto
@fiunchinho
Apr 19 2018 14:54
so how do you handle deployments? you assume downtime while deploying a new version?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 14:54
nope
this is explained in that repo
you have service v1 running you deploy service v2 with OUT_OF_SERVICE
test service v2 to make sure it is working to your liking
change service v2 to UP
wait for a bit
change status of v1 to OUT_OF_SERVICE
wait for a bit
kill service v1
Jose Armesto
@fiunchinho
Apr 19 2018 14:57
I'm reading your repository, instead of curl -X "POST" "http://localhost:8181/service-registry/instance-status" couldn't you use the resume spring cloud endpoint ?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:01
well u would need to stop/pause it first
Jose Armesto
@fiunchinho
Apr 19 2018 15:03
how come? the application is OUT_OF_SERVICE already
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:03
the two are not necessarily tied together
resume/stop/pause are related to the spring app lifecycle
the spring app could be running fine, but still register itself as OUT_OF_SERVICE
Jose Armesto
@fiunchinho
Apr 19 2018 15:05
are they not tied by design? I mean, aren't those endpoints specifically added by spring cloud? One would assume they are related with spring cloud features like the service discovery?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:06
they do effect service discovery
if u pause the app it will unregister it i believe
same with resume
but just because and app is registered as OUT_OF_SERVICE does not mean it is paused
Jose Armesto
@fiunchinho
Apr 19 2018 15:09
I've readed the repository, and the problem is that you need blue/green deployments to achieve zero downtime, and currently kubernetes doesn't offer blue/green deployments out of the box
it performs a rolling update
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:09
yeah i am not too familiar with kubernetes
but that is just how Eureka works
Eueka and Ribbon that is
Jose Armesto
@fiunchinho
Apr 19 2018 15:10
that's why I'm looking for a way to just execute the same logic that you describe, but right before exitting
you don't need blue/green deployments just because you use eureka, you just need to set yourself OUT_OF_SERVICE and wait
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:11
if you dont want services using service discovery to make requests to an instance that is no longer up you need to wait for another instance of that service to be up before shutting it down
or as I said in the repo, you can rely on failover to help out here, so once the second service instance is up you dont need to set v1 to out of service and wait you can just kill it and the retry logic should kick in and retry any failed requests on v2
Jose Armesto
@fiunchinho
Apr 19 2018 15:13
that's what we currently do with ribbon, but how retries work keep changing on every spring version, so it's not safe to rely on it
at least, not safe to rely on all the developers getting it right configured
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:14
it hasnt changed since Camden I believe
Jose Armesto
@fiunchinho
Apr 19 2018 15:15
it changed again on Dalston
if I recall correclty
now it's using spring-retry
before it was using ribbon and feign
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:16
there may have been enhacements to functionality and fixes, but the spring rety stuff was changed in Camden
Jose Armesto
@fiunchinho
Apr 19 2018 15:16
before that it was using ribbon
so have you somehow automated the process that you describe in the repository ?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:19
i have not personally no
Jose Armesto
@fiunchinho
Apr 19 2018 15:20
so you don't use that approach, or you just do it manually?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 15:25
i just have not had to do it
if you are looking for something that puts this into practice you might take a look at spring cloud pipelines
not sure it will work for you in your specific env but it does a blue green deployment with smoke tests etc
i need to run but will be back on later
Jose Armesto
@fiunchinho
Apr 19 2018 15:27
btw, the spring cloud home page has a quickstart gradle configuration that doesn't work, can anyone help me with that?
CH4:D
@chad_d_stud_twitter
Apr 19 2018 15:27
@ryanjbaxter I’ve already read that section. That’s what I meant when the dashboard isn’t working
/actuator/hystrix and /hystrix
Nothing
@ryanjbaxter do I need to implement at least one method for it to work?
Ryan Baxter
@ryanjbaxter
Apr 19 2018 17:53
@fiunchinho what exactly doesnt work?
Maxime Deravet
@maximede
Apr 19 2018 22:45
Hello ! Does anyone have experience with zuul in front of AWS ALB target groups ? I'm having a weird issue with really long connection ( shy of 60s just for the connection ) for some of the calls I'm making through zuul.
What I'm trying to do is having zuul proxying everything to a single ALB with multiple target groups with path based routes. What are the configuration best practice for that kind of set up ?