Skip to content

Features

allenxwang edited this page Jan 19, 2013 · 13 revisions

Multiple and pluggable load balancing rules

Ribbon provides rule based load balancing. It supports round robin, response time weighted and random load balancing mechanisms out of the box. It can be further extended by plug in a different rule.

Integration with service discovery

Ribbon includes load balancers that are capable of service discovery in a dynamic environment. All you need to do is to implement an interface that returns a list of servers. Integration with Eureka based service discovery is provided in ribbon-eureka.

Cloud enabled

Ribbon provides features that are designed and battle proven for cloud environment.

It has knowledge of the “zone” (EC2 term, similar to “rack” in a data center) and can be tuned to filter the servers based on the zone. For example, the “zone affinity” setting enables the load balancer to only return the servers in the same zone, thus reducing the cost of cross zone traffic and speeding up the response time. It can be also detect the overall health of a zone and can be configured to dynamically avoid the worst zone as a whole.

To deal with the “cold start” problem observed in cloud, Ribbon can “warm up” network connections with target servers before real requests coming in.

Built-in failure resiliency

Ribbon can dynamically determine the liveness of servers through the IPing interface and skip servers that are no longer alive. It can further filter the servers based on the circuit breaker pattern.

Clients integrated with load balancers

Ribbon provides the interface and abstract class that integrates the load balancer with the client. It includes a REST client in ribbon-httpclient sub project. You can implement your own client that utilizes the load balancers with ease.

Configuration based client factory

Ribbon utilizes Archaius to provide an easy way to create instances of load balancers and clients from its configuration based client factory. All you need to do is to define properties with Archaius and call a simple API in ClientFactory.