In recent years, with the continuous development of Cloud computing and micro-services, major Cloud manufacturers are also optimistic about the market of micro-service solutions, and have launched their own solutions for Cloud architecture on micro-services, and the birth of the concept of Cloud Native, Cloud Native.
Cloud native is an approach designed specifically for applications on the cloud to build and deploy applications to take full advantage of cloud computing.
Cloud native applications are characterized by rapid and frequent construction, release, and deployment, which can easily meet the requirements of scalability, availability, portability, and other aspects and provide better economy. For Cloud native, Cloud vendors have also proposed their own solutions, among which Alibaba’s open source Nacos is integrated into Spring Cloud Alibaba as an overall solution.
Nacos addresses two core issues: dynamic configuration management and service registry discovery.
Nacos supports features
Nacos supports the following features, including service discovery, configuration management, metadata management, address server, cloud native support, Docker and K8s support, etc.
Service discovery
- Service registration and discovery
- Health check: supports server detection and client heartbeat
- Routing policy: Supports weight, protection threshold, and nearest access
Configuration management
- Configuration management: Supports publishing, modifying, querying, and listening configurations
- Grayscale configuration: Supports grayscale publishing
Metadata management
- Connect to the third-party CMDB
Address server
- Nacos addressing is supported
Cloud native Support
- Docking Istio
- Docking ConfigMap
Multi-client support
- Support a variety of clients, including Java client, Go client, node.js client, C# client
Docker and K8s are supported
- Support Docker deployment of Nacos Server
- Supports K8s deployment of Nacos Server
Nacos starts quickly
The latest stable version of Nacos is 1.1.4. Version records can be viewed at Release Notes
Environment preparation and installation
Nacos relies on the Java environment to run and requires JDK 1.8 or later.
Nacos can be obtained from both source code and distribution packages.
Download the source code from Github and build it
git clone https://github.com/alibaba/nacos.git
cd nacos/
mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U
ls -al distribution/target/
// change the $version to your actual path
cd distribution/target/nacos-server-$version/nacos/binCopy the code
Download the compressed file directly
Nacos-server -$version.zip
cd nacos/bin
Copy the code
Start the server
Linux/Unix/Mac startup command (standalone stands for standalone mode, not cluster mode):
sh startup.sh -m standalone
If you are using Ubuntu, or if you run the script, an error message [[symbol cannot be found, try the following:
bash startup.sh -m standalone
Windows startup command:
cmd startup.cmd
Or double-click the startup. CMD file to run it.
Shut down the server
Run shutdown.sh in Linux.
sh shutdown.shCopy the code
On Windows, double-click shutdown. CMD to run the file.
cmd shutdown.cmdCopy the code
View console
After application startup, visit http://127.0.0.1:8848/nacos/, Nacos0.8 version has support for simple login function, the default username/password for: nacos/nacos.
Scan our public account: Architecture evolution for first-hand technical information and original articles