SlideShare a Scribd company logo
1 of 36
Download to read offline
Message Queues at salesforce.com
The subtitle goes here
Vijay Devadhar
Developer
Salesforce.com
Safe Harbor
 Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

 This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if
 any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-
 looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of
 product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of
 management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments
 and customer contracts or use of our services.

 The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
 service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth,
 interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated
 with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain,
 and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling
 non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the
 financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This
 documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

 Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may
 not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently
 available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Vijay Devadhar
Developer
Message Queues – what are they?
   Asynchronous job queue infrastructure in salesforce.com server



   Engine behind
     • Dashboards
     • Reports,
     • Batch/Async Apex
     • Bulk API
     • and many more…
Message Queues – what are our volumes?
   Averages about 60 million messages a day



   Biggest instances account for 10 million messages a day



   95 percentile for dequeue latency is 10 minutes
Message Queues – session description
   Discuss scaling techniques used to

     • Manage capacity


     • Resource allocation



   and lessons learned..
Visit with Princess Aurora
   Average wait time – 90 mins



   Average time with princess – 120 seconds



   What you remember the most after a year? The long……… wait. 
Visit with Goofy

   Average wait time – none




   Average time with goofy – 120 seconds or until you get bored
Meanwhile…..
Characters are not Created Equal
If Only We Hired More Princess Aurora
What can we do better?
   Fire Goofy(s)



   Hire more Princesses



   Convert Goofy to Princess and vice-versa when needed
Swap Goofy for Princess Aurora
Message Queues Amusement Park
   300 + rides and characters



   Traffic which ebbs and flows with time of day, day of the week etc.,



   Plenty, but finite set of resources available
Goal
   Reduce wait times



   Fairly allocate resources



   Adapt to varying traffic patterns
Solution
   A large Shared thread pool – No ride specific silos



   Round robin the process of picking work



   If world wants Dashboards, do Dashboards
Message Queue Real Time Latencies
   Unlike Disneyland, each job takes variable amount of time



   Wait time prediction is not accurate at the tail of the queue



   We report real time and act on them if needed
Elastic Thread Pools
   Can grow from initial size



   This allows growth as traffic demands



   Wait times feedback to thread pool grow, shrink decisions
Let’s Do a Puzzle
   A man has
     • One Sheep
     • One Tiger
     • One bundle of Grass
     • One small boat



   and a big River to cross…
Similar Puzzle with Messages
   Forecasting has
      • Several sales reps whose forecasts need update
      • Forecast update for sales rep should also update VP of sales
      • Multiple sales reps for same VP



   and a big sales projection to put out ….
Solution
   Browse and Cache



   Pick up work on which you can obtain mutex lock



   Jump ahead if needed
And in Real World..
   Cache capacity is tuned to typical traffic pattern



   At times cache can fill up



   Messages may be escorted to the back of the queue
Bread Lines Vs. Turkey Lines
      Same set of ovens baking both


      Bread is the basic need, Turkey when ovens are free


      If bread lines build up, stop cooking turkey


      If no one wants bread, just give all ovens to cooking turkey
User-facing vs Background jobs
      Same set of servers for both


      Users need fast response; Background can wait


      If user requests pile up, stop processing background


      If no user requests, just process background jobs
But how do you make Turkeys stop?
   Traffic lights


   Measure key resources


   When resource usage crosses threshold, slow down on background


   Sensitive to CPU, Memory, I/O, connection usage
Lessons in Real World
   Traffic types vary, traffic volumes vary


   Handlers misbehave, components have bugs


   Distributed systems scale very well, not if you need mutex.


   Real time alerting, trending, traffic isolation, troubleshooting are
    necessary
Message Queues at salesforce.com
Message Queues at salesforce.com

More Related Content

What's hot

HFM Member List Tips
HFM Member List TipsHFM Member List Tips
HFM Member List Tipsaa026593
 
CDMP preparation workshop EDW2016
CDMP preparation workshop EDW2016CDMP preparation workshop EDW2016
CDMP preparation workshop EDW2016Christopher Bradley
 
