Gateway era of micro-services related to technology selection and deployment (nacos + gateway)

1. Scene Description

Due to use micro-services, on this registry, and colleagues conducted a discussion on the technical prototype, tentatively scheduled solution is to use: Alibaba nacos + springcloud gateway, the following table is a comparison of registered centers colleague finishing, previously used the springcloud of eureka as a registration center (springcloud- high-availability deployment), compared with eurka, the reason to use Ali’s nacos, where there is a major reason for this is nacos integrates dynamic loading, do not restart the gateway, dynamic loading service configuration.

Registry comparison:

Health Check Service

(Weak) long connection, keepalive

It can be equipped with support

Service status, memory, hard drive, etc.

Heartbeat connection

Heartbeat / custom

Multi-data center

stand by

stand by

kv storage services

stand by

stand by

stand by

stand by


CAP theorem

Using an interface (multi-language)


Supports http and dns

watch support

stand by

Support long polling / Much of the increase

Full amount / support long polling

Support long polling

Full amount / support long polling



https support (weak)

Spring Cloud Integration

It has supported

It has supported

It has supported

It has supported

It has supported

Feature Zookeeper Eureka Consul Etcd Nacos
paxos raft raft raft
http(sidecar) http/grpc dns/http/rpc
metrics metrics metrics metrics
acl acl /https acl /https

Recommended Nacos> Consul> Etcd> Eureka> Zookeeper

Nacos is springcloudalibaba family bucket assembly, suitable for use as dubbo rpc service access springcloud of.

2. nacos brief

nacos Alibaba open source project, released earlier this year has reached the production level version, there are Chinese documents and English documents, the community is very active.

Key Features:

Under Interested shoes can go to the official website address: https: //

3. Deploy and description

These days the official website document over again, deployed a demo version of the foundation of the next presentation.

3.1 deployment instructions

Software Pharaoh took six virtual machines:

(1) 11 servers deployed springcloud gateway, external unified provision of services;

(2) 12 and 13 servers, deployed nacos, mutually registered, horizontally scalable, provide services registration, configuration registration;

(3) the server 14, deployed Producer (service provider), the deployment of two examples;

(4) 15 servers deployed consumer (caller to the service, software Pharaoh), deployed two instances;

(5) a server 16, the dynamic test configuration can be ignored;

Chart 3.2

3.3 detailed description of the architecture of FIG.

3.3.1 nacos registry and configuration center.

nacos comes with the console, visit the address: http: // 8848 / nacos or

Username: nacos; password: nacos;

After a successful login below:

There are three major functions:

nacos registry (1) central node registration list, shown here horizontally scalable, deploying multiple, where two deployed, respectively 12 and 13 servers.

(2) Service Management, launched three services, namely, gateways, service providers (two instances), consumer services (two instances).

(3) Configuration management, the configuration where two, the first one is used for testing, the testing dynamic access, the second is springcloud gate profile 11 on the server.

3.3.2 Access Description

(1) Gateway access address:

Description: 7000 gateway address, producer name registration service center, getpinfo for the specific service.

(2) Service Provider Address:,http:/10.192.1681.14:7001/getpinfo,

(3) nacos Address:,http:/10.192.1681.13:8848/nacos

3.4 Written in the last

Currently nacos still in the stage of rapid iteration, regardless of version or features are also a little bit of a mess, after all, only the open source last year, or to step on some pit, software, Pharaoh still have to think of a heart full preparations.

I’m “Software Pharaoh,” I felt that if I may, to focus the next chant, subsequent updates seconds to know! Welcome forum, No. namesake public message exchange!

Leave a Reply