200 likes | 295 Views
Quick Deploy A distributed systems approach to developer productivity. Adam Cataldo Tuesday, January 24, 2012. v. Outline. LinkedIn architecture Quick Deploy Cool technical details. LinkedIn. Largest professional networking site 135M+ members 14 languages
E N D
Quick DeployA distributed systems approach to developer productivity Adam Cataldo Tuesday, January 24, 2012 v
Outline • LinkedIn architecture • Quick Deploy • Cool technical details
LinkedIn • Largest professional networking site • 135M+ members • 14 languages • 200+ countries and territories • Estimated 4B+ people searches per year
LinkedIn stack at 20,000 feet • Online system for serving up data to clients • Profile pages, company pages, LinkedIn groups, etc. • Key metric: Latency • Offline system for creating insight from data • People you may know, contact degree of separation, search indexing, etc. • Key metric: Throughput
Offline data processing Voldemort Hadoop Reduce Map Map Reduce Map Reduce Map
Online web application Data Service Client Presentation Business Logic Datastore
Growing Pains for the Online System As time has gone by: • We’ve added new services to support new features • We’ve added new services to make our site faster and more available • Our engineering productivity dropped
Quick Deploy • Developers only locally deploy the services they actually modify • Every service your service depends on is available in some data center • This makes development move much faster! Angelika Clayton
Dev Box Early Integration Datacenter Shared Frontend Browser QD Proxy Local Mid Tier Shared Data Service DB
In Detail EI Frontend EI Data Service Dev-local Mid Tier Proxy Browser QD Cookie QD Cookie QD IC QD IC QD IC QD IC
Proxy Behavior Read identifier from cookie Has QD cookie? Proxy receives request yes no Read identifier from IC Is service local? Route to developer’s local service yes no Route to service in EI
QD Cookie and Invocation Context • A developer creates an identifier key, and registers his local services with the proxy • He identifies himself by adding his key to a cookie from his browser • When a front end gets a request with a QD cookie, it puts the key in the invocation context • Services pass the invocation context with every outbound request
Shared data Huh? Change Alfred’s language to Japanese きんぎょ Oracle MySQL Voldemort Memcached
ActiveMQ Dev Box Early Integration Datacenter Consumer Producer Produces message Consumes message Consumer Queue Never sees message
Timers Dev Box Early Integration Datacenter RPC Target Schedules time-triggered RPC call Service Gets RPC call after timer triggers Service with Timer RPC Target Never gets RPC call
Proxy in detail > 10,000 QPS! Admin Console Python/Flask Web App Proxy Apache Traffic Server Proxy Apache Traffic Server Routing Profiles Apache Zookeeper Proxy Apache Traffic Server
Why Apache Zookeeper • Distributed file system for small files • Basically, a key-value data store, where the keys are file names • Clients can listen for file change and directory change events • Great for storing data • Also, great publish/subscribe system
Dynamic Discovery Dev Box Early Integration Datacenter QD Proxy Browser Shared Frontend Local Mid Tier Shared Data Service DB
Conclusion • The LinkedIn architecture scales well in production • Quick deploy makes the architecture scale for developers • 20% productivity gain across the engineering organization
Thanks Rob Loh JimDumont Swee Lim Steve Ihde