Guide to Data Monetization
Guide to Data MonetizationGuide to Data Monetization
Guide to Data MonetizationMike Davie
 
Balancing data democratization with comprehensive information governance: bui...
Balancing data democratization with comprehensive information governance: bui...Balancing data democratization with comprehensive information governance: bui...
Balancing data democratization with comprehensive information governance: bui...DataWorks Summit
 
Power BI Made Simple
Power BI Made SimplePower BI Made Simple
Power BI Made SimpleJames Serra
 
Introduction to data migration
Introduction to data migrationIntroduction to data migration
Introduction to data migrationHubert Manduku
 
SAP University - Financial Accounting
SAP University - Financial AccountingSAP University - Financial Accounting
SAP University - Financial Accountingssuserc6927d
 
Tableau PPT.ppt
Tableau PPT.pptTableau PPT.ppt
Tableau PPT.ppteMMAY3
 
Customer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases EffectivelyCustomer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases EffectivelyInternetCreations
 
Decoding SAP's BI Analytics SAP Statement of Direction
Decoding SAP's BI Analytics SAP Statement of Direction Decoding SAP's BI Analytics SAP Statement of Direction
Decoding SAP's BI Analytics SAP Statement of Direction Visual_BI
 
Data Migration Steps PowerPoint Presentation Slides
Data Migration Steps PowerPoint Presentation Slides Data Migration Steps PowerPoint Presentation Slides
Data Migration Steps PowerPoint Presentation Slides SlideTeam
 
Power of Einstein Analytics - Salesforce + Mulesoft
Power of Einstein Analytics - Salesforce + Mulesoft Power of Einstein Analytics - Salesforce + Mulesoft
Power of Einstein Analytics - Salesforce + Mulesoft Akshata Sawant
 
Sap crm ui cookbook
Sap crm ui  cookbookSap crm ui  cookbook
Sap crm ui cookbookFAISALSPARTA
 
Big Data & Analytics Architecture
Big Data & Analytics ArchitectureBig Data & Analytics Architecture
Big Data & Analytics ArchitectureArvind Sathi
 
Change Data Capture
Change Data CaptureChange Data Capture
Change Data Capturearnoud_otte
 
Read Access Logging (RAL) for SAP NetWeaver Overview
Read Access Logging (RAL) for SAP NetWeaver OverviewRead Access Logging (RAL) for SAP NetWeaver Overview
Read Access Logging (RAL) for SAP NetWeaver OverviewSAP Technology
 

What's hot (20)

Data Governance Intro.pptx
Data Governance Intro.pptxData Governance Intro.pptx
Data Governance Intro.pptx
 
HFM Member List Tips
HFM Member List TipsHFM Member List Tips
HFM Member List Tips
 
CDMP preparation workshop EDW2016
CDMP preparation workshop EDW2016CDMP preparation workshop EDW2016
CDMP preparation workshop EDW2016
 
Guide to Data Monetization
Guide to Data MonetizationGuide to Data Monetization
Guide to Data Monetization
 
Balancing data democratization with comprehensive information governance: bui...
Balancing data democratization with comprehensive information governance: bui...Balancing data democratization with comprehensive information governance: bui...
Balancing data democratization with comprehensive information governance: bui...
 
Power BI Made Simple
Power BI Made SimplePower BI Made Simple
Power BI Made Simple
 
Master Data Management.pptx
Master Data Management.pptxMaster Data Management.pptx
Master Data Management.pptx
 
Introduction to data migration
Introduction to data migrationIntroduction to data migration
Introduction to data migration
 
SAP University - Financial Accounting
SAP University - Financial AccountingSAP University - Financial Accounting
SAP University - Financial Accounting
 
Tableau PPT.ppt
Tableau PPT.pptTableau PPT.ppt
Tableau PPT.ppt
 
Sap co bbp
Sap co bbpSap co bbp
Sap co bbp
 
