After three RC releases of community experience, Nacos is officially released in 1.0.0 GA with a full range of architecture, functionality and API design refactoring and upgrades.

The release of version 1.0.0 marks the beginning of large-scale use of Nacos in production environments. The new version not only adds some new features to meet the needs of the community and cluster stability, but also releases the performance test report of the service discovery module, as well as a complete API list and architecture design document.

Evolution of Nacos

Since being opened in July 2018, Nacos has evolved over 10 versions in less than a year, thanks to the strong attention and participation of the community. Many enterprise customers have also been using Nacos as a registry and configuration center for their production environments.

Nacos originated from alibaba’s core middleware polished by nearly a decade of production environment, and supported the double 11 large-scale business scenarios before open source. Nacos is open source not only to enrich the entire microservice ecosystem, but also to create a truly production-level service registry and configuration management platform that can handle the complex needs of large-scale, high-concurrency and complex environments. In anticipation of the 1.0.0 GA release, here’s a look at the evolution of Nacos:

  • 2018.07.20 – Nacos 0.1.0 supports basic service discovery and configuration management functions.
  • 2018.09.15 – Nacos 0.2.0 officially supports SpringCloud ecology.
  • 2018.10.26 – Nacos 0.3.0 provides console interface.
  • 2018.11.19 – Nacos 0.5.0 open source DNS-F supports DNS protocol service discovery.
  • 2018.12.06 – Nacos 0.6.0 officially supports Dubbo client registration service and K8S deployment.
  • 2018.12.18 – Nacos 0.7.0 supports CMDB metadata management and Node.js client.
  • 2019.01.22 – Nacos 0.8.0 pre-GA supports console login and namespaces. Nacos-sync connects Eureka and Zookeeper.
  • 2019.02.22 – Nacos 0.9.0 adds metrics data exposure, adds test cases, improves overall stability.
  • 2019.04.10 – Nacos 1.0.0 GA supports both AP and CP conformance, pressure reporting, stability enhancement and experience optimization.

New features in Nacos 1.0.0

Registered instances support the Ephemeral field

Nacos added an Ephemeral field at the instance level in version 1.0.0. This field indicates whether the registered instance is temporary or persistent. If it is temporary, the registered instance is not persisted on the Nacos server and needs to be kept alive through heartbeat reporting. If the heartbeat is not reported within a period of time, it is removed by the Nacos server. If the heartbeat starts reporting again after removal, the instance is re-registered. A persistent instance is persisted to the Nacos server, and even if the client process that registered the instance is not there, the instance is not deleted from the server, only the health state is set to unhealthy.


There can be both temporary and persistent instances on the same service, which means that when all the instance processes of the service are gone, some instances are removed from the service, and the remaining instances remain in the service.

Since the ephemeral field was not uploaded when the old version client registered the instance, a default ephemeral value needs to be set on the Nacos server. The default value of ephemeral in Nacos 1.0.0 is true, meaning that older clients register temporary instances by default. If you want to register persistent instances with old clients, you can set the switch:

curl -X PUT '$NACOS_SERVER:8848/nacos/v1/ns/operator/switches? entry=defaultInstanceEphemeral&value=false'Copy the code

Matters needing attention

  1. When upgrading from an older version of Nacos to Nacos 1.0.0, instance data loaded from disk is set to persistent instances.

The registered instance supports the groupName field

When a client registers an instance, it can specify the group name to register at the method level. This group name and the service name are two-dimensional identifiers of the service, which together locate a service. A typical use of grouping is as follows:

namingService.registerInstance("nacos.test.1"."group1", instance);Copy the code

Interfaces that do not specify a group are still supported, and a default group is assigned to the service on the server side: DEFAULT_GROUP.

Added Server status Settings

Nacos increased control of the Server status, all state defined in com. Alibaba. Nacos. Naming. Cluster. ServerStatus class.


The meanings of each state are described as follows:

  • UP: The Server runs normally and all read and write requests are accepted.
  • DOWN: Indicates that the Server is abnormal. An HTTP 503 error is returned for all requests.
  • STARTING: Server is still being started, all requests return HTTP 503 error;
  • PAUSED: The Server is PAUSED manually, which is different from DOWN. The system may detect an exception and set the DOWN state. PAUSED state indicates that the current Server may be ok but has been intervened manually.
  • WRITE_ONLY: Only non-GET requests will be accepted;
  • READ_ONLY: Only GET requests will be accepted;

You can use the following interfaces to change the status of all the machines in the cluster. If the debug=true parameter is added, only the status of the current machine can be changed.

curl -X PUT '$NACOS_SERVER:8848/nacos/v1/ns/operator/switches? entry=overriddenServerStatus&value=READ_ONLY'Copy the code

At the same time, the state can be modified adaptively. For example, when STARTING, the state will be automatically set to UP after data loading is complete. During the running, if system exceptions such as disk full are detected, the state will be set to DOWN. However, the adaptive state value takes precedence over the state value set using the interface, so when you want to restore the adaptive state setting, remember to set the overriddenServerStatus of the interface to null.

Added the global push switch

The global push switch is supported, which can turn on or off the push of service changes. The call interface is as follows:

