SlideShare a Scribd company logo
How to build an app with
Twitter-like throughput
on just 9 servers...
Lew Cirne, Founder & CEO - New Relic
I’m Lew Cirne
@sweetlew
What our app does


APM as a Service

In-app agent instrumentation (BCI, etc)

150,000+ app processes monitored, globally (10K customers)

Each process reports a few hundred metrics per minute

5 Languages (Ruby, Java, PHP, .NET, Python)
Each day we collect 20 billion measurements,
    from 150,000 application processes,
         for over 10,000 customers.
Each day we collect 20 billion measurements,
    from 150,000 application processes,
         for over 10,000 customers.

              All on 9 servers.
We capture “Timeslices”
                              Each o ne is about
Response Time                    250 bytes
4 hours from 11:04 to 15:04
Count: 1242                           A single tweet
Avg: 337 ms
                                       is about the
Min: 0.63 ms
Max: 95669 ms                            same size
Std Dev: 782
timeslice insertion rate: 100K/second

 >7 billion rows per day
                           Twitter peak insertion rate:
                             8K rows per second

  9 Servers handle all
  data collection
How to Build a SaaS App With Twitter-like Throughput on Just 9 Servers
Collecting is one thing...
• We provide realtime monitoring
• One minute granularity
• Data is almost always stale
• Each user/account has different data
• Page caching and other easy solutions don’t work for us.
Our most popular page...

                                    age
                            e Full P
                      Averag Time:
                         Load
                          2.4 Sec
Our most popular page...

                                    age
                            e Full P
                      Averag Time:
                         Load
                          2.4 Sec
Main App Software stack
User Interface       Data Collectors        Data Store
  & REST API                                     MySQL
                       Servlets on Jetty   Sharded by accounts
   Rails 2.3
Simplified architecture...
                                     9 Collector / Aggregator / DB’s
                                                                            Sustained 100K
                                                                            insertion rate per
                                                                            second



                             S
Customer’s environment   HTTP



                                                    24 Core Intel Nehalem
                                                    48 GB RAM
                                                    SAS attached RAID 5
                                                    No Virtualization

      (either cloud
     or datacenter)
                                                                    2 Web App Servers



                                         12 Core Intel Nehalem
                                         48 GB RAM
Even more data!

On May 17, we launched Real User Monitoring
• Using Episodes to measure browser load time of every page view

• Browser reports data to our ‘Beacon’ servers

• Monitoring >1 Billion page views per week

• Doubled our total inbound HTTP requests in a MONTH
Beacon Architecture
                                                           Response Time 0.15ms


                                                          RUM Beacons
          Real User                                                               Asynchronously
          Browsers             Billions of metrics from
                                                          Servlets Capture and
                                   across the globe       enqueue (in-memory)     aggregate and
                                                                                  forward
                                                                                  Timeslices to our
                                                                                  Collectors
  Over 1 Billion user sessions
measured for performance in first                          Currently at EC2
             month.
Challenges
• Data Purging
• Determining what to pre-aggregate
• Large Accounts
• MySQL Optimization and Tuning
• I/O performance - (virtualized to
  dedicated) ...
5 Lessons Learned
1. Keep it simple
2. Less is more
3. Trendy != Reliable
4. Plan for scale
s
                                             s ode
                                         Epi      New

                              Ja                 Relic
                                va
                                                               y
                                                             ub
5. Use the right technology          Ngin
                                         x    Je/y
                                                           R

                                                         Rails
      for a given task
See New Relic
Monitor New Relic
   at our booth

More Related Content

What's hot (20)

PPTX
Canary releases & Blue green deployment
SQUADEX
 
PDF
The Workshop: Alcanzando una observabilidad unificada con Elastic APM
Elasticsearch
 
PPTX
Measure() or die()
Tamar Duvshani Hermel
 
PDF
New Relic: Optimizing The Database SQL and NoSQL Alike
Brian Doll
 
PPTX
Vulnerability Discovery in the Cloud
DevOps.com
 
PPTX
Support Office Hour Webinar - LivePerson API
LivePerson
 
