当前位置:网站首页>Microservice registry Nacos introduction
Microservice registry Nacos introduction
2022-07-05 07:19:00 【jiankang66】
One 、 background
Recently, the company has used nacos As a registry , I just got to know ,Nacos The main role is to discover 、 Configure and manage microservices .Nacos Provides an easy-to-use feature set , Helps you quickly implement dynamic service discovery 、 Service configuration 、 Service metadata and traffic management .
Two 、 vision
Nacos By providing easy-to-use dynamic service discovery 、 Service configuration 、 Service infrastructure such as service sharing and management , Help users in the cloud native era , In the private cloud 、 In all cloud environments like hybrid cloud or public cloud , Better build 、 deliver 、 Manage your own micro service platform , Faster reuse and composition of business services , Deliver the value of business innovation faster , So as to win the market for users .
3、 ... and 、 Key features
1、 Service discovery and service health monitoring
Nacos Provide real-time health checks on services , Prevent sending requests to unhealthy hosts or service instances .
2、 Dynamic configuration services
Dynamic configuration services allow you to centralize 、 Manage application configuration and service configuration of all environments in an external and dynamic way .
Dynamic configuration eliminates the need to redeploy applications and services when configuration changes , Make configuration management more efficient and agile .
Configuration centralized management makes it easier to implement stateless Services , Make it easier for services to scale elastically on demand .
3、 dynamic DNS service
Support weight routing , It is easier to realize middle tier load balancing 、 More flexible routing strategy 、 Flow control and the simplicity of the data center intranet DNS Resolution service .
4、 Services and metadata management
Nacos It enables you to manage all services and metadata of data center from the perspective of microservice platform construction , Include a description of the management service 、 Life cycle 、 Static dependency analysis of services 、 The health of the service 、 Traffic management of services 、 Routing and security policies .
Four 、 advantage
Use Nacos Simplify service discovery 、 Configuration Management 、 Solutions for service governance and management , Let the discovery of microservices 、 management 、 share 、 It's easier to combine . When the consumer from nacos After the registration center obtains the service provided by the manufacturer once , Next time you don't need nacos You can also get this service from the manufacturer .
5、 ... and 、 Main concepts
1、Namespace
Used for tenant granularity configuration isolation . Under different namespaces , There can be the same Group or Data ID Configuration of .Namespace One of the most common scenarios is the separation of configurations between different environments , For example, develop the resources of test environment and production environment ( Such as configuration 、 service ) Isolation etc. , Do not specify command space , It uses public.
2、Group
Nacos A set of configuration sets in , It is one of the dimensions of organization configuration . Through a meaningful string ( Such as Buy or Trade ) Group configuration sets , To distinguish Data ID Same configuration set . When you are in Nacos When you create a configuration on , If the name of the configuration group is not filled in , Then the name of the configuration group is used by default DEFAULT_GROUP .
3、Data ID
Nacos Of a configuration set in ID. config set ID It is one of the dimensions of organization division and configuration .Data ID Usually used to organize the configuration set of partition system . A system or application can contain multiple configuration sets , Each configuration set can be identified by a meaningful name . Generally, the name of micro service is used as Date ID.
4、Service Metadata
Service metadata refers to including service endpoints (endpoints)、 Service Tag 、 Service version number 、 Service instance weight 、 Routing rules 、 Security policy and other data describing the service .
5、Service Provider
Refers to the application side that provides reusable and callable services .
6、Service Consumer
It refers to the application party that will initiate a service call .
6、 ... and 、 Data model
Nacos Data model Key Uniquely determined by triples , Namespace The default is empty string , Public namespace (public), The default grouping is DEFAULT_GROUP. Every development or self-test will cut branches , stay nacos Create a new namespace on , Set group name .

7、 ... and 、 Covering relationships
Nacos The configuration on is the second priority of external file configuration , The following figure shows the priority of configuring the override relationship , Lower the priority from top to bottom :

8、 ... and 、Nacos Console operation
The main purpose is to enhance the list of services , Health management , Service governance , Management and control capabilities in distributed configuration management , In order to further help users reduce the cost of managing microservice application architecture .
1、 List of services
Service list helps users manage all their micro services and service health status with a unified view .

