6 SpringCloud study notes - the difference Ribbon and Nginx

First, the difference Ribbon with Nginx

1, Nginx server-side load balancing.

                          Nginx is a unified client for all requests to Nginx, perform load balancing requests forwarded by Nginx, belonging to the server load balancing, that request is forwarded by the Nginx server.

2, Ribbon client load balancing.

                         Ribbon is to get on Eureka registry server-side service registration list of information services, the local cache to the JVM, then realized rpc call technical remote call locally, polling load balancing strategy, namely to achieve load balancing at the client.

Second, the application scenarios

1, Nginx adapted to achieve load balancing server, such as Tomcat, Jetty;

2, Ribbon suitable for micro-RPC remote service call for local load balancing,

        For example Dubbo, SpringCloud have adopted local load balancing. Ribbon is SpringCloud client load balancer.

3, the local client load balancing:

          Local obtain registration information from Eureka corresponding to the list, after obtaining information list, and then local load balancing, is implemented on the client side.

4, the load balancing algorithm : Interface% Total number of requests the server to obtain the actual position of the target server.

Published 27 original articles · won praise 8 · views 10000 +

Guess you like

Origin blog.csdn.net/gonghua0502/article/details/103266622