问题
Netflix makes use of Ribbon, which is in their terms a "client-side load-balancer". What are the use-cases and advantages of a client-side load-balancer compared to a traditional load-balancer? Is Ribbon, and other Netflix OSS services AWS -specific or can they be used in other contexts?
回答1:
As already mentioned by using Ribbon you don't need an additional load balancer. You can also configure the balancing algorithm for each client differently, if you need to. At first I was a bit surprised also, but it does make a lot of sense.
Currently Spring Cloud, which uses Netflix OSS for most part, is independent of AWS.
I have made a small POC that you can check out here if want.
回答2:
One reason for using client-side load balancer can be performance. With client side balancer you can directly contact desired service with one network hop (after initial discovery of course); with traditional load-balancer you need two hops - see my very unprofessional test.
Unfortunately I don't have that much experience with Netflix OOS, I just deduce from documentation that at least Spring Cloud Netflix can run also e.g. on Cloud Foundry.
来源:https://stackoverflow.com/questions/29730310/why-client-side-load-balancers-like-ribbon