Click Details... On the service list page , You can see the details of the service . You can view the service 、 Basic information about clusters and instances . You can click the Edit button of the instance .
(1) Modify the weight of the instance . If you want to increase the instance traffic , You can increase the weight , If you don't want the instance to receive traffic , You can set the weight to 0.

(2) You can modify the configuration metadata information of the instance .

(3) Local self-test of each service , Sometimes it will be forwarded to the online deployment environment , unable debug, At this time, you need to offline online services on the service details page , Launch local services .

2、 Configuration Management
Nacos Support based on Namespace and Group Configuration group management , So that users can more flexibly according to their own needs according to the environment or application 、 Module etc. , Group management microservices and Spring A large number of configurations . One configuration per microservice , The format is Properties.

3、 Namespace Management
Nacos be based on Namespace Help users logically isolate multiple namespaces , This can help users better manage tests 、 Advance 、 Production and other multi environment services and configurations , Let each environment have the same configuration ( Such as database data source ) You can define different values .

Nine 、 Online deployment
1、 land nacos Download installation package
https://github.com/alibaba/nacos/releases

2、 adopt scp The command is uploaded to the server
3、 decompression tar Package and go to the decompression directory to execute the startup command .
tar -xvf nacos-server-$version.tar.gz
cd nacos/bin
sh startup.sh -m standalone4、 If there is a firewall, turn off the firewall , At the same time, configure security group opening 8848 port .
5、 Login server address :ip:8848, The user name and password are nacos.

Ten 、 Reference resources
11、 ... and 、 summary
That's about nacos Some introductions of , Record it here , I hope I can help you , If you think it's good , Welcome to wechat search java Basic notes , Relevant knowledge will be continuously updated later , Make progress together .
边栏推荐
- Database SQL practice 3. Find the current salary details of the current leaders of each department and their corresponding department number Dept_ no
- [OBS] x264 Code: "buffer_size“
- Executealways of unity is replacing executeineditmode
- 2022 PMP project management examination agile knowledge points (7)
- Brief description of inux camera (Mipi interface)
- What is sodium hydroxide?
- Don't confuse the use difference between series / and / *
- 并发编程 — 死锁排查及处理
- Reading literature sorting 20220104
- 【软件测试】06 -- 软件测试的基本流程
猜你喜欢

Ros2 - ros2 vs. ros1 (II)

Jenkins reported an error. Illegal character: '\ufeff'. Class, interface or enum are required

Intelligent target detection 59 -- detailed explanation of pytoch focal loss and its implementation in yolov4

Ethtool principle introduction and troubleshooting ideas for network card packet loss (with ethtool source code download)
![[idea] efficient plug-in save actions to improve your work efficiency](/img/6e/49037333964865d9900ddf5698f7e6.jpg)
[idea] efficient plug-in save actions to improve your work efficiency

Hdu1231 maximum continuous subsequence (divide and conquer or dynamic gauge or double pointer)

Import CV2 prompt importerror: libgl so. 1: Cannot open shared object file: no such file or directory

C#学习笔记

PostMessage communication

第 2 章:小试牛刀,实现一个简单的Bean容器
随机推荐
list. files: List the Files in a Directory/Folder
Unity UGUI不同的UI面板或者UI之间如何进行坐标匹配和变换
IPage can display data normally, but total is always equal to 0
M2dgr slam data set of multi-source and multi scene ground robot
目标检测系列——Faster R-CNN原理详解
氫氧化鈉是什麼?
Light up the running light, rough notes for beginners (1)
并发编程 — 死锁排查及处理
Unity ugui how to match and transform coordinates between different UI panels or uis
The SQL implementation has multiple records with the same ID, and the latest one is taken
DelayQueue延迟队列的使用和场景
Implementation of one-dimensional convolutional neural network CNN based on FPGA (VIII) implementation of activation layer
How can Oracle SQL statements modify fields that are not allowed to be null to allow nulls?
[framework] multi learner
Install deeptools in CONDA mode
Course learning accumulation ppt
U-boot initialization and workflow analysis
golang定时器使用踩的坑:定时器每天执行一次
[untitled]
D2L installation