SlideShare a Scribd company logo
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-2016
FileCatalyst
 
Test automation in project management
Test automation in project managementTest automation in project management
Test automation in project management
ambreprasad77
 
2 networking
2 networking2 networking
2 networking
Len 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 Test
TechWell
 
[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
WSO2
 
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 transfers
FileCatalyst
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud
Len Bass
 
9 postproduction
9 postproduction 9 postproduction
9 postproduction
Len Bass
 
Microservices
MicroservicesMicroservices
Microservices
Prasanna Venkatesan
 
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
Purnima Kamath
 
Cross-platform interaction
Cross-platform interactionCross-platform interaction
Cross-platform interaction
Oleksii Duhno
 
Resume
ResumeResume
Microservices
MicroservicesMicroservices
Microservices
Varnish Software
 
[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 Solutions
Streamlio
 
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 introduction
Boris Tveritnev
 
Hp open view(hp ov)
Hp open view(hp ov)Hp open view(hp ov)
Hp open view(hp ov)
Ganesh Kumar Veerla
 

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 Uncovered
LinkedIn
 
Building data-driven microservices
Building data-driven microservicesBuilding data-driven microservices
Building data-driven microservices
Streamlio
 
JavaOne Conference, 2008
JavaOne Conference, 2008JavaOne Conference, 2008
JavaOne Conference, 2008
Sean 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.pptx
PINGXIONG3
 
10135 b 11
10135 b 1110135 b 11
10135 b 11
Wichien Saisorn
 
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 Back
C4Media
 
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 Middleware
DATAVERSITY
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Engin Yoeyen
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar Kadam
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
Aree Oh
 
DCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to MicroservicesDCEU 18: From Monolith to Microservices
DCEU 18: From Monolith to Microservices
Docker, 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 / JOTB19
Markus Eisele
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
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
Andries den Haan
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library Management
Varsha 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

Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
edwin408357
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
Prakhyath Rai
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
Yasser Mahgoub
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 

Recently uploaded (20)

Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 08 Doors and Windows.pdf
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 

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)