PDF
New Relic
Gene Chuang
 
PDF
Let's decipher the DevOps macedonia
Wamika Singh
 
PDF
Driving TAS Enterprise Fitness
VMware Tanzu
 
PPTX
DevOps Days Toronto: From 6 Months Waterfall to 1 hour Code Deploys
Andreas Grabner
 
PDF
The Netflix API for a global service
Katharina Probst
 
PPTX
AWS Summit - Trends in Advanced Monitoring for AWS environments
Andreas Grabner
 
PPTX
Flink Forward San Francisco 2018: Andrew Gao & Jeff Sharpe - "Finding Bad Ac...
Flink Forward
 
PPTX
AppDynamics VS New Relic – The Complete Guide
Takipi
 
PDF
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
camunda services GmbH
 
PDF
Wamika Singh, Suman Kumari - Let's decipher the DevOps macedonia - Codemotion...
Codemotion
 
PDF
Building A System That Never Stops [FutureStack16 NYC]
New Relic
 
PDF
Telling the LivePerson Technology Story at Couchbase [SF] 2013
LivePerson
 
PDF
Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015
Fastly
 
PPTX
Top 5 Java Performance Metrics, Tips & Tricks
AppDynamics
 
Canary releases & Blue green deployment
SQUADEX
 
The Workshop: Alcanzando una observabilidad unificada con Elastic APM
Elasticsearch
 
Measure() or die()
Tamar Duvshani Hermel
 
New Relic: Optimizing The Database SQL and NoSQL Alike
Brian Doll
 
Vulnerability Discovery in the Cloud
DevOps.com
 
Support Office Hour Webinar - LivePerson API
LivePerson
 
New Relic
Gene Chuang
 
Let's decipher the DevOps macedonia
Wamika Singh
 
Driving TAS Enterprise Fitness
VMware Tanzu
 
DevOps Days Toronto: From 6 Months Waterfall to 1 hour Code Deploys
Andreas Grabner
 
The Netflix API for a global service
Katharina Probst
 
AWS Summit - Trends in Advanced Monitoring for AWS environments
Andreas Grabner
 
Flink Forward San Francisco 2018: Andrew Gao & Jeff Sharpe - "Finding Bad Ac...
Flink Forward
 
AppDynamics VS New Relic – The Complete Guide
Takipi
 
Thorben Lindhauer: Live Coding: Zeebe - Camunda Day San Francisco
camunda services GmbH
 
Wamika Singh, Suman Kumari - Let's decipher the DevOps macedonia - Codemotion...
Codemotion
 
Building A System That Never Stops [FutureStack16 NYC]
New Relic
 
Telling the LivePerson Technology Story at Couchbase [SF] 2013
LivePerson
 
Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015
Fastly
 
Top 5 Java Performance Metrics, Tips & Tricks
AppDynamics
 

Viewers also liked (20)

PDF
SaaS Introduction-May2014
Nguyen Tung
 
PDF
The Sweet Science Of Virality
Upworthy
 
PDF
QA Automation course 2014 - DIO-soft, Kyiv
Sergey Kochergan
 
PDF
SaaS Business Architecture - Definition Update
Lincoln Murphy
 
PPTX
Building Highly Scalable and Flexible SaaS Solutions
Impetus Technologies
 
PDF
SaaS Business Model: A Unique Business Architecture
Lincoln Murphy
 
PPT
SaaS Business Architecture
Lincoln Murphy
 
PDF
LinkedIn Executive Playbook: 12 Steps to Become a Social Leader
LinkedIn Hong Kong
 
PDF
E-commerce Berlin Expo - Brand24 - Mike Sadowski
E-Commerce Berlin EXPO
 
PDF
Doing customer development (and stop wasting your time)
Hans van Gent
 
PPT
An introduction and overview to Software as a Service
InTechnology Managed Services (part of Redcentric)
 
PDF
Scaling Pinterest
C4Media
 
PPTX
Architecting SaaS: Doing It Right the First Time
Serhiy (Serge) Haziyev
 
