SlideShare a Scribd company logo
Salesforce.com’s Multitenant Architecture 
How we do the magic we do…
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 any litigation, risks associated with completed and any 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-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These 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.
Doug Merrett 
Principal Architect – Northern Europe
In the Internet of Customers, Apps Connect Everything 
Connected 
Employee 
s 
Connected 
Products 
Social 
Mobile 
Connected 
Partners 
Cloud 
Connected 
Customers 
Customer
Trunk Club 
CONSUMER FASHION APP Honeywell 
CONTRACTOR 
APP 
Zimmer 
PRODUCT CATALOG APP 
Virgin America 
EMPLOYEE INTRANET APP 
Academy of Art 
STUDENT SCHEDULING APP 
Time Warner 
Cable 
FIELD SALES APP 
Build Next Gen Apps. Lead Next Gen IT.
The World’s #1 Cloud Platform 
The Fastest Path From Idea To App
Salesforce1: A New Customer Platform for the Future 
Your Customers
At The Core Of The Customer Success Platform 
Multitenant Cloud Computing 
Enterprise 
Cloud Computing 
Fast Innovative Open Easy Trusted 
No Hardware 
No Software 
Faster ROI 
Automatic Upgrades 
Continuous Improvement 
Flexible 
Any Device 
API First 
Data Portability 
Transparent 
Secure 
Performance at Scale 
Real-time Customizations 
AppExchange 
Scalable
What Salesforce.com does for you 
YOU 
get to focus on 
innovation 
We do 
Infrastructure 
Services 
We do 
Application 
Services 
We do 
Operations 
Services 
Customize your CRM 
Build your data model 
Build your business logic 
Build your user interface 
Network 
Storage 
Operating System 
Database 
App Server 
Web Server 
Data Center 
Security 
Sharing 
Integration 
Customization 
Web Services 
API 
Multi-Language 
Authentication 
Availability 
Monitoring 
Patch Mgmt 
Upgrades 
Backup 
NOC
Multitenancy
One Cloud with Many Customers 
Shared Elastic Services 
One Primary Data Store per Production Instance 
8K+ Customers per Instance 
50+ Production Instances 
All data segregated by customer 
All operations include Org ID 
Disaster Recovery 
Per Org encryption keys
What is in an Instance 
Pivot 
tables 
Shared Database Metadata Cache 
Data tables 
Metadata 
tables 
Bulk data 
processing 
Multitenant aware 
Query optimizer 
Runtime App 
Generator 
Full text search 
engine 
Virtual Application Components 
Common 
Application 
Screens 
Tenant 
Specific 
Screens 
Objects 
(Tables)
What Multitenancy means for Salesforce.com R&D 
One Version 
No Legacy Teams 
Bugs fixed for everyone
What Multitenancy means for Salesforce.com R&D 
One Version 
No Legacy Teams 
Bugs fixed for everyone 
Automation 
260K+ of our Tests 
Run your tests as well
What Multitenancy means for Salesforce.com R&D 
One Version 
No Legacy Teams 
Bugs fixed for everyone 
Instance Architecture 
Automation 
260K+ of our Tests 
Run your tests as well 
Staggered Releases 
Scalability across all sizes
What Multitenancy means for Salesforce.com R&D 
Automation 
Predictability 
Three major releases per year 
Bug fixes every week 
One Version 
No Legacy Teams 
Bugs fixed for everyone 
Instance Architecture 
260K+ of our Tests 
Run your tests as well 
Staggered Releases 
Scalability across all sizes
What Multitenancy means for Salesforce.com R&D 
Automation 
Predictability 
Three major releases per year 
Bug fixes every week 
One Version 
No Legacy Teams 
Bugs fixed for everyone 
Instance Architecture 
260K+ of our Tests 
Run your tests as well 
Staggered Releases 
Scalability across all sizes
Key Architectural Principles 
• Stateless Appservers 
• Database system of record 
• No Database Definition Language (DDL) at Runtime 
• All tables partitioned by OrgId 
• Smart Primary Keys, Polymorphic Foreign Keys 
• Creative de-normalization and pivoting 
• Use every RDBMS feature & optimization
Metadata, data, and pivot table structures store data 
corresponding to virtual data structures
The Objects table stores metadata about custom objects 
(tables)
The Fields table stores metadata about custom fields 
(columns)
The Data heap table stores all structured data 
corresponding to custom objects
A single slot can store various types of data that originate 
from different objects
The Indexes pivot table manages tenant-specific selective 
indexes
The UniqueFields pivot table facilitates uniqueness for 
custom fields
The Relationships pivot table facilitates referential integrity 
and optimizes joins
All data & metadata structures are partitioned to improve 
performance and manageability 
• Tables hash partitioned by OrgId 
• Separate connection pools point to physical hosts 
• App tier is also dynamically partitioned by OrgId 
• Distributed metadata cache with transactional invalidation
Application Framework: a whole lot for free 
• Native Declarative features 
• Bulk Processing 
• The Recycle Bin 
• Full Text Search 
• Smart Bulk Data Manipulation Language (DML) 
• Web Services APIs
Force.com’s native Application Framework provides 
declarative development, no coding
Validation rules and simple formulas: 
Business analysts can “code” these
Not so simple: Rollup-summary fields provide for easy 
cross-object summaries
Force.com’s bulk processing optimizations reduce overhead 
for data loads
Data definition processing is optimized to avoid 
performance hits or concurrency limits 
Examples: 
• Sort all records by primary key before attempting DML 
• Operate on tables in deterministic order 
• Slot reallocation for field datatype change 
• Deferred calculation for new rollup-summary field 
• Background processing of mass changes
The Recycle Bin: Smart Undeletes 
Restore 
 Individual object instances 
