Syncer Quick Start

Differ-structure, multi-service center synchronization tool

Syncer is a multiple servicecenters synchronization tool designed for large microservice architectures,supporting differ-structure servicecenters.

Quick Start

1 Getting & Running Service center

Take Service-center as an example, reference to Install ServiceCenter

  1. Download and decompression ServiceCenter发布包(>=1.3.0)
    # 解压tar包
    $ tar -zxvf  apache-servicecomb-service-center-1.3.0-linux-amd64.tar.gz
    $ cd apache-servicecomb-service-center-1.3.0-linux-amd64/
3.3 Running ServiceCenter Syncer
Parameter Description
  • node

    The member name of syncer, that must be unique in the cluster

  • sc-addr

    Service center address, which is the service registry address. Cluster mode is supported, and multiple addresses are separated by commas.

  • bind-addr

    P2P address of Syncer for communication with other Syner members in P2P networks by Gossip.

  • rpc-addr

    Address of Syncer for data transmission, used to synchronize microservices data between Syncers.

  • join-addr

    The bind-addr of target syncer, one of other syncer members, the current Syncer will join the network by this.

  • mode

    Runtime mode of Syncer, specify ‘cluster’ for cluster mode which enables each Syncer to have three instance, default to ‘single’ mode.

  • cluster-name

    Name of the Syncer cluster when mode is set to be ‘cluster’.

  • cluster-port

    The port that the Syner cluster members communicate with when mode is set to be “cluster”.

Suppose there are 2 Service centers, each of them with a Service-center cluster for microservices discovery and registry, as following,

Servicecenter Local address

Single Mode

Start Service-center Syncer to enable communication between 2 service centers

  • Start Sycner on host
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr
  • Start Syncer on host and join into gossip pool
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --join-addr

Cluster Mode

Start 2 Syncer clusters on there host to synchronize microservice data between the 2 service centers

  • Start Syncer cluster on host
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer011 --cluster-port 30201 --join-addr
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer012 --cluster-port 30202 --join-addr
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer013 --cluster-port 30203 --join-addr
  • Start Syncer cluster on host
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer021 --cluster-port 30201 --join-addr
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer022 --cluster-port 30202 --join-addr
$ ./syncer daemon --sc-addr --bind-addr --rpc-addr --mode cluster --node syncer023 --cluster-port 30203 --join-addr

30 seconds after registering a microservice to one of the Service-centers, the information about it can be get from the other one.