PDF
Key Takeaways from The Sales Development Playbook, part 1 and part 2
WhereDat
 
PPTX
Chapter 10 Anomaly Detection
Khalid Elshafie
 
PDF
Adobe Summit - Data Storytelling
Chris Haleua
 
PDF
Bombora - Intent data - The secret to smarter sales prospecting? - April 2016
Bombora
 
PPTX
Software As A Service Presentation
al95iii
 
PDF
Top 10 Tech Jobs for 2016
InterQuest Group
 
PDF
How to Create a Sales Pitch Deck that Gets the Job Done
24Slides
 
SaaS Introduction-May2014
Nguyen Tung
 
The Sweet Science Of Virality
Upworthy
 
QA Automation course 2014 - DIO-soft, Kyiv
Sergey Kochergan
 
SaaS Business Architecture - Definition Update
Lincoln Murphy
 
Building Highly Scalable and Flexible SaaS Solutions
Impetus Technologies
 
SaaS Business Model: A Unique Business Architecture
Lincoln Murphy
 
SaaS Business Architecture
Lincoln Murphy
 
LinkedIn Executive Playbook: 12 Steps to Become a Social Leader
LinkedIn Hong Kong
 
E-commerce Berlin Expo - Brand24 - Mike Sadowski
E-Commerce Berlin EXPO
 
Doing customer development (and stop wasting your time)
Hans van Gent
 
An introduction and overview to Software as a Service
InTechnology Managed Services (part of Redcentric)
 
Scaling Pinterest
C4Media
 
Architecting SaaS: Doing It Right the First Time
Serhiy (Serge) Haziyev
 
Key Takeaways from The Sales Development Playbook, part 1 and part 2
WhereDat
 
Chapter 10 Anomaly Detection
Khalid Elshafie
 
Adobe Summit - Data Storytelling
Chris Haleua
 
Bombora - Intent data - The secret to smarter sales prospecting? - April 2016
Bombora
 
Software As A Service Presentation
al95iii
 
Top 10 Tech Jobs for 2016
InterQuest Group
 
How to Create a Sales Pitch Deck that Gets the Job Done
24Slides
 
Ad

Similar to How to Build a SaaS App With Twitter-like Throughput on Just 9 Servers (20)

KEY
The data layer
Ian Holsman
 
PPTX
Clustrix Database Percona Ruby on Rails benchmark
Clustrix
 
PDF
Building and deploying large scale real time news system with my sql and dist...
Tao Cheng
 
PDF
Your backend architecture is what matters slideshare
Colin Charles
 
PDF
Tweaking performance on high-load projects
Dmitriy Dumanskiy
 
PDF
Couche Base par Tugdual Grall
Normandy JUG
 
PDF
IFRA Local Media Presentation: My Own City
Lassi Kurkijärvi
 
PPTX
Restfs
Manfred Furuholmen
 
PDF
Choosing Your Windows Azure Platform Strategy
drmarcustillett
 
PDF
Nuxeo in 2011: A year in review and a preview of what's next!
Nuxeo
 
PDF
2go ScaleConf 2012
2go
 
PDF
Big datadc skyfall_preso_v2
abramsm
 
PDF
How NOSQL Paid off for Telenor
Sebastian Verheughe
 
PDF
20080528dublinpt1
Jeff Hammerbacher
 
PDF
PyCon 2011 Scaling Disqus
zeeg
 
PDF
Google Back To Front: From Gears to App Engine and Beyond
dion
 
PDF
PlayStation and Lucene - Indexing 1M documents per second: Presented by Alexa...
Lucidworks
 
PDF
Big Data Israel Meetup : Couchbase and Big Data
Tugdual Grall
 
PPTX
Couchbase - orbitz use case - nyc meetup
sharonyb
 
PDF
What drives Innovation? Innovations And Technological Solutions for the Distr...
Stefano Fago
 
The data layer
Ian Holsman
 
Clustrix Database Percona Ruby on Rails benchmark
Clustrix
 
Building and deploying large scale real time news system with my sql and dist...
Tao Cheng
 