(records) 
 Related object instances 
(parent/child records) 
 Entire fields and objects 
(dropped columns and tables)
DR Instance 
Multitenant Search, anything but simple 
Index Backup 
Replication 
Primary Instance
Multitenancy delivers Blazing Performance 
Transactions Per Quarter 
131B Transactions in Q2FY15 
51% YOY Growth 
Average Page Time 
217ms Latency in Q2FY15 
13% YOY Improvement
• 4 Online copies of database 
• 2 Online backup copies 
Multitenant Core Data Storage 
Async 
Replication 
Production 
RAC Cluster 
Data Guard 
Replication 
Application 
Servers 
Standby 
RAC Cluster 
Primary Instance 
Production 
RAC Cluster 
Data Guard 
Replication 
Application 
Servers 
Standby 
RAC Cluster 
Secondary Instance
Multitenant Query Optimization Principles 
• Consistent SQL generation across the application 
• Deep awareness of pivot table structure 
– Flex schema does impose a cost 
• Tenant, user, object, fields statistics are crucial 
• No runaway queries allowed 
• Deep integration with the sharing model
Multitenant Query Optimizer 
Check user 
visibility 
Check filer 
selectivity 
Dynamically 
write query 
based on pre-queries 
Run Pre-Queries 
Execute 
optimized 
query 
user visibility = number of rows user can access 
filter selectivity = index corresponding to filter column 
Search originates 
from API or global 
search 
return results
The optimizer considers pre-query selectivity 
measurements when writing a query 
Pre-Query Selectivity 
Measurements 
Write final database access query, forcing … 
User Filter 
Low Low … nested loops join; drive using view of rows that the user can see. 
Low High … use of index related to filter. 
High Low … ordered hash join; drive using Data table. 
High High … use of index related to filter.
Apex: Force.com’s procedural frontier 
Integer NUM = 10; 
Account[] accs; 
// Clean up old data 
accs = [select id from account where name like 'test%']; 
delete accs; 
commit; 
accs = new Account[NUM]; 
for (Integer i = 0; i < NUM; i++) 
{ 
accs[i] = new Account(name='test ' + i, outstandingshares__c=i); 
} 
insert accs; 
Contact[] cons = new Contact [0]; 
for (Account acc : accs) 
{ 
cons.add(new Contact(lastName=acc.name + '1', accountid=acc.id)); 
cons.add(new Contact(lastName=acc.name + '2', accountid=acc.id)); 
} 
insert cons; 
SOQL 
Query 
Variable 
Declaration 
Commit 
Transaction 
Control 
Structure 
Array 
Data 
Operation
Apex code is stored as metadata, interpreted at runtime, and 
cached for scalability
Apex is deeply integrated with platform features 
• Bulk DML 
• Email and messaging 
• Asynchronous processing (Futures) 
• XmlStream / HTTP (RESTful) services classes 
• Declarative exposure as new Web Services
Social 
Feeds 
Profiles 
Files 
Social Graph 
Mobile 
Right Experience 
Any Device 
Customizable 
Real-time 
Real-time notifications 
Real-time workflow 
Real-time feeds 
Customer Success Platform 
Powered by Multitenancy 
Open 
Open Standards 
Open Technologies 
Open Interfaces 
Open Languages 
What Makes Us Different?
Where to go for more information... 
• http://developer.force.com/architect 
• http://developer.force.com/security 
• Other Sessions
Where to go for more information... (cont) 
• Other Sessions
BUILD APPS FAST. 
BUILD BUSINESS FASTER. 
Don’t miss the Salesforce1 Platform Keynote with 
Wednesday, October 15, 2 p.m. 
Moscone South, Main Keynote Hall 
Mike Rosenbaum 
EVP, Salesforce1 Platform 
Tod Nielsen 
CEO, Heroku 
Toby Lester 
VP, Technology Architecture 
And Innovation, Brown-Forman 
Mike Meadows 
VP, Chief Technology Officer 
Eli Lilly and Company
Q & A 
Please fill out your survey in 
Dreamforce App
Salesforce Multitenant Architecture: How We Do the Magic We Do

