Coder Social home page Coder Social logo

nacos-sync's Introduction

NacosSync

Function

  • Console: provide API and console for management
  • Worker: provider 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:

NacosSync Migration User Guide

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.2.x+: 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 nacosSync/
mvn clean package -U

The path to the target file:

nacos-sync/nacossync-distribution/target/nacosSync.0.3.0.zip

After extracting the installation package, the directory structure:

nacosSync
├── LICENSE
├── NOTICE
├── bin
│   ├── nacosSync.sql
│   ├── shutdown.sh
│   └── startup.sh
├── conf
│   ├── application.properties
│   └── logback-spring.xml
├── logs
└── nacosSync-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:8081/#/serviceSync

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.