SylviaBABY commented on a change in pull request #895: URL: https://github.com/apache/apisix-website/pull/895#discussion_r811508843
########## File path: website/blog/2022/02/21/nacos.md ########## @@ -0,0 +1,219 @@ +--- +title: "Feature review: Apache APISIX Realizes Service Discovery Based on Nacos" +authors: + - name: "Zhihuang Lin" + title: "Author" + url: "https://github.com/oil-oil" + image_url: "https://avatars.githubusercontent.com/u/57465570?v=4" + - name: "Fei Han" + title: "Technical Writer" + url: "https://github.com/hf400159" + image_url: "https://avatars.githubusercontent.com/u/97138894?v=4" +keywords: +- Apache APISIX +- Service Registry +- Nacos +- Developer +- Guide +description: This article introduces the basic concepts of Apache APISIX and Nacos and Service Registry, and shows you the specific operation of Apache APISIX to realize service discovery based on Nacos. +tags: [Technology,Service Registry,Discovery] +--- + +> This article introduces the basic concepts of Apache APISIX and Nacos and Service Registry, and shows you the specific operation of Apache APISIX to realize service discovery based on Nacos. + +<!--truncate--> + +## Background information + +### Apache APISIX Introduction + +Apache APISIX is a dynamic, real-time, high-performance API gateway. + +APISIX provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more. Apache APISIX not only has many practical plug-ins, but also supports plugin dynamic change and Hot-loading. + +### Nacos Introduction + +Nacos is an easy-to-use, open source platform for dynamic service discovery, service configuration and service management. It provides a set of simple and useful features enabling you to realize dynamic service discovery, service configuration, service metadata and traffic management. Nacos makes it easier and faster to construct, deliver and manage your microservices platform. It is the infrastructure that supports a service-centered modern application architecture with a microservices or cloud-native approach. + +## Service Registry + +Service Registry is the core component of service management, similar to the role of directory service, and one of the most basic facilities in the microservices architecture. It is mainly used to store service information, such as service provider URL, routing information, and so on. The service registry is implemented by mapping complex service-side information to simple and understandable information for the client. + +The core functions of the Service Registry are as follows: + +- Service registration: Service providers register with the Service Registration Center. +- Service discovery: Service consumers can find the call routing information of service providers through the registry. +- Health check: Ensure that service nodes registered with the service registry can be invoked normally, and avoid the waste of call resources caused by invalid nodes. + +### Why do you need a service registry? + +The registry is essentially to decouple service providers and service consumers. In the microservice system, each business service will call each other frequently, and the IP, port and other routing information of each service need to be managed uniformly. But how do you manage it? You can provide information about existing services to a unified service registry for management through the Service Registration function of the Service Registry. +From the above description, you can know that the registry can help users quickly find services and service addresses through mapping. As business updates iterate, services change frequently. Clients can still pull a list of services through the service discovery function of the registry after registering new services or service downtime on the service side. If the service node of the registry changes, the registry sends a request to notify the client to pull again. Review comment: 文末记得空行 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
