• Stars
    star
    4,468
  • Rank 8,554 (Top 0.2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 11 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. The primary usage model involves REST calls with various serialization scheme support.

Ribbon

Ribbon is a client side IPC library that is battle-tested in cloud. It provides the following features

  • Load balancing
  • Fault tolerance
  • Multiple protocol (HTTP, TCP, UDP) support in an asynchronous and reactive model
  • Caching and batching

To get ribbon binaries, go to maven central. Here is an example to add dependency in Maven:

<dependency>
    <groupId>com.netflix.ribbon</groupId>
    <artifactId>ribbon</artifactId>
    <version>2.2.2</version>
</dependency>

Modules

  • ribbon: APIs that integrate load balancing, fault tolerance, caching/batching on top of other ribbon modules and Hystrix
  • ribbon-loadbalancer: Load balancer APIs that can be used independently or with other modules
  • ribbon-eureka: APIs using Eureka client to provide dynamic server list for cloud
  • ribbon-transport: Transport clients that support HTTP, TCP and UDP protocols using RxNetty with load balancing capability
  • ribbon-httpclient: REST client built on top of Apache HttpClient integrated with load balancers (deprecated and being replaced by ribbon module)
  • ribbon-example: Examples
  • ribbon-core: Client configuration APIs and other shared APIs

Project Status: On Maintenance

Ribbon comprises of multiple components some of which are used in production internally and some of which were replaced by non-OSS solutions over time. This is because Netflix started moving into a more componentized architecture for RPC with a focus on single-responsibility modules. So each Ribbon component gets a different level of attention at this moment.

More specifically, here are the components of Ribbon and their level of attention by our teams:

  • ribbon-core: deployed at scale in production
  • ribbon-eureka: deployed at scale in production
  • ribbon-evcache: not used
  • ribbon-guice: not used
  • ribbon-httpclient: we use everything not under com.netflix.http4.ssl. Instead, we use an internal solution developed by our cloud security team
  • ribbon-loadbalancer: deployed at scale in production
  • ribbon-test: this is just an internal integration test suite
  • ribbon-transport: not used
  • ribbon: not used

Even for the components deployed in production we have wrapped them in a Netflix internal http client and we are not adding new functionality since they’ve been stable for a while. Any new functionality has been added to internal wrappers on top of Ribbon (such as request tracing and metrics). We have not made an effort to make those components Netflix-agnostic under Ribbon.

Recognizing these realities and deficiencies, we are placing Ribbon in maintenance mode. This means that if an external user submits a large feature request, internally we wouldn’t prioritize it highly. However, if someone were to do work on their own and submit complete pull requests, we’d be happy to review and accept. Our team has instead started building an RPC solution on top of gRPC. We are doing this transition for two main reasons: multi-language support and better extensibility/composability through request interceptors. That’s our current plan moving forward.

We currently contribute to the gRPC code base regularly. To help our teams migrate to a gRPC-based solution in production (and battle-test it), we are also adding load-balancing and discovery interceptors to achieve feature parity with the functionality Ribbon and Eureka provide. The interceptors are Netflix-internal at the moment. When we reach that level of confidence we hope to open-source this new approach. We don’t expect this to happen before Q3 of 2016.

Release notes

See https://github.com/Netflix/ribbon/releases

Code example

Access HTTP resource using template (full example)

HttpResourceGroup httpResourceGroup = Ribbon.createHttpResourceGroup("movieServiceClient",
            ClientOptions.create()
                    .withMaxAutoRetriesNextServer(3)
                    .withConfigurationBasedServerList("localhost:8080,localhost:8088"));
HttpRequestTemplate<ByteBuf> recommendationsByUserIdTemplate = httpResourceGroup.newTemplateBuilder("recommendationsByUserId", ByteBuf.class)
            .withMethod("GET")
            .withUriTemplate("/users/{userId}/recommendations")
            .withFallbackProvider(new RecommendationServiceFallbackHandler())
            .withResponseValidator(new RecommendationServiceResponseValidator())
            .build();
Observable<ByteBuf> result = recommendationsByUserIdTemplate.requestBuilder()
                        .withRequestProperty("userId", "user1")
                        .build()
                        .observe();

Access HTTP resource using annotations (full example)

public interface MovieService {
    @Http(
            method = HttpMethod.GET,
            uri = "/users/{userId}/recommendations",
            )
    RibbonRequest<ByteBuf> recommendationsByUserId(@Var("userId") String userId);
}

MovieService movieService = Ribbon.from(MovieService.class);
Observable<ByteBuf> result = movieService.recommendationsByUserId("user1").observe();

Create an AWS-ready load balancer with Eureka dynamic server list and zone affinity enabled

        IRule rule = new AvailabilityFilteringRule();
        ServerList<DiscoveryEnabledServer> list = new DiscoveryEnabledNIWSServerList("MyVIP:7001");
        ServerListFilter<DiscoveryEnabledServer> filter = new ZoneAffinityServerListFilter<DiscoveryEnabledServer>();
        ZoneAwareLoadBalancer<DiscoveryEnabledServer> lb = LoadBalancerBuilder.<DiscoveryEnabledServer>newBuilder()
                .withDynamicServerList(list)
                .withRule(rule)
                .withServerListFilter(filter)
                .buildDynamicServerListLoadBalancer();   
        DiscoveryEnabledServer server = lb.chooseServer();         

Use LoadBalancerCommand to load balancing IPC calls made by HttpURLConnection (full example)

CommandBuilder.<String>newBuilder()
        .withLoadBalancer(LoadBalancerBuilder.newBuilder().buildFixedServerListLoadBalancer(serverList))
        .build(new LoadBalancerExecutable<String>() {
            @Override
            public String run(Server server) throws Exception {
                URL url = new URL("http://" + server.getHost() + ":" + server.getPort() + path);
                HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                return conn.getResponseMessage();
            }
        }).execute();

License

Copyright 2014 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Questions?

Email [email protected] or join us

More Repositories

1

Hystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
Java
23,594
star
2

chaosmonkey

Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.
Go
13,846
star
3

zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Java
12,870
star
4

conductor

Conductor is a microservices orchestration engine.
Java
12,347
star
5

eureka

AWS Service registry for resilient mid-tier load balancing and failover.
Java
11,991
star
6

falcor

A JavaScript library for efficient data fetching
JavaScript
10,338
star
7

pollyjs

Record, Replay, and Stub HTTP Interactions.
JavaScript
9,992
star
8

SimianArmy

Tools for keeping your cloud operating in top form. Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.
Java
7,950
star
9

metaflow

🚀 Build and manage real-life data science projects with ease!
Python
7,159
star
10

fast_jsonapi

No Longer Maintained - A lightning fast JSON:API serializer for Ruby Objects.
Ruby
5,092
star
11

security_monkey

Security Monkey monitors AWS, GCP, OpenStack, and GitHub orgs for assets and their changes over time.
Python
4,338
star
12

dispatch

All of the ad-hoc things you're doing to manage incidents today, done for you, and much more!
Python
4,168
star
13

dynomite

A generic dynamo implementation for different k-v storage engines
C
4,104
star
14

vizceral

WebGL visualization for displaying animated traffic graphs
JavaScript
4,018
star
15

vmaf

Perceptual video quality assessment based on multi-method fusion.
Python
3,903
star
16

vector

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser.
JavaScript
3,588
star
17

atlas

In-memory dimensional time series database.
Scala
3,331
star
18

concurrency-limits

Java
3,036
star
19

consoleme

A Central Control Plane for AWS Permissions and Access
Python
3,022
star
20

flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Python
2,922
star
21

dgs-framework

GraphQL for Java with Spring Boot made easy.
Kotlin
2,822
star
22

bless

Repository for BLESS, an SSH Certificate Authority that runs as a AWS Lambda function
Python
2,701
star
23

archaius

Library for configuration management API
Java
2,422
star
24

asgard

[Asgard is deprecated at Netflix. We use Spinnaker ( www.spinnaker.io ).] Web interface for application deployments and cloud management in Amazon Web Services (AWS). Binary download: http://github.com/Netflix/asgard/releases
Groovy
2,235
star
25

curator

ZooKeeper client wrapper and rich ZooKeeper framework
Java
2,138
star
26

titus

1,996
star
27

EVCache

A distributed in-memory data store for the cloud
Java
1,900
star
28

lemur

Repository for the Lemur Certificate Manager
Python
1,651
star
29

genie

Distributed Big Data Orchestration Service
Java
1,635
star
30

metacat

Java
1,487
star
31

netflix.github.com

HTML
1,419
star
32

servo

Netflix Application Monitoring Library
Java
1,398
star
33

mantis

A platform that makes it easy for developers to build realtime, cost-effective, operations-focused applications
Java
1,359
star
34

vectorflow

D
1,286
star
35

hubcommander

A Slack bot for GitHub organization management -- and other things too
Python
1,254
star
36

rend

A memcached proxy that manages data chunking and L1 / L2 caches
Go
1,175
star
37

hollow

Hollow is a java library and toolset for disseminating in-memory datasets from a single producer to many consumers for high performance read-only access.
Java
1,098
star
38

repokid

AWS Least Privilege for Distributed, High-Velocity Deployment
Python
1,062
star
39

astyanax

Cassandra Java Client
Java
1,034
star
40

Priam

Co-Process for backup/recovery, Token Management, and Centralized Configuration management for Cassandra.
Java
1,024
star
41

aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Python
938
star
42

Turbine

SSE Stream Aggregator
Java
831
star
43

governator

Governator is a library of extensions and utilities that enhance Google Guice to provide: classpath scanning and automatic binding, lifecycle management, configuration to field mapping, field validation and parallelized object warmup.
Java
821
star
44

Fido

C#
816
star
45

suro

Netflix's distributed Data Pipeline
Java
783
star
46

security-bulletins

Security Bulletins that relate to Netflix Open Source
734
star
47

spectator

Client library for collecting metrics.
Java
707
star
48

Fenzo

Extensible Scheduler for Mesos Frameworks
Java
703
star
49

msl

Message Security Layer
C++
687
star
50

unleash

Professionally publish your JavaScript modules in one keystroke
JavaScript
583
star
51

denominator

Portably control DNS clouds using java or bash
Java
573
star
52

blitz4j

Logging framework for fast asynchronous logging
Java
559
star
53

edda

AWS API Read Cache
Scala
554
star
54

PigPen

Map-Reduce for Clojure
Clojure
551
star
55

netflix-graph

Compact in-memory representation of directed graph data
Java
548
star
56

karyon

The nucleus or the base container for Applications and Services built using the NetflixOSS ecosystem
Java
497
star
57

go-env

a golang library to manage environment variables
Go
494
star
58

Prana

A sidecar for your NetflixOSS based services.
Java
492
star
59

Lipstick

Pig Visualization framework
JavaScript
464
star
60

iceberg

Iceberg is a table format for large, slow-moving tabular data
Java
455
star
61

Surus

Java
453
star
62

aws-autoscaling

Tools and Documentation about using Auto Scaling
Shell
429
star
63

nf-data-explorer

The Data Explorer gives you fast, safe access to data stored in Cassandra, Dynomite, and Redis.
TypeScript
409
star
64

go-expect

an expect-like golang library to automate control of terminal or console based programs.
Go
397
star
65

Workflowable

Ruby
370
star
66

vizceral-example

Example Vizceral app
JavaScript
361
star
67

osstracker

Github organization OSS metrics collector and metrics dashboard
Scala
359
star
68

ndbench

Netflix Data Store Benchmark
HTML
358
star
69

Raigad

Co-Process for backup/recovery, Auto Deployments and Centralized Configuration management for ElasticSearch
Java
346
star
70

recipes-rss

RSS Reader Recipes that uses several of the Netflix OSS components
Java
339
star
71

aegisthus

A Bulk Data Pipeline out of Cassandra
Java
323
star
72

titus-control-plane

Titus is the Netflix Container Management Platform that manages containers and provides integrations to the infrastructure ecosystem.
Java
320
star
73

weep

The ConsoleMe CLI utility
Go
302
star
74

metaflow-ui

🎨 UI for monitoring your Metaflow executions!
TypeScript
288
star
75

dyno-queues

Dyno Queues is a recipe that provides task queues utilizing Dynomite.
Java
261
star
76

image_compression_comparison

Image Compression Comparison Framework
Python
251
star
77

falcor-express-demo

Demonstration Falcor end point for a Netflix-style Application using express
HTML
246
star
78

gradle-template

Java
244
star
79

ember-nf-graph

Composable graphing component library for EmberJS.
JavaScript
241
star
80

falcor-router-demo

A demonstration of how to build a Router for a Netflix-like application
JavaScript
236
star
81

titus-executor

Titus Executor is the container runtime/executor implementation for Titus
Go
232
star
82

photon

Photon is a Java implementation of the Interoperable Master Format (IMF) standard. IMF is a SMPTE standard whose core constraints are defined in the specification st2067-2:2013
Java
227
star
83

dial-reference

C
220
star
84

s3mper

s3mper - Consistent Listing for S3
Java
218
star
85

ReactiveLab

Experiments and prototypes with reactive application design.
Java
207
star
86

inviso

JavaScript
205
star
87

NfWebCrypto

Web Cryptography API Polyfill
C++
205
star
88

staash

A language-agnostic as well as storage-agnostic web interface for storing data into persistent storage systems, the metadata layer abstracts a lot of storage details and the pattern automation APIs take care of automating common data access patterns.
Java
204
star
89

zeno

Netflix's In-Memory Data Propagation Framework
Java
200
star
90

brutal

A multi-network asynchronous chat bot framework using twisted
Python
200
star
91

vizceral-react

JavaScript
198
star
92

pytheas

Web Resources and UI Framework
JavaScript
187
star
93

dispatch-docker

Shell
187
star
94

dyno

Java client for Dynomite
Java
184
star
95

hal-9001

Hal-9001 is a Go library that offers a number of facilities for creating a bot and its plugins.
Go
176
star
96

Nicobar

Java
171
star
97

yetch

Yet-another-fetch polyfill library. Supports AbortController/AbortSignal
JavaScript
168
star
98

lemur-docker

Docker files for the Lemur certificate orchestration tool
Python
168
star
99

Cloud-Prize

Description and terms for the Netflix Cloud Prize, which runs from March-September 2013. Read the rules, fork to your GitHub account to create a Submission, then send us your email address.
165
star
100

CassJMeter

JMeter plugin to run cassandra tests.
Java
163
star