Your backend architecture is what matters slideshare
Colin Charles
 
Tweaking performance on high-load projects
Dmitriy Dumanskiy
 
Couche Base par Tugdual Grall
Normandy JUG
 
IFRA Local Media Presentation: My Own City
Lassi Kurkijärvi
 
Choosing Your Windows Azure Platform Strategy
drmarcustillett
 
Nuxeo in 2011: A year in review and a preview of what's next!
Nuxeo
 
2go ScaleConf 2012
2go
 
Big datadc skyfall_preso_v2
abramsm
 
How NOSQL Paid off for Telenor
Sebastian Verheughe
 
20080528dublinpt1
Jeff Hammerbacher
 
PyCon 2011 Scaling Disqus
zeeg
 
Google Back To Front: From Gears to App Engine and Beyond
dion
 
PlayStation and Lucene - Indexing 1M documents per second: Presented by Alexa...
Lucidworks
 
Big Data Israel Meetup : Couchbase and Big Data
Tugdual Grall
 
Couchbase - orbitz use case - nyc meetup
sharonyb
 
What drives Innovation? Innovations And Technological Solutions for the Distr...
Stefano Fago
 
Ad

More from New Relic (20)

PPTX
7 Tips & Tricks to Having Happy Customers at Scale
New Relic
 
PPTX
7 Tips & Tricks to Having Happy Customers at Scale
New Relic
 
PDF
New Relic University at Future Stack Tokyo 2019
New Relic
 
PDF
FutureStack Tokyo 19 -[事例講演]株式会社リクルートライフスタイル:年間9300万件以上のサロン予約を支えるホットペッパービューティ...
New Relic
 
PDF
FutureStack Tokyo 19 -[New Relic テクニカル講演]モニタリングと可視化がデジタルトランスフォーメーションを救う! - サ...
New Relic
 
PDF
FutureStack Tokyo 19 -[特別講演]システム開発によろこびと驚きの連鎖を
New Relic
 
PDF
FutureStack Tokyo 19 -[パートナー講演]アマゾン ウェブ サービス ジャパン株式会社: New Relicを活用したAWSへのアプリ...
New Relic
 
PDF
FutureStack Tokyo 19_インサイトとデータを組織の力にする_株式会社ドワンゴ 池田 明啓 氏
New Relic
 
PPTX
Three Monitoring Mistakes and How to Avoid Them
New Relic
 
PPTX
Intro to Multidimensional Kubernetes Monitoring
New Relic
 
PDF
FS18 Chicago Keynote
New Relic
 
PDF
SRE-iously
New Relic
 
PDF
10 Things You Can Do With New Relic - Number 9 Will Shock You
New Relic
 
PDF
Ground Rules for Code Reviews
New Relic
 
PPTX
Understanding Microservice Latency for DevOps Teams: An Introduction to New R...
New Relic
 
PPTX
Monitor all your Kubernetes and EKS stack with New Relic
New Relic
 
PPTX
Host for the Most: Cloud Cost Optimization
New Relic
 
PPTX
New Relic Infrastructure in the Real World: AWS
New Relic
 
PPTX
Best Practices for Measuring your Code Pipeline
New Relic
 
PPTX
Top Three Mistakes People Make with Monitoring
New Relic
 
7 Tips & Tricks to Having Happy Customers at Scale
New Relic
 
7 Tips & Tricks to Having Happy Customers at Scale
New Relic
 
New Relic University at Future Stack Tokyo 2019
New Relic
 
FutureStack Tokyo 19 -[事例講演]株式会社リクルートライフスタイル:年間9300万件以上のサロン予約を支えるホットペッパービューティ...
New Relic
 
FutureStack Tokyo 19 -[New Relic テクニカル講演]モニタリングと可視化がデジタルトランスフォーメーションを救う! - サ...
New Relic
 
FutureStack Tokyo 19 -[特別講演]システム開発によろこびと驚きの連鎖を
New Relic
 
FutureStack Tokyo 19 -[パートナー講演]アマゾン ウェブ サービス ジャパン株式会社: New Relicを活用したAWSへのアプリ...
New Relic
 
