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

29th
Nov 2015
ccit-spence
@ccit-spence
Nov 29 2015 18:35
Does Eureka Aware RestTemplate work when an API service is down and then recovers?
I can’t seem to get anything but the fallback after the service goes down
If I restart the calling service it will start working again
ccit-spence
@ccit-spence
Nov 29 2015 18:54
TO clarify this happens after the target API has been down for a long period. 10min+
Dave Syer
@dsyer
Nov 29 2015 19:38
Not sure what you expect really
If the service is down eureka doesn't buy you anything
ccit-spence
@ccit-spence
Nov 29 2015 19:39
The service comes back up, but calls via RestTemplate don’t work
via Hystrix Dashboard still shows as closed and never reopens
Dave Syer
@dsyer
Nov 29 2015 19:41
You mean "open but never recloses"?
A closed circuit is a happy path
ccit-spence
@ccit-spence
Nov 29 2015 19:41
yes, correct
Dave Syer
@dsyer
Nov 29 2015 19:41
Anyway you have to explicitly ask for the Hystrix fallback
So it's more complicated than just eureka and rest template
ccit-spence
@ccit-spence
Nov 29 2015 19:42
I do get the fallback when it is open
Dave Syer
@dsyer
Nov 29 2015 19:42
Hystrix closes a circuit after a delay
But it reopens it again if there's a failure
ccit-spence
@ccit-spence
Nov 29 2015 19:42
when I restarted the service I gave it 10min to close but it never closed
had to restart the service that was calling the api for it to close and work as normal
Dave Syer
@dsyer
Nov 29 2015 19:43
So do you see failures in those 10min?
ccit-spence
@ccit-spence
Nov 29 2015 19:43
yes
to be clear, I tried several times all fails. Then gave it 10min with no attempts to see if it would close on its own
Dave Syer
@dsyer
Nov 29 2015 19:44
Caches get messed up sometimes if a service dies without sending a signal
What state was the eureka registry in?
ccit-spence
@ccit-spence
Nov 29 2015 19:45
That could be what happened. This is local on my machine
Dave Syer
@dsyer
Nov 29 2015 19:45
/eureka/apps/MYAPP
ccit-spence
@ccit-spence
Nov 29 2015 19:45
the services indicated UP
given that I have been changing things and devtools might have been triggered, which who knows how that would have done. It could be a one off and not come back
Dave Syer
@dsyer
Nov 29 2015 19:48
Devtools is also a nuisance
ccit-spence
@ccit-spence
Nov 29 2015 19:48
yes it is, I was having a problem where RIbbon would not work after a devtools reload. After setting the fallback that seemed to go away
Dave Syer
@dsyer
Nov 29 2015 19:48
I don't think I can predict what the problem might be. You'd have to get a controlled environment to reproduce it?
ccit-spence
@ccit-spence
Nov 29 2015 19:49
I will see if it pops up again and create a project to replicate it
Wasn’t sure if it was something known