Customer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases EffectivelyCustomer Service in Salesforce: Managing Cases Effectively
Customer Service in Salesforce: Managing Cases Effectively
 
Decoding SAP's BI Analytics SAP Statement of Direction
Decoding SAP's BI Analytics SAP Statement of Direction Decoding SAP's BI Analytics SAP Statement of Direction
Decoding SAP's BI Analytics SAP Statement of Direction
 
Data Migration Steps PowerPoint Presentation Slides
Data Migration Steps PowerPoint Presentation Slides Data Migration Steps PowerPoint Presentation Slides
Data Migration Steps PowerPoint Presentation Slides
 
Power of Einstein Analytics - Salesforce + Mulesoft
Power of Einstein Analytics - Salesforce + Mulesoft Power of Einstein Analytics - Salesforce + Mulesoft
Power of Einstein Analytics - Salesforce + Mulesoft
 
Sap crm ui cookbook
Sap crm ui  cookbookSap crm ui  cookbook
Sap crm ui cookbook
 
Big Data & Analytics Architecture
Big Data & Analytics ArchitectureBig Data & Analytics Architecture
Big Data & Analytics Architecture
 
Change Data Capture
Change Data CaptureChange Data Capture
Change Data Capture
 
Read Access Logging (RAL) for SAP NetWeaver Overview
Read Access Logging (RAL) for SAP NetWeaver OverviewRead Access Logging (RAL) for SAP NetWeaver Overview
Read Access Logging (RAL) for SAP NetWeaver Overview
 
GST India
GST IndiaGST India
GST India
 

Viewers also liked

Force.com Integration Using Web Services With .NET & PHP Apps
Force.com Integration Using Web Services With .NET & PHP AppsForce.com Integration Using Web Services With .NET & PHP Apps
Force.com Integration Using Web Services With .NET & PHP AppsSalesforce Developers
 
App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...Eric D. Schabell
 
Access External Data in Real-time with Lightning Connect
Access External Data in Real-time with Lightning ConnectAccess External Data in Real-time with Lightning Connect
Access External Data in Real-time with Lightning ConnectSalesforce Developers
 
Setting up Kubernetes with tectonic
Setting up Kubernetes with tectonicSetting up Kubernetes with tectonic
Setting up Kubernetes with tectonicVishal Biyani
 

Viewers also liked (6)

最小公倍数の求め方
最小公倍数の求め方最小公倍数の求め方
最小公倍数の求め方
 
Force.com Integration Using Web Services With .NET & PHP Apps
Force.com Integration Using Web Services With .NET & PHP AppsForce.com Integration Using Web Services With .NET & PHP Apps
Force.com Integration Using Web Services With .NET & PHP Apps
 
App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...App Dev in the Cloud: Not my circus, not my monkeys...
App Dev in the Cloud: Not my circus, not my monkeys...
 
Access External Data in Real-time with Lightning Connect
Access External Data in Real-time with Lightning ConnectAccess External Data in Real-time with Lightning Connect
Access External Data in Real-time with Lightning Connect
 
Setting up Kubernetes with tectonic
Setting up Kubernetes with tectonicSetting up Kubernetes with tectonic
Setting up Kubernetes with tectonic
 
Environment Hub
Environment Hub Environment Hub
Environment Hub
 

Similar to Message Queues at salesforce.com

The Evolution of the Enterprise Operating Model - Ryan Lockard
The Evolution of the Enterprise Operating Model - Ryan LockardThe Evolution of the Enterprise Operating Model - Ryan Lockard
The Evolution of the Enterprise Operating Model - Ryan Lockardagilemaine
 
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introDavid Scruggs
 
Designing Enterprise Applications for Speed and Agility
Designing Enterprise Applications for Speed and AgilityDesigning Enterprise Applications for Speed and Agility
Designing Enterprise Applications for Speed and AgilityKenandy
 
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...Marc Lester
 
Supercharge Your Applications
Supercharge Your ApplicationsSupercharge Your Applications
Supercharge Your ApplicationsSean Boiling
 