More Related Content

PDF
Introduction to the Salesforce Security Model
PPTX
Salesforce Overview For Beginners/Students
PDF
Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...
PPTX
Salesforce for Marketing Overview Deck
PPTX
Platform Events by Tim Taylor
PPTX
Understanding Multitenancy and the Architecture of the Salesforce Platform
PPTX
Salesforce Deck Template
PPTX
Salesforce Service Cloud Training | Salesforce Training For Beginners - Servi...
Introduction to the Salesforce Security Model
Salesforce Overview For Beginners/Students
Introduction to Salesforce | Salesforce Tutorial for Beginners | Salesforce T...
Salesforce for Marketing Overview Deck
Platform Events by Tim Taylor
Understanding Multitenancy and the Architecture of the Salesforce Platform
Salesforce Deck Template
Salesforce Service Cloud Training | Salesforce Training For Beginners - Servi...

What's hot (20)

PPTX
Salesforce administrator training presentation slides
PPTX
App Modernisation with Microsoft Azure
PDF
Managing the Role Hierarchy at Enterprise Scale
PDF
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
PPTX
Cloud Adoption Framework - Overview_partner.pptx
PDF
Salesforce overview
PDF
Architect day 20181128 - Afternoon Session
PPTX
Salesforce sales cloud solutions
PDF
Decluttering your Salesfroce org
PDF
Getting started with Salesforce security
PDF
Salesforce Marketing Cloud: Creating 1:1 Journeys
PPTX
Marketing cloud development
PDF
Performing a successful technical debt assessment in Salesforce
PPTX
Event Driven Software Architecture Pattern
PDF
Designing Salesforce Platform Events
PPTX
Integrating with salesforce using platform events
PPTX
Overview of Microsoft Exchange Online
PPTX
Introducing the Salesforce platform
PPTX
Introduction to Salesforce Platform - Basic
PDF
DevOps Center_ArchitectGroup
Salesforce administrator training presentation slides
App Modernisation with Microsoft Azure
Managing the Role Hierarchy at Enterprise Scale
Salesforce Training For Beginners | Salesforce Tutorial | Salesforce Training...
Cloud Adoption Framework - Overview_partner.pptx
Salesforce overview
Architect day 20181128 - Afternoon Session
Salesforce sales cloud solutions
Decluttering your Salesfroce org
Getting started with Salesforce security
Salesforce Marketing Cloud: Creating 1:1 Journeys
Marketing cloud development
Performing a successful technical debt assessment in Salesforce
Event Driven Software Architecture Pattern
Designing Salesforce Platform Events
Integrating with salesforce using platform events
Overview of Microsoft Exchange Online
Introducing the Salesforce platform
Introduction to Salesforce Platform - Basic
DevOps Center_ArchitectGroup
Ad

