SlideShare a Scribd company logo
1 of 42
Download to read offline
LinkedIn: Network Updates Uncovered
Ruslan Belkin
Sean Dawson
Agenda
•  Quick Tour
•  Requirements (User Experience / Infrastructure)
•  Service API
•  Internal Architecture
•  Applications (e.g., Twitter Integration, Email Delivery)
•  Measuring Performance
•  Shameless self promotion
Environment 90% Java
5% Groovy
2% Scala
2% Ruby
1% C++
Containers Tomcat, Jetty
Data Layer Oracle, MySQL, Voldemort,
Lucene, Memcache
Offline Processing Hadoop
Queuing ActiveMQ
Frameworks Spring
The Stack
The Numbers
Updates Created 35M / week
Update Emails 14M / week
Service Calls 20M / day
230 / second
Stream View
Connection View
Profile
Groups
Mobile
NUS Email digest screenshot
Email
HP without NUS
Expectations – User Experience
•  Multiple presentation views
•  Comments on updates
•  Aggregation of noisy updates
•  Partner Integration
•  Easy to add new updates to the system
•  Handles I18N and other dynamic contexts
•  Long data retention
Expectations - Infrastructure
•  Large number of connections, followers and groups
•  High request volume + Low Latency
•  Random distribution lists
•  Black/White lists, A/B testing, etc.
•  Tenured storage of update history
•  Tracking of click through rates, impressions
•  Supports real-time, aggregated data/statistics
•  Cost-effective to operate
Historical Note
•  Legacy “network update”
feature was a mixed bag of
detached services.
•  Neither consistent nor scalable
•  Tightly coupled to our Inbox
•  Migration plan
•  Introduce API, unify all
disparate service calls
•  Add event-driven activity
tracking with DB backend
•  Build out the product
•  Optimize!
(homepage circa 2007)
Network Updates Service – Overview
Service API – Data Model
<updates>	
<NCON>	
<connection>	
<id>2</id>	
<firstName>Chris</firstName>	
<lastName>Yee</lastName>	
</connection>	
</NCON>	
</updates>
Service API – Post
NetworkUpdatesNotificationService service =	
getNetworkUpdatesNotificationService();	
ProfileUpdateInfo profileUpdate = createProfileUpdate();	
Set<NetworkUpdateDestination> destinations = 	
Sets.newHashSet(	
NetworkUpdateDestinations.newMemberFeedDestination(1213)	
);	
NetworkUpdateSource source = 	
new NetworkUpdateMemberSource(1214);	
Date updateDate = getClock().currentDate();	
service.submitNetworkUpdate(source, 	
destinations,	
updateDate, 	
profileUpdate);
Service API – Retrieve
NetworkUpdatesService service = getNetworkUpdatesService();	
NetworkUpdateChannel channel =	
NetworkUpdateChannels.newMemberChannel(1213);	
UpdateQueryCriteria query = 	
createDefaultQuery().	
setRequestedTypes(NetworkUpdateType.PROFILE_UPDATE).	
setMaxNumberOfUpdates(5).	
setCutoffDate(ClockUtils.add(currentDate, -7));	
NetworkUpdateContext context =	
NetworkUpdateContextImpl.createWebappContext();	
NetworkUpdatesSummaryResult result =	
service.getNetworkUpdatesSummary(channel, 	
query, 	
context);
System at a glance
Data Collection – Challenges
•  How do we efficiently support collection in a dense social
network
•  Requirement to retrieve the feed fast
•  But – there a lot of events from a lot of members and
sources
•  And – there are multiplier effects
Option 1: Push Architecture (Inbox)
•  Each member has an inbox of notifications received from
their connections/followees
•  N writes per update (where N may be very large)
•  Very fast to read
•  Difficult to scale, but useful for private or targeted
notifications to individual users
Option 1: Push Architecture (Inbox)
Option 2: Pull Architecture
•  Each member has an “Activity Space” that contains their
actions on LinkedIn
•  1 write per update (no broadcast)
•  Requires up to N reads to collect N streams
•  Can we optimize to minimize the number of reads?
-  Not all N members have updates to satisfy the query
-  Not all updates can/need to be displayed on the screen
-  Some members are more important than others
-  Some updates are more important than others
-  Recent updates generally are more important than older ones
Pull Architecture – Writing Updates
Pull Architecture – Reading Updates
Storage Model
•  L1: Temporal
•  Oracle
•  Combined CLOB / varchar storage
•  Optimistic locking
•  1 read to update, 1 write (merge) to update
•  Size bound by # number of updates and retention policy
•  L2: Tenured
•  Accessed less frequently
•  Simple key-value storage is sufficient (each update has a unique ID)
•  Oracle/Voldemort
Member Filtering
•  Need to avoid fetching N feeds (too expensive)
•  Filter contains an in-memory summary of user activity
•  Needs to be concise but representative
•  Partitioned by member across a number of machines
•  Filter only returns false-positives, never false-negatives
•  Easy to measure heuristic; for the N members that I
selected, how many of those members actually had good
content
•  Tradeoff between size of summary and filtering power
Member Filtering
Commenting
•  Users can create discussions around updates
•  Discussion lives in our forum service
•  Denormalize a discussion summary onto the tenured
update, resolve first/last comments on retrieval
•  Full discussion can be retrieved dynamically
Twitter Sync
•  Partnership with Twitter
•  Bi-directional flow of status
updates
•  Export status updates,
import tweets
•  Users register their twitter
account
•  Authorize via OAuth
Twitter Sync – Overview
Email Delivery
•  Multiple concurrent email generating tasks
•  Each task has non-overlapping ID range generators to avoid
overlap and allow parallelization
•  Controlled by task scheduler
•  Sets delivery time
•  Controls task execution status, suspend/resume, etc
•  Caches common content so it is not re-requested
•  Tasks deliver content to Notifier, which packages the
content into an email via JSP engine
•  Email is then delivered to SMTP relays
Email Delivery
Email Delivery
What else?
Brute force methods for scaling:
•  Shard databases
•  Memcache everything
•  Parallelize everything
•  User-initiated write operations are asynchronous when
possible
Know your numbers
•  Bottlenecks are often not where you think they are
•  Profile often
•  Measure actual performance regularly
•  Monitor your systems
•  Pay attention to response time vs transaction rate
•  Expect failures
Measuring Performance
Another way of measuring performance
LinkedIn is a great place to work
Questions?
Ruslan Belkin (http://www.linkedin.com/in/rbelkin)
Sean Dawson (http://www.linkedin.com/in/seandawson)

More Related Content

What's hot

Webinar intro-to-central3.7-nov23-2016
Webinar intro-to-central3.7-nov23-2016Webinar intro-to-central3.7-nov23-2016
Webinar intro-to-central3.7-nov23-2016FileCatalyst
 
Test automation in project management
Test automation in project managementTest automation in project management
Test automation in project managementambreprasad77
 
2 networking
2 networking2 networking
2 networkingLen Bass
 
7 configuration management
7 configuration management 7 configuration management
7 configuration management Len Bass
 
A Year of “Testing” the Cloud for Development and Test
A Year of “Testing” the Cloud for Development and TestA Year of “Testing” the Cloud for Development and Test
A Year of “Testing” the Cloud for Development and TestTechWell
 
[WSO2Con EU 2017] Jump to the Next Curve with DevOps
[WSO2Con EU 2017] Jump to the Next Curve with DevOps[WSO2Con EU 2017] Jump to the Next Curve with DevOps
[WSO2Con EU 2017] Jump to the Next Curve with DevOpsWSO2
 
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...Cognizant
 
Beyond FTP & hard drives: Accelerating LAN file transfers
Beyond FTP & hard drives: Accelerating LAN file transfersBeyond FTP & hard drives: Accelerating LAN file transfers
Beyond FTP & hard drives: Accelerating LAN file transfersFileCatalyst
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud Len Bass
 
9 postproduction
9 postproduction 9 postproduction
9 postproduction Len Bass
 
Web Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodeWeb Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodePurnima Kamath
 
Cross-platform interaction
Cross-platform interactionCross-platform interaction
Cross-platform interactionOleksii Duhno
 
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...WSO2
 
Evaluating Streaming Data Solutions
Evaluating Streaming Data SolutionsEvaluating Streaming Data Solutions
Evaluating Streaming Data SolutionsStreamlio
 
Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience WardTechTalent
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introductionBoris Tveritnev
 

What's hot (20)

Webinar intro-to-central3.7-nov23-2016
Webinar intro-to-central3.7-nov23-2016Webinar intro-to-central3.7-nov23-2016
Webinar intro-to-central3.7-nov23-2016
 
Test automation in project management
Test automation in project managementTest automation in project management
Test automation in project management
 
2 networking
2 networking2 networking
2 networking
 
7 configuration management
7 configuration management 7 configuration management
7 configuration management
 
A Year of “Testing” the Cloud for Development and Test
A Year of “Testing” the Cloud for Development and TestA Year of “Testing” the Cloud for Development and Test
A Year of “Testing” the Cloud for Development and Test
 
[WSO2Con EU 2017] Jump to the Next Curve with DevOps
[WSO2Con EU 2017] Jump to the Next Curve with DevOps[WSO2Con EU 2017] Jump to the Next Curve with DevOps
[WSO2Con EU 2017] Jump to the Next Curve with DevOps
 
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...
Applying a Comprehensive, Automated Assurance Framework to Validate Cloud Rea...
 
Beyond FTP & hard drives: Accelerating LAN file transfers
Beyond FTP & hard drives: Accelerating LAN file transfersBeyond FTP & hard drives: Accelerating LAN file transfers
Beyond FTP & hard drives: Accelerating LAN file transfers
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud
 
9 postproduction
9 postproduction 9 postproduction
9 postproduction
 
Microservices
MicroservicesMicroservices
Microservices
 
Web Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodeWeb Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who Code
 
Cross-platform interaction
Cross-platform interactionCross-platform interaction
Cross-platform interaction
 
Resume
ResumeResume
Resume
 
Microservices
MicroservicesMicroservices
Microservices
 
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...
[WSO2Con EU 2017] How a Large Organization Weighted on a WSO2 Integration Pla...
 
Evaluating Streaming Data Solutions
Evaluating Streaming Data SolutionsEvaluating Streaming Data Solutions
Evaluating Streaming Data Solutions
 
Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience Latency - The King of the Mobile Experience
Latency - The King of the Mobile Experience
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introduction
 
Hp open view(hp ov)
Hp open view(hp ov)Hp open view(hp ov)
Hp open view(hp ov)
 

Similar to InfoQ QCon San Francisco 2009

Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates UncoveredRuslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates UncoveredLinkedIn
 
Building data-driven microservices
Building data-driven microservicesBuilding data-driven microservices
Building data-driven microservicesStreamlio
 
JavaOne Conference, 2008
JavaOne Conference, 2008JavaOne Conference, 2008
JavaOne Conference, 2008Sean Dawson
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxPINGXIONG3
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes Abdul Basit Munda
 
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...confluent
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackC4Media
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices M A Hossain Tonu
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareDATAVERSITY
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureEngin Yoeyen
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar KadamOnkar Kadam
 
[System design] Design a tweeter-like system
[System design] Design a tweeter-like system[System design] Design a tweeter-like system
[System design] Design a tweeter-like systemAree Oh
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDocker, Inc.
 
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)Ontico
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Markus Eisele
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Performing successful migrations to the microsoft cloud
Performing successful migrations to the microsoft cloudPerforming successful migrations to the microsoft cloud
Performing successful migrations to the microsoft cloudAndries den Haan
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library ManagementVarsha Sarkar
 
LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!manivannan57
 

Similar to InfoQ QCon San Francisco 2009 (20)

Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates UncoveredRuslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
Ruslan Belkin And Sean Dawson on LinkedIn's Network Updates Uncovered
 
Building data-driven microservices
Building data-driven microservicesBuilding data-driven microservices
Building data-driven microservices
 
JavaOne Conference, 2008
JavaOne Conference, 2008JavaOne Conference, 2008
JavaOne Conference, 2008
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
10135 b 11
10135 b 1110135 b 11
10135 b 11
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...
A Marriage of Lambda and Kappa: Supporting Iterative Development of an Event ...
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes Back
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar Kadam
 
[System design] Design a tweeter-like system
[System design] Design a tweeter-like system[System design] Design a tweeter-like system
[System design] Design a tweeter-like system
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to Microservices
 
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
Metrics are Not Enough: Monitoring Apache Kafka / Gwen Shapira (Confluent)
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Performing successful migrations to the microsoft cloud
Performing successful migrations to the microsoft cloudPerforming successful migrations to the microsoft cloud
Performing successful migrations to the microsoft cloud
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library Management
 
LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!LinkedIn - A highly scalable Architecture on Java!
LinkedIn - A highly scalable Architecture on Java!
 

Recently uploaded

Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 

Recently uploaded (20)

Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 

InfoQ QCon San Francisco 2009

  • 1. LinkedIn: Network Updates Uncovered Ruslan Belkin Sean Dawson
  • 2. Agenda •  Quick Tour •  Requirements (User Experience / Infrastructure) •  Service API •  Internal Architecture •  Applications (e.g., Twitter Integration, Email Delivery) •  Measuring Performance •  Shameless self promotion
  • 3.
  • 4. Environment 90% Java 5% Groovy 2% Scala 2% Ruby 1% C++ Containers Tomcat, Jetty Data Layer Oracle, MySQL, Voldemort, Lucene, Memcache Offline Processing Hadoop Queuing ActiveMQ Frameworks Spring The Stack
  • 5. The Numbers Updates Created 35M / week Update Emails 14M / week Service Calls 20M / day 230 / second
  • 6.
  • 12. NUS Email digest screenshot Email
  • 14. Expectations – User Experience •  Multiple presentation views •  Comments on updates •  Aggregation of noisy updates •  Partner Integration •  Easy to add new updates to the system •  Handles I18N and other dynamic contexts •  Long data retention
  • 15. Expectations - Infrastructure •  Large number of connections, followers and groups •  High request volume + Low Latency •  Random distribution lists •  Black/White lists, A/B testing, etc. •  Tenured storage of update history •  Tracking of click through rates, impressions •  Supports real-time, aggregated data/statistics •  Cost-effective to operate
  • 16. Historical Note •  Legacy “network update” feature was a mixed bag of detached services. •  Neither consistent nor scalable •  Tightly coupled to our Inbox •  Migration plan •  Introduce API, unify all disparate service calls •  Add event-driven activity tracking with DB backend •  Build out the product •  Optimize! (homepage circa 2007)
  • 17. Network Updates Service – Overview
  • 18. Service API – Data Model <updates> <NCON> <connection> <id>2</id> <firstName>Chris</firstName> <lastName>Yee</lastName> </connection> </NCON> </updates>
  • 19. Service API – Post NetworkUpdatesNotificationService service = getNetworkUpdatesNotificationService(); ProfileUpdateInfo profileUpdate = createProfileUpdate(); Set<NetworkUpdateDestination> destinations = Sets.newHashSet( NetworkUpdateDestinations.newMemberFeedDestination(1213) ); NetworkUpdateSource source = new NetworkUpdateMemberSource(1214); Date updateDate = getClock().currentDate(); service.submitNetworkUpdate(source, destinations, updateDate, profileUpdate);
  • 20. Service API – Retrieve NetworkUpdatesService service = getNetworkUpdatesService(); NetworkUpdateChannel channel = NetworkUpdateChannels.newMemberChannel(1213); UpdateQueryCriteria query = createDefaultQuery(). setRequestedTypes(NetworkUpdateType.PROFILE_UPDATE). setMaxNumberOfUpdates(5). setCutoffDate(ClockUtils.add(currentDate, -7)); NetworkUpdateContext context = NetworkUpdateContextImpl.createWebappContext(); NetworkUpdatesSummaryResult result = service.getNetworkUpdatesSummary(channel, query, context);
  • 21. System at a glance
  • 22. Data Collection – Challenges •  How do we efficiently support collection in a dense social network •  Requirement to retrieve the feed fast •  But – there a lot of events from a lot of members and sources •  And – there are multiplier effects
  • 23. Option 1: Push Architecture (Inbox) •  Each member has an inbox of notifications received from their connections/followees •  N writes per update (where N may be very large) •  Very fast to read •  Difficult to scale, but useful for private or targeted notifications to individual users
  • 24. Option 1: Push Architecture (Inbox)
  • 25. Option 2: Pull Architecture •  Each member has an “Activity Space” that contains their actions on LinkedIn •  1 write per update (no broadcast) •  Requires up to N reads to collect N streams •  Can we optimize to minimize the number of reads? -  Not all N members have updates to satisfy the query -  Not all updates can/need to be displayed on the screen -  Some members are more important than others -  Some updates are more important than others -  Recent updates generally are more important than older ones
  • 26. Pull Architecture – Writing Updates
  • 27. Pull Architecture – Reading Updates
  • 28. Storage Model •  L1: Temporal •  Oracle •  Combined CLOB / varchar storage •  Optimistic locking •  1 read to update, 1 write (merge) to update •  Size bound by # number of updates and retention policy •  L2: Tenured •  Accessed less frequently •  Simple key-value storage is sufficient (each update has a unique ID) •  Oracle/Voldemort
  • 29. Member Filtering •  Need to avoid fetching N feeds (too expensive) •  Filter contains an in-memory summary of user activity •  Needs to be concise but representative •  Partitioned by member across a number of machines •  Filter only returns false-positives, never false-negatives •  Easy to measure heuristic; for the N members that I selected, how many of those members actually had good content •  Tradeoff between size of summary and filtering power
  • 31. Commenting •  Users can create discussions around updates •  Discussion lives in our forum service •  Denormalize a discussion summary onto the tenured update, resolve first/last comments on retrieval •  Full discussion can be retrieved dynamically
  • 32. Twitter Sync •  Partnership with Twitter •  Bi-directional flow of status updates •  Export status updates, import tweets •  Users register their twitter account •  Authorize via OAuth
  • 33. Twitter Sync – Overview
  • 34. Email Delivery •  Multiple concurrent email generating tasks •  Each task has non-overlapping ID range generators to avoid overlap and allow parallelization •  Controlled by task scheduler •  Sets delivery time •  Controls task execution status, suspend/resume, etc •  Caches common content so it is not re-requested •  Tasks deliver content to Notifier, which packages the content into an email via JSP engine •  Email is then delivered to SMTP relays
  • 37. What else? Brute force methods for scaling: •  Shard databases •  Memcache everything •  Parallelize everything •  User-initiated write operations are asynchronous when possible
  • 38. Know your numbers •  Bottlenecks are often not where you think they are •  Profile often •  Measure actual performance regularly •  Monitor your systems •  Pay attention to response time vs transaction rate •  Expect failures
  • 40. Another way of measuring performance
  • 41. LinkedIn is a great place to work
  • 42. Questions? Ruslan Belkin (http://www.linkedin.com/in/rbelkin) Sean Dawson (http://www.linkedin.com/in/seandawson)