Designing custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comDesigning custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comSteven Herod
 
Forecasting Accurately with Salesforce Forecasting
Forecasting Accurately with Salesforce ForecastingForecasting Accurately with Salesforce Forecasting
Forecasting Accurately with Salesforce ForecastingDreamforce
 
Site reliability engineering
Site reliability engineeringSite reliability engineering
Site reliability engineeringJason Loeffler
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comSalesforce Developers
 
Architecting in the Cloud: Choosing the Right Technologies for your Solution
Architecting in the Cloud: Choosing the Right Technologies for your SolutionArchitecting in the Cloud: Choosing the Right Technologies for your Solution
Architecting in the Cloud: Choosing the Right Technologies for your SolutionJeff Douglas
 
Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityAll Things Open
 
Before After PowerPoint Presentation Slides
Before After PowerPoint Presentation SlidesBefore After PowerPoint Presentation Slides
Before After PowerPoint Presentation SlidesSlideTeam
 
Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityAll Things Open
 
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...eZ Systems
 
Hass howard scrum master capabilities
Hass howard scrum master capabilitiesHass howard scrum master capabilities
Hass howard scrum master capabilitiesHass Howard
 
Df14 so many features dreamforce ’14
Df14 so many features dreamforce ’14Df14 so many features dreamforce ’14
Df14 so many features dreamforce ’14Mudit Agarwal
 
HSI's Cloud-Hosted Foglight IT Monitoring & APM
HSI's Cloud-Hosted Foglight IT Monitoring & APMHSI's Cloud-Hosted Foglight IT Monitoring & APM
HSI's Cloud-Hosted Foglight IT Monitoring & APMKent Cartwright
 
IxDA09 - Postcard Patterns
IxDA09 - Postcard PatternsIxDA09 - Postcard Patterns
IxDA09 - Postcard PatternsIan Swinson
 

Similar to Message Queues at salesforce.com (20)

The Evolution of the Enterprise Operating Model - Ryan Lockard
The Evolution of the Enterprise Operating Model - Ryan LockardThe Evolution of the Enterprise Operating Model - Ryan Lockard
The Evolution of the Enterprise Operating Model - Ryan Lockard
 
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
 
Designing Enterprise Applications for Speed and Agility
Designing Enterprise Applications for Speed and AgilityDesigning Enterprise Applications for Speed and Agility
Designing Enterprise Applications for Speed and Agility
 
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...
Jax, FL Admin Group Presents: Accounting Seed Overview & Pardot vs Marketing ...
 
Supercharge Your Applications
Supercharge Your ApplicationsSupercharge Your Applications
Supercharge Your Applications
 
Designing custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comDesigning custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.com
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Forecasting Accurately with Salesforce Forecasting
Forecasting Accurately with Salesforce ForecastingForecasting Accurately with Salesforce Forecasting
Forecasting Accurately with Salesforce Forecasting
 
Site reliability engineering
Site reliability engineeringSite reliability engineering
Site reliability engineering
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.com
 
Architecting in the Cloud: Choosing the Right Technologies for your Solution
Architecting in the Cloud: Choosing the Right Technologies for your SolutionArchitecting in the Cloud: Choosing the Right Technologies for your Solution
Architecting in the Cloud: Choosing the Right Technologies for your Solution
 
Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of Observability
 
Before After PowerPoint Presentation Slides
Before After PowerPoint Presentation SlidesBefore After PowerPoint Presentation Slides
Before After PowerPoint Presentation Slides
 
Building Reliability - The Realities of Observability
Building Reliability - The Realities of ObservabilityBuilding Reliability - The Realities of Observability
Building Reliability - The Realities of Observability
 
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...
The Business Value of PaaS Automation - Kieron Sambrook-Smith - Presentation ...
 
Hass howard scrum master capabilities
Hass howard scrum master capabilitiesHass howard scrum master capabilities
Hass howard scrum master capabilities
 
Df14 so many features dreamforce ’14
Df14 so many features dreamforce ’14Df14 so many features dreamforce ’14
Df14 so many features dreamforce ’14
 
