Nacos of springcloud Alibaba
1、 Run Nacos
Nacos GitHub open source address: https://github.com/alibaba/nacos
Nacos official documents: https://nacos.io/zh-cn/docs/quick-start.html
Follow the following command:
2、 Modify the configuration file to change the distributed configuration store of Nacos to MySQL
Enter the corresponding directory:
Modify application In the properties file, add the following contents (the corresponding SQL script is in the same directory, named Nacos mysql. SQL):
3、 Re execute the packaging operation in the running step (the packaging must be successful. If it is successful before, this failure may be due to the wrong writing of the configuration file)
4、 Effect picture of successful operation (default user name and password are Nacos / Nacos)
5、 Comparison between Nacos and Eureka
1. Configuration center comparison
2. Comparison of registration centers
@H_ 502_ 112@(1)eureka
(2)nacos
On why I chose Nacos instead of Eureka, on the one hand, our microservice framework is based on springcloud Alibaba. If we switch directly, the foundation of the whole microservice framework will be greatly shaken; On the other hand, Nacos has integrated exactly what we need, such as distributed configuration, clustering, service registration and discovery; On the last hand, Nacos is really much more active than Eureka version iteration at present.
Reference for this article: official documents of Nacos
Comparison of consumer, Eureka and Nacos
Introduction to Nacos and comparison with Eureka and Apollo as a registration / configuration center