I. Prerequisite conditions
Nacos has been installed and the database has been configured, the standalone version can be tested successfully!!
Second, cluster building
1. Copy two nacOS files. (Entire file copy!!)
2. Change the application.properties configuration file in each file (Note: 8848, 8849, 8850 respectively)
Change the cluster.conf.example file to cluster.conf(for each naOCs)
Go to cluster.conf and change its contents to the following (nacos cluster.conf should be changed to this)
Three, test,
Enter the bin directory of the three NACos and enter the CMD command line mode. Enter the following
Enter localhost:8848/nacos in the browser to view the information
(Note: not only 48848 can be accessed, 8849 and 8850 can be accessed)
When you close a NACOS, you see the following (test: close 8850)
4. Problems encountered
1. All three NACOS are enabled and no error is reported, but only one nacOS is displayed in the nacOS registry
(as follows 🙂
Solution: One solution the blogger has found is the customary blank space when configuring cluster.conf
As follows:
Five, the summary
All in all, this approach to nacOS clustering is relatively simple. It should be noted that this paper is built on the premise that NACOS can be started in a single machine. In addition, this article also found a small error caused by the blogger’s own habits. Hope to be able to provide you with help (note: if there is any error in the content of this article, please contact the blogger, the blogger must correct!! Thank you)