Microservice architecture technology stack



For projects with complex business, microservice architecture is the preferred solution; For our developers, we must follow up and learn from good solutions, but we can’t blindly pursue popular technologies. The purpose is to solve problems. This article mainly summarizes the technology stack contained in the microservice architecture. Let’s have a look!

Microservice development

Role: rapid development of services.

  • Spring
  • Spring MVC
  • Spring Boot

SpringAt present, it is an essential framework for Java Web developers. Springboot simplifies the configuration of spring development. At present, it is also the mainstream development framework in the industry.

Microservice registration discovery

Functions: discovery service, registration service and centralized management service.


  • Eureka server: provides service registration service. After each node is started, it will be registered in Eureka server.
  • Eureka client: simplify the interaction with Eureka server.
  • Spring Cloud Netflix : GitHubfile


ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

ZookeeperIt is a centralized service used to maintain configuration information, name, provide distributed synchronization and provide group services.

Difference between zookeeper and Eureka

Zookeeper guarantees CP, Eureka guarantees AP:

  • C: Data consistency;
  • A: Service availability;
  • P: The fault tolerance of service to network partition fault, these three characteristics can not be met at the same time in any distributed system, and at most two can be met at the same time.

Microservice configuration management

Function: uniformly manage the configuration information of one or more services and manage them centrally.


Distributed configuration management platform (distributed configuration management platform), which is a general component / platform focusing on the configuration management of various distributed systems, provides unified configuration management services, and is a complete set of distributed configuration unified solution based on zookeeper.



Apollo (Apollo) is a distributed configuration center developed by Ctrip framework department. It can centrally manage the configuration of different environments and clusters of applications. After the configuration is modified, it can be pushed to the application end in real time. It also has standardized permissions, process governance and other characteristics, and is used for microservice configuration management scenarios.

Authority authentication

Function: according to the security rules or security policies set by the system, users can access and only access their authorized resources, no more or no less.

Spring Security

Apache Shiro

Apache Shiro™ is a powerful and easy-to-use Java security framework that performs authentication, authorization, cryptography, and session management. With Shiro’s easy-to-understand API, you can quickly and easily secure any application – from the smallest mobile applications to the largest web and enterprise applications.

Batch processing

Function: batch processing of the same type of data or things

Spring Batch

Scheduled task

Function: what to do regularly.


Microservice invocation (Protocol)

Communication protocol


  • Send rest request through HTTP / HTTPS for data interaction


  • Remote Procedure Call
  • It is a protocol that requests services from remote computer programs through the network without understanding the underlying network technology. RPC does not depend on the specific network transmission protocol, TCP, UDP and so on.


A high-performance, open-source universal RPC framework

The so-called RPC (remote procedure call) framework actually provides a set of mechanisms to enable communication between applications, and also complies with the server / client model. When using, the client calls the interface provided by the server, just like calling a local function.


  • Remote Method Invocation
  • Pure Java call

Service interface call

Role: communication between multiple services


Spring cloud Netflix’s microservices are exposed in the form of HTTP interface, so they can be called with Apache’s httpclient or spring’s resttemplate. Feign is a more convenient HTTP client, which is like calling its own engineering methods, but it doesn’t feel like calling remote methods.

Service fuse

Function: when the request reaches a certain threshold, do not let the request continue


Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.


A lightweight powerful flow control component enabling reliability and monitoring for microservices. (lightweight flow control, Java library)

Load balancing of services

Function: reduce service pressure and increase throughput


Spring cloud ribbon is a client-side load balancing tool based on HTTP and TCP, which is implemented based on Netflix ribbon


Nginx (engine x) is a high-performance HTTP and reverse proxy web server. It also provides IMAP / POP3 / SMTP services

What’s the difference between nginx and ribbon

Nginx belongs to server-side load balancing and ribbon belongs to client-side load balancing. Nginx and tomcat, ribbon and calls between services (RPC).

Message queue

Function: decouple business and process data asynchronously





Log collection (elk)

Function: collect service logs and provide log analysis, user portrait, etc




API gateway

Function: external requests are intercepted through the API gateway, and then forwarded to the real service


Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.

Service monitoring

Function: display the operation of each service (CPU, memory, access, etc.) in visual or non visual form




Service link tracking

Function: clarify the calling relationship between services



data storage

Function: store data

Relational database


Non relational database



Function: store data


Sub database and sub table

Function: database sub database and sub table scheme



Service deployment

Role: rapidly deploy, launch and continuously integrate the project