Viewers also liked (9)

PPT
Adaptive Development Methodology
PDF
ASD (Adaptive Software Development)
PPT
ADM Overview - Customers
PDF
Being Agile: Delivering Value to your Customers
PPT
Salesforce.com Agile Transformation - Agile 2007 Conference
PPTX
Salesforce com-architecture
Adaptive Development Methodology
ASD (Adaptive Software Development)
ADM Overview - Customers
Being Agile: Delivering Value to your Customers
Salesforce.com Agile Transformation - Agile 2007 Conference
Salesforce com-architecture
Ad

Similar to Salesforce Multitenant Architecture: How We Do the Magic We Do (20)

PDF
Understanding the Salesforce Architecture: How We Do the Magic We Do
PDF
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
PDF
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
PPT
How Salesforce.com R&D Delivers the Cloud
PPT
Designing custom REST and SOAP interfaces on Force.com
PDF
Manage Development in Your Org with Salesforce Governance Framework
PDF
Designing Custom REST and SOAP Interfaces on Force.com
PPTX
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
PPTX
Coding in the App Cloud
PPT
CloudOps evening presentation from Salesforce.com
PPSX
M.S. Dissertation in Salesforce on Force.com
PPT
20110514 PMI San Diego Keynote
PPTX
Mds cloud saturday 2015 salesforce intro
PDF
Increased IT infrastructure effectiveness by 80% with Microsoft system center...
PPT
Integration Strategies in a SaaS Environment
PDF
Building einstein analytics apps uk-compressed
PDF
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
PDF
Reshma Resume 2016
PDF
Elevate london dec 2014.pptx
PPT
adopt_soa.94145841
Understanding the Salesforce Architecture: How We Do the Magic We Do
Avoid Growing Pains: Scale Your App for the Enterprise (October 14, 2014)
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
How Salesforce.com R&D Delivers the Cloud
Designing custom REST and SOAP interfaces on Force.com
Manage Development in Your Org with Salesforce Governance Framework
Designing Custom REST and SOAP Interfaces on Force.com
Salesforce Cloud Infrastructure and Challenges - A Brief Overview
Coding in the App Cloud
CloudOps evening presentation from Salesforce.com
M.S. Dissertation in Salesforce on Force.com
20110514 PMI San Diego Keynote
Mds cloud saturday 2015 salesforce intro
Increased IT infrastructure effectiveness by 80% with Microsoft system center...
Integration Strategies in a SaaS Environment
Building einstein analytics apps uk-compressed
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
Reshma Resume 2016
Elevate london dec 2014.pptx
adopt_soa.94145841

More from Salesforce Developers (20)

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

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced IT Governance
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Advanced IT Governance
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25 Week I

