Home>Article>Operation and Maintenance> The difference between ribbon and nginx
Server-side load balancing Nginx
nginx transfers all client requests to nginx, and nginx forwards load balancing requests, which belongs to server-side load balancing.
The request is forwarded by the nginx server.
Client load balancing Ribbon
Ribbon obtains the service registration information list from the eureka registration center server, caches it locally, and then implements the polling load balancing strategy locally.
Achieve load balancing on the client side.
Differences in application scenarios:
Nginx is suitable for server-side load balancing such as Tomcat, and Ribbon is suitable for RPC remote calls in microservices to achieve local service load balancing. For example, Dubbo and SpringCloud both use local load balancing.
Spring Cloud's Netflix provides two components to implement soft load balancing calls: ribbon and feign.
Ribbon
is a load balancer based on HTTP and TCP clients
It can configure ribbonServerList (server list) on the client, and then poll requests to achieve balancing load.
What is the difference between springcloud's ribbon and nginx? Which one performs better?
nginx has good performance, but the ribbon can remove unhealthy nodes. It is more complicated to remove nodes in nginx. Ribbon can also work with fuses
ribbon is client load balancing, and nginx is server load balancing. Client load balancing, all client nodes maintain a list of servers they want to access. The server-side load balancing software module will maintain a list of available services
ribbon is a client-side load balancer, which can be simply understood as a function similar to the nginx load balancing module.
For more Nginx related technical articles, please visit theNginx usage tutorialcolumn to learn!
The above is the detailed content of The difference between ribbon and nginx. For more information, please follow other related articles on the PHP Chinese website!