curl -X PUT '$NACOS_SERVER:8848/nacos/v1/ns/operator/switches? entry=pushEnabled&value=false'Copy the code

After push is disabled, the client will still update the data through polling, but the update speed is not as fast as push.

Supports data preheating at startup

In the old version of Nacos, as long as the Server is successfully started, it will start to provide external services. At this time, the data of the service may not be completely loaded, which may lead to incomplete data received by the client. 1.0.0 added logic for data preheating, for persistent data, waiting for all data to be loaded from disk, and for non-persistent data, such as temporary instances, waiting for full data to be pulled from other servers. After all data is ready, the Server state is set to UP.

Matters needing attention

For the preheating of temporary instances, the implementation mechanism is that the Server will pull data from other Server nodes during startup. If the pull succeeds, the startup succeeds. However, when upgrading from the old version Server to 1.0.0, the interface for pulling full data does not exist in the old version Server. The first upgraded machine will not be able to pull any data, and subsequent upgraded machines will not be able to pull data from the first upgraded machine. At this point, it is recommended to use the call API to set the running status of the Server to WRITE_ONLY, which allows the client data to gradually gather and compensate, but prevents any query traffic. After the cluster data is ready, the running status will be cleared, and the cluster will adjust the running status itself, and then the complete service will be provided.

Metadata edit box optimization

The previous metadata editing box requires users to edit it in accordance with the specified format, which is prone to error, as shown in the following figure:

1.0.0 will optimize the metadata editing box of the service page. While adjusting the size of the editing box, syntax highlighting will be added to make it easier for users to edit and identify formatting problems. A preview of the editing box is as follows:

Supports MySQL 8.0

Nacos 1.0.0 will support MySQL 8.0 drivers.

In addition to the changes mentioned above, Nacos 1.0.0 also includes code optimizations and some bug fixes. The full list of changes can be found at github.com/alibaba/nac…

Available for mass production

Full list of APIS open, model design and architectural design documents published

IO /zh-cn/docs/… Nacos. IO /zh-cn/docs/… IO/zh-CN /docs/…

Release the performance test report

Nacos 1.0.0 was performance tested and stress-tested in large-scale scenarios for read and write capabilities for service discovery and configuration management. The test data obtained so far are as follows:

  • Capacity: 1 million + service instances, 1 million + configurations, and 1 million + client connections;
  • Read and write TPS: 10,000 +;
  • Node expansion capability: 100 nodes +;
  • Push capability: 99.9% of 10,000 clients will receive change notification within 3 seconds if they subscribe to the same configuration/service.

IO/zh-CN /docs/… Nacos. IO/useful – cn/docs /…

100+ enterprise users have been on production

At present, AS a service discovery and configuration center, Nacos has been used in more than 100 production environments, including Alibaba, Huya and other enterprises, which have been applied in core business scenarios on a large scale.

Upgrade Suggestions

Some interfaces on the Nacos 1.0.0 server are incompatible with versions earlier than 0.8.0, which need to be upgraded to 0.8.0 and then to 1.0.0. For clients, Nacos 1.0.0 is compatible with client access to versions 0.5.0 and above.

How to build the

To achieve this, you need to be actively involved in the Nacos community. If you find typos in your documentation, errors in your code, or want new features or suggestions, you can create issues on GitHub.

If you want to get started, you can select issues in the Github repository with the following tags.

  • Good first Issue: This is a good introduction to issues for beginners.
  • Contribution welcome: very important problems and very important modules, but currently lack of contributors, contributors are welcome to contribute.

The thriving Nacos community

DISS is cheap, show me your hand


More important than teasing is helping the community develop Nacos

  • Follow and join the Nacos community as a user

The Nacos community is developing vigorously. As of the date of publication, Nacos has 9 wechat groups in just a few months, among which 7 are full, 1 QQ group and 1 Dingdinggroup. The number of community concerned about Nacos has nearly 5000 people, exchanging technology and experience with “Dao (basis) friends” in the Nacos group. Recruiting friends, grabbing red envelopes… It’s a joy.

Qr.dingtalk.com/action/join… (Qr code automatic recognition)

Join the Nacos community as a code contributor

The growth from Nacos users to contributors is a natural progression, and the Nacos development team has grown from 4 code contributors to more than 40. In version 1.0.0, contributors to the Nacos repository include: Yanlinly, Xuechaos, HXY1991, Jifengnan, NkOrange, NeatLife, Loadchange, TsingLiang, JamesLCJ, Duansheli, PBting, Mingyixu, PaderLOL, Nanamikon, etc.

In addition, the community neatlife contributes Nacos clients in several languages: PHP, C#.

The community is also planning to add a team introduction page on Nacos website nacos. IO at the appropriate time to officially announce everyone, welcome to join the Nacos community and contribute to the community. In Apache parlance, “community over code”!


Rookie moment – “What is Nacos?”

Don’t know what Nacos is yet? It doesn’t matter, on Github star with the program ape brothers say hello!!

Nacos is a new open source project launched by Alibaba in July 2018. The main vision of Nacos is to help users better build, deliver and manage their micro-service platforms in the cloud native era by providing easy-to-use infrastructure for dynamic service discovery, service configuration management, service sharing and management.



The original link

This article is the original content of the cloud habitat community, shall not be reproduced without permission.