HSI's Cloud-Hosted Foglight IT Monitoring & APM
HSI's Cloud-Hosted Foglight IT Monitoring & APMHSI's Cloud-Hosted Foglight IT Monitoring & APM
HSI's Cloud-Hosted Foglight IT Monitoring & APM
 
IxDA09 - Postcard Patterns
IxDA09 - Postcard PatternsIxDA09 - Postcard Patterns
IxDA09 - Postcard Patterns
 

More from Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

More from Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Message Queues at salesforce.com

  • 1. Message Queues at salesforce.com The subtitle goes here Vijay Devadhar Developer Salesforce.com
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward- looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 4. Message Queues – what are they?  Asynchronous job queue infrastructure in salesforce.com server  Engine behind • Dashboards • Reports, • Batch/Async Apex • Bulk API • and many more…
  • 5. Message Queues – what are our volumes?  Averages about 60 million messages a day  Biggest instances account for 10 million messages a day  95 percentile for dequeue latency is 10 minutes
  • 6. Message Queues – session description  Discuss scaling techniques used to • Manage capacity • Resource allocation  and lessons learned..
  • 7.
  • 8.
  • 9. Visit with Princess Aurora  Average wait time – 90 mins  Average time with princess – 120 seconds  What you remember the most after a year? The long……… wait. 
  • 10.
  • 11. Visit with Goofy  Average wait time – none  Average time with goofy – 120 seconds or until you get bored
  • 13. Characters are not Created Equal
  • 14. If Only We Hired More Princess Aurora
  • 15. What can we do better?  Fire Goofy(s)  Hire more Princesses  Convert Goofy to Princess and vice-versa when needed
  • 16. Swap Goofy for Princess Aurora
  • 17.
  • 18. Message Queues Amusement Park  300 + rides and characters  Traffic which ebbs and flows with time of day, day of the week etc.,  Plenty, but finite set of resources available
  • 19. Goal  Reduce wait times  Fairly allocate resources  Adapt to varying traffic patterns
  • 20. Solution  A large Shared thread pool – No ride specific silos  Round robin the process of picking work  If world wants Dashboards, do Dashboards
  • 21.
  • 22. Message Queue Real Time Latencies  Unlike Disneyland, each job takes variable amount of time  Wait time prediction is not accurate at the tail of the queue  We report real time and act on them if needed
  • 23.
  • 24.
  • 25. Elastic Thread Pools  Can grow from initial size  This allows growth as traffic demands  Wait times feedback to thread pool grow, shrink decisions
  • 26. Let’s Do a Puzzle  A man has • One Sheep • One Tiger • One bundle of Grass • One small boat  and a big River to cross…
  • 27.
  • 28. Similar Puzzle with Messages  Forecasting has • Several sales reps whose forecasts need update • Forecast update for sales rep should also update VP of sales • Multiple sales reps for same VP  and a big sales projection to put out ….
  • 29. Solution  Browse and Cache  Pick up work on which you can obtain mutex lock  Jump ahead if needed
  • 30. And in Real World..  Cache capacity is tuned to typical traffic pattern  At times cache can fill up  Messages may be escorted to the back of the queue
  • 31. Bread Lines Vs. Turkey Lines  Same set of ovens baking both  Bread is the basic need, Turkey when ovens are free  If bread lines build up, stop cooking turkey  If no one wants bread, just give all ovens to cooking turkey
  • 32. User-facing vs Background jobs  Same set of servers for both  Users need fast response; Background can wait  If user requests pile up, stop processing background  If no user requests, just process background jobs
  • 33. But how do you make Turkeys stop?  Traffic lights  Measure key resources  When resource usage crosses threshold, slow down on background  Sensitive to CPU, Memory, I/O, connection usage
  • 34. Lessons in Real World  Traffic types vary, traffic volumes vary  Handlers misbehave, components have bugs  Distributed systems scale very well, not if you need mutex.  Real time alerting, trending, traffic isolation, troubleshooting are necessary