I use springcloud to build the system, including many microservices。 For some interface calls, I use resttemplate annotated by @LoadBalance to implement load balancing, and use eureka as a registry center. However, when I call interfaces between different micro services, resttemplate sometimes will connect to wrong service. For example, I have service A, B, C, when service A call a service B's interface, resttemplate annotated by @LoadBalance will find the actual ip&port from eureka by service name first, and then build the actual url and send the request to target server, but sometimes, it will find the service C's ip&port when I call service B's interface, which cause a fail invoking. This case occurs infrequently but nerver disappear, I have been troubled for a long time, could anyone give me some suggestions? Thanks.
Asked
Active
Viewed 406 times
0
-
Can you show how you constructed the rest template. What versions are you using? – spencergibb Dec 13 '19 at 17:07
-
Thanks for your attention, I learned why yesterday: it is a bug in spring cloud Dalston.RELEASE([link](https://github.com/spring-cloud/spring-cloud-commons/issues/224)), and we happen to use this version. Spring cloud had fixed this bug in Dalston.SR2, and now it works fine. – xuelei Dec 14 '19 at 01:23
1 Answers
0
I learned why yesterday: it is a bug in spring cloud Dalston.RELEASE(https://github.com/spring-cloud/spring-cloud-commons/issues/224), and we happen to use this version. Spring cloud had fixed this bug in Dalston.SR2, and now it works fine

xuelei
- 1
-
FYI, Dalston, Edgware and Finchley are no longer supported. Please upgrade to Greenwich or Hoxton. – spencergibb Dec 16 '19 at 16:23