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

Data Governance vs. Information Governance
Data Governance vs. Information GovernanceData Governance vs. Information Governance
Data Governance vs. Information GovernanceDATAVERSITY
 
Presentasi Kelompok 6 Tentang Front End & Back End.pptx
Presentasi Kelompok 6 Tentang Front End & Back End.pptxPresentasi Kelompok 6 Tentang Front End & Back End.pptx
Presentasi Kelompok 6 Tentang Front End & Back End.pptx12DirgaEkaPrasetya
 
Creating an Effective MDM Strategy for Salesforce
Creating an Effective MDM Strategy for SalesforceCreating an Effective MDM Strategy for Salesforce
Creating an Effective MDM Strategy for SalesforcePerficient, Inc.
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
DevSecOps: The DoD Software Factory
DevSecOps: The DoD Software FactoryDevSecOps: The DoD Software Factory
DevSecOps: The DoD Software Factoryscoopnewsgroup
 
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data PipelinesBest Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data PipelinesEric Kavanagh
 
RWE & Patient Analytics Leveraging Databricks – A Use Case
RWE & Patient Analytics Leveraging Databricks – A Use CaseRWE & Patient Analytics Leveraging Databricks – A Use Case
RWE & Patient Analytics Leveraging Databricks – A Use CaseDatabricks
 
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)NTT DATA Technology & Innovation
 
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
 
Apexトリガと標準自動化プロセスの違い
Apexトリガと標準自動化プロセスの違いApexトリガと標準自動化プロセスの違い
Apexトリガと標準自動化プロセスの違いYoshinari KUWAYAMA
 
Why an AI-Powered Data Catalog Tool is Critical to Business Success
Why an AI-Powered Data Catalog Tool is Critical to Business SuccessWhy an AI-Powered Data Catalog Tool is Critical to Business Success
Why an AI-Powered Data Catalog Tool is Critical to Business SuccessInformatica
 
RWDG Slides: A Complete Set of Data Governance Roles & Responsibilities
RWDG Slides: A Complete Set of Data Governance Roles & ResponsibilitiesRWDG Slides: A Complete Set of Data Governance Roles & Responsibilities
RWDG Slides: A Complete Set of Data Governance Roles & ResponsibilitiesDATAVERSITY
 
Salesforce Cross-Cloud Architecture
Salesforce Cross-Cloud ArchitectureSalesforce Cross-Cloud Architecture
Salesforce Cross-Cloud ArchitectureThierry TROUIN ☁
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best PracticesVivek Chawla
 
Real-World Data Governance: How to Write a Data Steward Job Description
Real-World Data Governance: How to Write a Data Steward Job DescriptionReal-World Data Governance: How to Write a Data Steward Job Description
Real-World Data Governance: How to Write a Data Steward Job DescriptionDATAVERSITY
 

What's hot (20)

Data Governance vs. Information Governance
Data Governance vs. Information GovernanceData Governance vs. Information Governance
Data Governance vs. Information Governance
 
Presentasi Kelompok 6 Tentang Front End & Back End.pptx
Presentasi Kelompok 6 Tentang Front End & Back End.pptxPresentasi Kelompok 6 Tentang Front End & Back End.pptx
Presentasi Kelompok 6 Tentang Front End & Back End.pptx
 
Creating an Effective MDM Strategy for Salesforce
Creating an Effective MDM Strategy for SalesforceCreating an Effective MDM Strategy for Salesforce
Creating an Effective MDM Strategy for Salesforce
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
App Development Services
App Development ServicesApp Development Services
App Development Services
 
DevSecOps: The DoD Software Factory
DevSecOps: The DoD Software FactoryDevSecOps: The DoD Software Factory
DevSecOps: The DoD Software Factory
 
Salesforce PPT.pptx
Salesforce PPT.pptxSalesforce PPT.pptx
Salesforce PPT.pptx
 
Community cloud運用開発の基礎
Community cloud運用開発の基礎Community cloud運用開発の基礎
Community cloud運用開発の基礎
 
Data mesh
Data meshData mesh
Data mesh
 
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data PipelinesBest Practices in DataOps: How to Create Agile, Automated Data Pipelines
Best Practices in DataOps: How to Create Agile, Automated Data Pipelines
 
RWE & Patient Analytics Leveraging Databricks – A Use Case
RWE & Patient Analytics Leveraging Databricks – A Use CaseRWE & Patient Analytics Leveraging Databricks – A Use Case
RWE & Patient Analytics Leveraging Databricks – A Use Case
 
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)
堅牢な国内システムへの導入でも安心!実践的Mulesoft設計テクニック(NTTデータ テクノロジーカンファレンス 2020 発表資料)
 
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
 
Data lineage
Data lineageData lineage
Data lineage
 
Apexトリガと標準自動化プロセスの違い
Apexトリガと標準自動化プロセスの違いApexトリガと標準自動化プロセスの違い
Apexトリガと標準自動化プロセスの違い
 
Why an AI-Powered Data Catalog Tool is Critical to Business Success
Why an AI-Powered Data Catalog Tool is Critical to Business SuccessWhy an AI-Powered Data Catalog Tool is Critical to Business Success
Why an AI-Powered Data Catalog Tool is Critical to Business Success
 
RWDG Slides: A Complete Set of Data Governance Roles & Responsibilities
RWDG Slides: A Complete Set of Data Governance Roles & ResponsibilitiesRWDG Slides: A Complete Set of Data Governance Roles & Responsibilities
RWDG Slides: A Complete Set of Data Governance Roles & Responsibilities
 
Salesforce Cross-Cloud Architecture
Salesforce Cross-Cloud ArchitectureSalesforce Cross-Cloud Architecture
Salesforce Cross-Cloud Architecture
 
Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
 
Real-World Data Governance: How to Write a Data Steward Job Description
Real-World Data Governance: How to Write a Data Steward Job DescriptionReal-World Data Governance: How to Write a Data Steward Job Description
Real-World Data Governance: How to Write a Data Steward Job Description
 

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

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)

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
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 

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