Salesforce Multitenant Architecture: How We Do the Magic We Do

  • 1. Salesforce.com’s Multitenant Architecture How we do the magic we do…
  • 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 any litigation, risks associated with completed and any 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-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These 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.
  • 3. Doug Merrett Principal Architect – Northern Europe
  • 4. In the Internet of Customers, Apps Connect Everything Connected Employee s Connected Products Social Mobile Connected Partners Cloud Connected Customers Customer
  • 5. Trunk Club CONSUMER FASHION APP Honeywell CONTRACTOR APP Zimmer PRODUCT CATALOG APP Virgin America EMPLOYEE INTRANET APP Academy of Art STUDENT SCHEDULING APP Time Warner Cable FIELD SALES APP Build Next Gen Apps. Lead Next Gen IT.
  • 6. The World’s #1 Cloud Platform The Fastest Path From Idea To App
  • 7. Salesforce1: A New Customer Platform for the Future Your Customers
  • 8. At The Core Of The Customer Success Platform Multitenant Cloud Computing Enterprise Cloud Computing Fast Innovative Open Easy Trusted No Hardware No Software Faster ROI Automatic Upgrades Continuous Improvement Flexible Any Device API First Data Portability Transparent Secure Performance at Scale Real-time Customizations AppExchange Scalable
  • 9. What Salesforce.com does for you YOU get to focus on innovation We do Infrastructure Services We do Application Services We do Operations Services Customize your CRM Build your data model Build your business logic Build your user interface Network Storage Operating System Database App Server Web Server Data Center Security Sharing Integration Customization Web Services API Multi-Language Authentication Availability Monitoring Patch Mgmt Upgrades Backup NOC
  • 11. One Cloud with Many Customers Shared Elastic Services One Primary Data Store per Production Instance 8K+ Customers per Instance 50+ Production Instances All data segregated by customer All operations include Org ID Disaster Recovery Per Org encryption keys
  • 12. What is in an Instance Pivot tables Shared Database Metadata Cache Data tables Metadata tables Bulk data processing Multitenant aware Query optimizer Runtime App Generator Full text search engine Virtual Application Components Common Application Screens Tenant Specific Screens Objects (Tables)
  • 13. What Multitenancy means for Salesforce.com R&D One Version No Legacy Teams Bugs fixed for everyone
  • 14. What Multitenancy means for Salesforce.com R&D One Version No Legacy Teams Bugs fixed for everyone Automation 260K+ of our Tests Run your tests as well
  • 15. What Multitenancy means for Salesforce.com R&D One Version No Legacy Teams Bugs fixed for everyone Instance Architecture Automation 260K+ of our Tests Run your tests as well Staggered Releases Scalability across all sizes
  • 16. What Multitenancy means for Salesforce.com R&D Automation Predictability Three major releases per year Bug fixes every week One Version No Legacy Teams Bugs fixed for everyone Instance Architecture 260K+ of our Tests Run your tests as well Staggered Releases Scalability across all sizes
  • 17. What Multitenancy means for Salesforce.com R&D Automation Predictability Three major releases per year Bug fixes every week One Version No Legacy Teams Bugs fixed for everyone Instance Architecture 260K+ of our Tests Run your tests as well Staggered Releases Scalability across all sizes
  • 18. Key Architectural Principles • Stateless Appservers • Database system of record • No Database Definition Language (DDL) at Runtime • All tables partitioned by OrgId • Smart Primary Keys, Polymorphic Foreign Keys • Creative de-normalization and pivoting • Use every RDBMS feature & optimization
  • 19. Metadata, data, and pivot table structures store data corresponding to virtual data structures
  • 20. The Objects table stores metadata about custom objects (tables)
  • 21. The Fields table stores metadata about custom fields (columns)
  • 22. The Data heap table stores all structured data corresponding to custom objects
  • 23. A single slot can store various types of data that originate from different objects
  • 24. The Indexes pivot table manages tenant-specific selective indexes
  • 25. The UniqueFields pivot table facilitates uniqueness for custom fields
  • 26. The Relationships pivot table facilitates referential integrity and optimizes joins
  • 27. All data & metadata structures are partitioned to improve performance and manageability • Tables hash partitioned by OrgId • Separate connection pools point to physical hosts • App tier is also dynamically partitioned by OrgId • Distributed metadata cache with transactional invalidation
  • 28. Application Framework: a whole lot for free • Native Declarative features • Bulk Processing • The Recycle Bin • Full Text Search • Smart Bulk Data Manipulation Language (DML) • Web Services APIs
  • 29. Force.com’s native Application Framework provides declarative development, no coding
  • 30. Validation rules and simple formulas: Business analysts can “code” these
  • 31. Not so simple: Rollup-summary fields provide for easy cross-object summaries
  • 32. Force.com’s bulk processing optimizations reduce overhead for data loads
  • 33. Data definition processing is optimized to avoid performance hits or concurrency limits Examples: • Sort all records by primary key before attempting DML • Operate on tables in deterministic order • Slot reallocation for field datatype change • Deferred calculation for new rollup-summary field • Background processing of mass changes
  • 34. The Recycle Bin: Smart Undeletes Restore  Individual object instances (records)  Related object instances (parent/child records)  Entire fields and objects (dropped columns and tables)
  • 35. DR Instance Multitenant Search, anything but simple Index Backup Replication Primary Instance
  • 36. Multitenancy delivers Blazing Performance Transactions Per Quarter 131B Transactions in Q2FY15 51% YOY Growth Average Page Time 217ms Latency in Q2FY15 13% YOY Improvement
  • 37. • 4 Online copies of database • 2 Online backup copies Multitenant Core Data Storage Async Replication Production RAC Cluster Data Guard Replication Application Servers Standby RAC Cluster Primary Instance Production RAC Cluster Data Guard Replication Application Servers Standby RAC Cluster Secondary Instance
  • 38. Multitenant Query Optimization Principles • Consistent SQL generation across the application • Deep awareness of pivot table structure – Flex schema does impose a cost • Tenant, user, object, fields statistics are crucial • No runaway queries allowed • Deep integration with the sharing model
  • 39. Multitenant Query Optimizer Check user visibility Check filer selectivity Dynamically write query based on pre-queries Run Pre-Queries Execute optimized query user visibility = number of rows user can access filter selectivity = index corresponding to filter column Search originates from API or global search return results
  • 40. The optimizer considers pre-query selectivity measurements when writing a query Pre-Query Selectivity Measurements Write final database access query, forcing … User Filter Low Low … nested loops join; drive using view of rows that the user can see. Low High … use of index related to filter. High Low … ordered hash join; drive using Data table. High High … use of index related to filter.
  • 41. Apex: Force.com’s procedural frontier Integer NUM = 10; Account[] accs; // Clean up old data accs = [select id from account where name like 'test%']; delete accs; commit; accs = new Account[NUM]; for (Integer i = 0; i < NUM; i++) { accs[i] = new Account(name='test ' + i, outstandingshares__c=i); } insert accs; Contact[] cons = new Contact [0]; for (Account acc : accs) { cons.add(new Contact(lastName=acc.name + '1', accountid=acc.id)); cons.add(new Contact(lastName=acc.name + '2', accountid=acc.id)); } insert cons; SOQL Query Variable Declaration Commit Transaction Control Structure Array Data Operation
  • 42. Apex code is stored as metadata, interpreted at runtime, and cached for scalability
  • 43. Apex is deeply integrated with platform features • Bulk DML • Email and messaging • Asynchronous processing (Futures) • XmlStream / HTTP (RESTful) services classes • Declarative exposure as new Web Services
  • 44. Social Feeds Profiles Files Social Graph Mobile Right Experience Any Device Customizable Real-time Real-time notifications Real-time workflow Real-time feeds Customer Success Platform Powered by Multitenancy Open Open Standards Open Technologies Open Interfaces Open Languages What Makes Us Different?
  • 45. Where to go for more information... • http://developer.force.com/architect • http://developer.force.com/security • Other Sessions
  • 46. Where to go for more information... (cont) • Other Sessions
  • 47. BUILD APPS FAST. BUILD BUSINESS FASTER. Don’t miss the Salesforce1 Platform Keynote with Wednesday, October 15, 2 p.m. Moscone South, Main Keynote Hall Mike Rosenbaum EVP, Salesforce1 Platform Tod Nielsen CEO, Heroku Toby Lester VP, Technology Architecture And Innovation, Brown-Forman Mike Meadows VP, Chief Technology Officer Eli Lilly and Company
  • 48. Q & A Please fill out your survey in Dreamforce App