FutureStack Tokyo 19_インサイトとデータを組織の力にする_株式会社ドワンゴ 池田 明啓 氏
New Relic
 
Three Monitoring Mistakes and How to Avoid Them
New Relic
 
Intro to Multidimensional Kubernetes Monitoring
New Relic
 
FS18 Chicago Keynote
New Relic
 
SRE-iously
New Relic
 
10 Things You Can Do With New Relic - Number 9 Will Shock You
New Relic
 
Ground Rules for Code Reviews
New Relic
 
Understanding Microservice Latency for DevOps Teams: An Introduction to New R...
New Relic
 
Monitor all your Kubernetes and EKS stack with New Relic
New Relic
 
Host for the Most: Cloud Cost Optimization
New Relic
 
New Relic Infrastructure in the Real World: AWS
New Relic
 
Best Practices for Measuring your Code Pipeline
New Relic
 
Top Three Mistakes People Make with Monitoring
New Relic
 

Recently uploaded (20)

PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 

How to Build a SaaS App With Twitter-like Throughput on Just 9 Servers

  • 1. How to build an app with Twitter-like throughput on just 9 servers... Lew Cirne, Founder & CEO - New Relic
  • 3. What our app does APM as a Service In-app agent instrumentation (BCI, etc) 150,000+ app processes monitored, globally (10K customers) Each process reports a few hundred metrics per minute 5 Languages (Ruby, Java, PHP, .NET, Python)
  • 4. Each day we collect 20 billion measurements, from 150,000 application processes, for over 10,000 customers.
  • 5. Each day we collect 20 billion measurements, from 150,000 application processes, for over 10,000 customers. All on 9 servers.
  • 6. We capture “Timeslices” Each o ne is about Response Time 250 bytes 4 hours from 11:04 to 15:04 Count: 1242 A single tweet Avg: 337 ms is about the Min: 0.63 ms Max: 95669 ms same size Std Dev: 782
  • 7. timeslice insertion rate: 100K/second >7 billion rows per day Twitter peak insertion rate: 8K rows per second 9 Servers handle all data collection
  • 9. Collecting is one thing... • We provide realtime monitoring • One minute granularity • Data is almost always stale • Each user/account has different data • Page caching and other easy solutions don’t work for us.
  • 10. Our most popular page... age e Full P Averag Time: Load 2.4 Sec
  • 11. Our most popular page... age e Full P Averag Time: Load 2.4 Sec
  • 12. Main App Software stack User Interface Data Collectors Data Store & REST API MySQL Servlets on Jetty Sharded by accounts Rails 2.3
  • 13. Simplified architecture... 9 Collector / Aggregator / DB’s Sustained 100K insertion rate per second S Customer’s environment HTTP 24 Core Intel Nehalem 48 GB RAM SAS attached RAID 5 No Virtualization (either cloud or datacenter) 2 Web App Servers 12 Core Intel Nehalem 48 GB RAM
  • 14. Even more data! On May 17, we launched Real User Monitoring • Using Episodes to measure browser load time of every page view • Browser reports data to our ‘Beacon’ servers • Monitoring >1 Billion page views per week • Doubled our total inbound HTTP requests in a MONTH
  • 15. Beacon Architecture Response Time 0.15ms RUM Beacons Real User Asynchronously Browsers Billions of metrics from Servlets Capture and across the globe enqueue (in-memory) aggregate and forward Timeslices to our Collectors Over 1 Billion user sessions measured for performance in first Currently at EC2 month.
  • 16. Challenges • Data Purging • Determining what to pre-aggregate • Large Accounts • MySQL Optimization and Tuning • I/O performance - (virtualized to dedicated) ...
  • 18. 1. Keep it simple
  • 19. 2. Less is more
  • 20. 3. Trendy != Reliable
  • 21. 4. Plan for scale
  • 22. s s ode Epi New
 Ja Relic va y ub 5. Use the right technology Ngin x Je/y R Rails for a given task
  • 23. See New Relic Monitor New Relic at our booth

Editor's Notes