当前位置:网站首页>Loadbalancer load balancer

Loadbalancer load balancer

2022-06-12 15:12:00 CXgeng

LoadBalancer Load balancing


brief introduction

Load balancing is to distribute the load among multiple execution units , There are two common ways of load balancing . A separate process unit , Through load balancing strategy , Forward the request to different execution units , for example Nginx. The other is to encapsulate the logic of load balancing to the client of the service consumer in the form of code , The service consumer client maintains a service provider information table , Distribute the request to multiple service providers through load balancing policy , So as to achieve the goal of load balancing .
SpringCloud The original client load balancing scheme Ribbon Has been abandoned , In its place LoadBalancer ,LoadBalancer yes Spring Cloud Commons A subproject of , It belongs to the second method mentioned above , It encapsulates the logic of load balancing on the client , And run in the process of the client .
stay Spring Cloud Component micro service system ,LoadBalancer Load balancer as a service consumer , There are two ways to use it , One is with RestTemplate Combination , The other is and Feign Combination .Feign Integrated by default LoadBanlancer.


原网站

版权声明
本文为[CXgeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010503587911.html