In the last two chapters, the layering of service, the discovery mechanism of service and the gateway of service were discussed. Mr. Yang Bo took the micro-service route discovery system of Netflix as an example to connect the layering of service, the discovery of service and the gateway of service. How services are found within the system, and how external traffic is routed through the gateway to the internal microservice system. If we understand this part, we will understand the whole Route discovery system of Netflix, which is not complicated.

There are two very important supporting services in Netflix’s microservices architecture

  • Netflix’s big-name registry component is called Eureka
  • Another gateway component of Netflix that is also well known is called Zuul

These two components support the entire Netflix route discovery architecture.

Netflix also divides its internal micro-services into two layers of *** logical division ***. See [” Micro-service Series 06 “Service Discovery Mechanism] [” Micro-Service Series 07″ API Gateway Principle and Implementation]

The lower layer is the basic service (Netflix is called the middle layer service), and the upper layer is called the aggregation service layer (Netflix is called the boundary service). The internal service is also discovered through the registration center Eureka. The basic service registers services with Eureka, and the aggregation service discovers services through Eureka. And cache the aggregation layer producer itself to make direct service calls.

The gateway layer is the layer between external invocation and aggregation service. The gateway layer can be regarded as a super client, which can also be used as a component of micro-service and synchronize the routing table of Eureka registry. After the external service request comes in, the gateway finds the corresponding aggregation service according to the routing table to call.

In addition, the registry and gateway can also govern the entire invocation. For example, they can control the security of the invocation of services, which services have strict security requirements and are not allowed to be invoked randomly, and which services can be released through the gateway. These capabilities can be realized through the gateway and the registry. These are the capabilities associated with service governance.

Netflix’s route discovery is a classic in the industry.

Blog address: “Micro Services Series 08” Netflix architecture Route Discovery Architecture