nacos-group/nacos-sync
Fork: 145 Star: 299 (更新于 2024-12-05 12:16:57)
license: Apache-2.0
Language: Java .
Service Sync component
最后发布版本: 0.5.0 ( 2024-05-19 00:24:21)
Nacos Sync
Example
Function
- Console: provide API and console for management
- Worker: provide the service registration synchronization.
Architecture
Architecture Topology
+-------------+
+----> |NacosClusterA|
| +-------------+ +-------------+
| |NacosClusterB|
Pull | +--+----------+
Info | +------------+ ^
| |ZooKeeper | |
| +--+---------+ | Push Info
| ^ Pull Info |
| | |
| ++-----------------------------+--+
<--------+ NacosSync1, NacosSync2,.... |
+---+-------------------------+---+
| |
| |
| |
| +---------+ |
+-----> |NacosSync| <-----+
|Database |
+---------+
Architecture HighLights
- All registration information will be stored in NacosSync DB.
- Multiple NacosSync instances will perform the same job.
- Multiple NacosSync instances ensure high availability.
- Multiple NacosSync instances performing the same job ensure the simplicity.
- NacosCluster target will dedup the synchronization information from Nacos.
Quick Start:
- Swagger API: http://127.0.0.1:8083/swagger-ui.html#/
- Web Console: http://127.0.0.1:8083/
- Others: TBD
NacosSync Migration User Guide
Support migration type
Source | Target | Support | Note |
---|---|---|---|
Nacos | Nacos | Yes | Only supports the same version of Nacos migration,especially the version of 0.8 migrates to 1.0 or above. |
Nacos | Zookeeper | Yes | Only support registery center of Dubbo |
Nacos | Consul | Yes | Only support registery center of Spring Cloud |
Nacos | Eureka | Yes | Only support registery center of Spring Cloud |
Zookeeper | Nacos | Yes | Only support registery center of Dubbo |
Consul | Nacos | Yes | Only support registery center of Spring Cloud |
Eureka | Nacos | Yes | Only support registery center of Spring Cloud |
Manual Goal
- Start the NacosSync service
- Use a simple example to demonstrate how to migrate a Dubbo client registered in the Zookeeper Registry to the Nacos Registry
Prerequisites
Before you begin, install the following:
- 64bit OS: Linux/Unix/Mac/Windows supported, Linux/Unix/Mac recommended.
- 64bit JDK 1.8+: downloads, JAVA_HOME settings.
- Maven 3.5.2+: downloads, settings.
- MySql 5.6.+
Download & Build From Release
There are two ways to get NacosSync.
- Download run package
- Download source code from Github
cd nacos-sync/
mvn clean package -U
The path to the target file:
nacos-sync/nacossync-distribution/target/nacos-sync-0.5.0.tar.gz
After extracting the installation package, the directory structure:
nacos-sync
├── LICENSE
├── NOTICE
├── bin
│ ├── nacosSync.sql
│ ├── shutdown.sh
│ └── startup.sh
├── conf
│ ├── application.properties
│ └── logback-spring.xml
├── logs
└── nacos-sync-server.jar
Initialize The DB
The default is Mysql database, which can support other relational databases
- Build db schema, the default schema name nacos_sync.
- Tables do not need to be created separately, which is conducive to hibernate's automatic table creation function.
- If the automatic table creation fails, you can build the table nacosSync.sql, the table statement is in the bin folder.
DB Configuration
In the bin folder, application.properties:
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/nacos_sync?characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=root
Start Server
$ nacosSync/bin:
sh startup.sh start
Admin Console
http://127.0.0.1:8083/#/serviceSync
Advanced Configuration
Full Synchronization from Zookeeper to Nacos (Dubbo)
When “*” is entered in the “Service Name” field of this form, it will fully synchronize all services from Zookeeper to Nacos, but only when using Dubbo.
Full Synchronization from Nacos to Nacos
When “All” is entered in the “Service Name” field of this form, it will automatically synchronize all registered services within the default group of the current cluster.
This description explains the functionality clearly for English-speaking users.
最近版本更新:(数据更新于 2024-09-23 08:41:16)
2024-05-19 00:24:21 0.5.0
2023-05-15 17:40:37 0.4.9-PRE
2022-07-30 12:59:20 0.4.8
2021-06-29 16:04:12 0.4.7
2021-05-16 18:47:05 0.4.6
2021-04-20 16:02:33 0.4.5
2021-02-25 22:31:16 0.4.4
2021-02-22 23:34:36 0.4.3
2021-02-11 21:22:05 0.4.2
2020-10-02 17:16:27 0.4.1
主题(topics):
dubbo, eureka, nacos, springcloud, sync, zookeeper
nacos-group/nacos-sync同语言 Java最近更新仓库
2024-12-20 19:54:15 mybatis-flex/mybatis-flex
2024-12-19 21:53:46 spring-projects/spring-boot
2024-12-19 21:25:16 Stirling-Tools/Stirling-PDF
2024-12-19 16:28:14 Tornaco/Thanox
2024-12-19 10:42:01 alibaba/nacos
2024-12-18 20:58:34 dromara/forest