R2D2: Linkedin's Request/Response Infrastructure

Operations and Culture
Location: King's Suite - Balmoral Level: Intermediate
Average rating: **...
(2.22, 9 ratings)
Slides:   1-PPT 

In this talk we will introduce R2D2, which stands for Request-Response/Dynamic Discovery. R2D2 is used mainly at LinkedIn to allow one service to communicate to another. Architecturally, we split R2D2 into 2 parts: R2 and D2. The R2 layer handles shoveling the bytes from client to service while at the same keeping track of important statistics. The D2 layer handles discovering a service and load balancing requests made to that service. We also include the assumption that many machine-nodes may join and leave a cluster at any time. So R2D2 must be able to keep track which machine-node can serve which service.

R2D2 implements client side load balancing to regulate the distribution of service calls and will use the latency and error rate of the response to distribute the traffic. In addition to shifting traffic away from “bad” nodes, R2D2 is also capable of dropping requests if it determines that the cluster as a whole is going “bad” to help protect the service from being overloaded and client from excessive latency and resource consumption.

R2D2 also supports sticky routing and partitioning within a cluster. Sticky routing provides best effort affinity. Partitioning guarantees predictable routing of request with a given key to the same partition which itself may consist of multiple nodes. In addition, different discovery domains allow a set of cooperating services to be isolated (from discovery perspective) from other similar set of services. We use discovery domains to dedicate resources to different classes of traffic.

We will talk about the common use cases of R2D2 at Linkedin as well as the uncommon use cases. One of these use cases is cross data center routing that allows a service in data center A to talk to a service in data center B. For availability, we show how this can be done without depending on global state such as a global zookeeper cluster.

Photo of Oby Sumampouw

Oby Sumampouw

LinkedIn

Oby is a software engineer at LinkedIn. He has worked on various linkedin products ranging from LinkedIn News to LinkedIn Sharing. He is currently working on improving R2D2 and rest.li stack at LinkedIn.
Prior to LinkedIn, Oby worked on Fusion Application at Oracle. Oby holds a master of Computer Science from Stanford University and bachelors of Biochemistry from University of Washington.

Comments on this page are now closed.

Comments

Picture of Oby Sumampouw
Oby Sumampouw
15/10/2013 21:35 BST

We will go over R2D2 from a pretty high level. We will also go through some examples. If there’s anything specific that we should focus, please suggest them here.

Sponsors

Sponsorship Opportunities

For exhibition and sponsorship opportunities at Velocity conference, contact Gloria Lombardo at +1 (203) 381-9245 or glombardo@oreilly.com

Media Partner Opportunities

For information on trade opportunities with O'Reilly conferences contact Jaimey Walking Bear at mediapartners
@oreilly.com

Contact Us

View a complete list of Velocity Europe 2013 contacts