How to use Spring Cloud to build a highly available service registry
This article mainly introduces "how to use Spring Cloud to build a high-availability service registry". In daily operation, I believe many people have doubts about how to use Spring Cloud to build a high-availability service registry. I have consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use Spring Cloud to build a high-availability service registry". Next, please follow the editor to study!
The correct application-peer1.properties is as follows:
Spring.application.name=eureka-serverserver.port=1111eureka.instance.hostname=peer1eureka.client.register-with-eureka=trueeureka.client.service-url.defaultZone= http://peer2:1112/eureka/
Application-peer2.properties is as follows:
At this point, spring.application.name=eureka-serverserver.port=1112eureka.instance.hostname=peer2eureka.client.register-with-eureka=trueeureka.client.service-url.defaultZone= http://peer1:1111/eureka/ ends the study on "how to use Spring Cloud to build a highly available service registry". I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!