Skip to content

Platform Capabilities & Constraints

Salesforce architectural decisions must account for governor limits, shared resource constraints, and platform boundaries. Solutions that work within these constraints scale predictably; those that don’t hit limits in production.

Multi-Tenant Architecture

All customers (tenants) share the same compute, storage, and network resources. Governor limits exist to prevent any single tenant from monopolizing those shared resources.

Layered diagram showing multiple customer org tenants sharing a multitenant kernel with metadata engine, query optimizer, and governor limit enforcement, all backed by an OrgID-partitioned shared database on Hyperforce infrastructure.
Figure 1. Salesforce multitenant internals showing how the kernel layer isolates tenants at the database level through OrgID partitioning. The Universal Data Dictionary stores each org’s metadata at runtime, which is why custom objects and fields are metadata records rather than actual schema changes. This enables platform upgrades without disrupting tenant customizations.

The kernel reads tenant-specific metadata from the Universal Data Dictionary (UDD) at runtime to dynamically construct each tenant’s application, business logic, and APIs. Every database query is automatically scoped by OrgID, which ensures strict tenant isolation at the data layer. Custom objects, fields, triggers, and validation rules are all stored as metadata, not compiled code. This is how Salesforce deploys platform upgrades without affecting tenant customizations.

Multi-Tenancy Implications

AspectImplication for Architects
Shared databaseCannot run arbitrary SQL; must use SOQL/SOSL within limits
Shared computeCPU time limits per transaction; no long-running processes
Shared networkAPI call limits per 24-hour period; callout time limits
No raw file systemCannot write to disk; must use ContentDocument or external storage
No custom OS processesCannot run background daemons; must use platform async frameworks
Metadata-drivenCustom objects, fields, and configuration stored as metadata; schema changes are API calls
Automatic upgradesThree releases per year; cannot defer; must test in advance

The architect’s mindset

Multi-tenancy is not a limitation to work around. It is the foundation that provides automatic scaling, zero-downtime upgrades, and enterprise security at commodity pricing. Go off-platform only when the platform genuinely cannot serve the requirement.

Governor Limits Reference

Per-Transaction Limits (Synchronous)

ResourceLimitNotes
SOQL queries100Per Apex transaction
Records retrieved (SOQL)50,000Per transaction
SOSL searches20Per transaction
Records retrieved (SOSL)2,000Per transaction
DML statements150Per transaction
Records processed (DML)10,000Per transaction
Callouts100Per transaction
Callout timeout120 seconds per calloutMax 120s per individual callout (configurable via HttpRequest.setTimeout, default 10s); 120s total across all callouts in a transaction
CPU time10,000 msPer transaction
Heap size6 MBPer synchronous transaction
Future calls50Per transaction
Queueable jobs50Per transaction
Email invocations10Per transaction
Push notification calls10Per transaction
EventBus.publish150Per transaction

Per-Transaction Limits (Asynchronous)

ResourceLimitNotes
SOQL queries200Double the synchronous limit
Records retrieved (SOQL)50,000Same as synchronous
CPU time60,000 ms6x the synchronous limit
Heap size12 MBDouble the synchronous limit

Per-24-Hour Limits

ResourceLimitNotes
API calls100,000+Base + per-user allocation (varies by edition)
Async Apex executions250,000 or 200 x licensesWhichever is greater
Batch Apex jobs100 queued or activeAt any one time
Future calls250,000 or 200 x licensesWhichever is greater
Platform Events publishedBased on entitlementVaries; default 100K/day for most editions
Outbound emails5,000 external recipients/day (single + mass combined)Per-blast limit: 500 (EE), 1,000 (UE/PE). Daily cap shared across single and mass email
Scheduled Apex jobs100Concurrent scheduled jobs

Data and Storage Limits

ResourceLimitNotes
Custom objects200-2,000Varies by edition
Custom fields per objectUp to 500Varies by edition and field type - consult ‘Custom Fields Allowed Per Object’ help article for precise limits
Data storage10 GB base + per-userSee Org Strategy for edition details
File storage10 GB base + per-userSee Document Management
Record size~8 KB per recordAggregate of all field values
SOQL query length100,000 charactersIncluding WHERE, ORDER BY
Formula field size5,000 characters compiledComplex formulas may exceed this

Synchronous vs Asynchronous Limits - Visual Comparison

Side-by-side comparison of synchronous and asynchronous Apex governor limits showing async provides 2x SOQL queries, 6x CPU time, and 2x heap size, with off-platform processing as the escalation path when async limits are still exceeded.
Figure 2. Synchronous versus asynchronous governor limit comparison showing the async headroom available before going off-platform. Async provides 6x CPU time and 2x SOQL queries. The escalation path is sync, then async, then off-platform, and CTA judges expect that sequence to be followed in order.

The async escalation path

When a synchronous transaction hits governor limits, the first response should be to evaluate async processing. Async gives 2x SOQL, 6x CPU time, and 2x heap. If async limits are still insufficient, that is the signal to move off-platform. This escalation path - sync, then async, then off-platform - is a pattern CTA judges expect to see.

Limits you will hit

The limits CTAs most frequently encounter in real-world scenarios: (1) 100 SOQL per synchronous transaction - poor code design or AppExchange packages that query in loops, (2) 10,000 DML records - bulk data operations, (3) API calls per 24 hours - integration-heavy architectures, (4) CPU time - complex Flow automation chains.

On-Platform vs Off-Platform Decision Framework

A core system architecture question: should this run on the Salesforce platform or somewhere else?

Decision Matrix

FactorOn-PlatformOff-Platform
Data ownershipData is primarily Salesforce dataData lives in external systems
User contextUsers are already in SalesforceUsers are not Salesforce users
Transaction complexityWithin governor limitsExceeds governor limits
Processing timeUnder 10 seconds (sync) or 60 seconds (async)Long-running processes (minutes to hours)
Custom UILightning components are sufficientComplex UI beyond Lightning capabilities
Device integrationStandard browser/mobileIoT, sensors, specialized hardware
Compute requirementsLight computationHeavy computation, ML model training
Real-time streamingPlatform Events (limited)Kafka, Kinesis, or custom streaming
Data volumeUnder LDV thresholdsBillions of records, data lake/warehouse
RegulatoryStandard complianceSpecialized compliance (PCI DSS, HIPAA BAA)

On-Platform vs Off-Platform Architecture

Contrasts on-platform options including declarative flows, Apex, async processing, and event-driven patterns against off-platform options including MuleSoft, cloud compute, and custom web apps, connected via Salesforce APIs.
Figure 3. On-platform versus off-platform processing options showing four on-platform tiers (declarative, custom code, async, and event-driven) alongside four off-platform categories connected via APIs. The bidirectional API arrow between the platform and off-platform systems represents the integration cost that always accompanies an off-platform decision.

Decision Flowchart

Decision tree routing new capability requirements through user type, governor limit feasibility, declarative sufficiency, Apex capability, and UI complexity to reach on-platform declarative, async, custom code, or off-platform recommendations.
Figure 4. Platform capability decision flowchart implementing the platform-first ladder within the governor limit context. Non-Salesforce users route directly off-platform; Salesforce users exhaust declarative and async options before any off-platform recommendation, with async processing as the intermediate escalation before committing to external infrastructure.

Asynchronous Apex Patterns

Async patterns provide higher limits and background processing when synchronous execution hits governor limits.

Async Pattern Comparison

PatternMax Execution TimeUse CaseChainingCalloutsState
Future Methods60 secondsSimple fire-and-forgetNoYes (100)No (primitives only)
Queueable Apex60 secondsComplex async with stateYes (no enforced depth limit in production; Dev/Trial orgs default to 5; configurable via AsyncOptions.MaximumQueueableStackDepth)Yes (100)Yes (serializable)
Batch Apex60 seconds per batchLarge data processingYes (via finish)Yes (per execute)Limited (Database.Stateful)
Schedulable ApexN/A (calls other async)Time-based schedulingVia Queueable/BatchVia called methodN/A

When to Use Each Pattern

Routes async processing needs by data volume to Batch Apex for large datasets or through state and chaining requirements to Future Method or Queueable Apex, with Schedulable Apex as an optional scheduling wrapper.
Figure 5. Async pattern selection within the platform capabilities context. Large data volume is the clearest signal for Batch Apex; small volume decisions hinge on whether state must be preserved across steps or chaining is required. Queueable is the modern default over Future Method for small-volume async work.

Batch Apex Design Considerations

ConsiderationRecommendation
Scope sizeStart with 200; adjust based on processing complexity
Error handlingImplement Database.Stateful to track errors across batches
Retry logicBuild retry capability for failed batches
MonitoringUse AsyncApexJob for status; consider custom monitoring object
TestingTest with 200+ records; test start, execute, finish independently
ChainingChain to follow-up batch in finish method for multi-step processing
Governor limitsEach execute invocation gets its own governor limit context

Queueable over Future

Queueable Apex is the modern replacement for Future methods. It supports passing complex objects (not just primitives), chaining, and monitoring through AsyncApexJob. Default to Queueable unless there is a specific reason to use Future (such as calling from a trigger where simplicity is preferred).

Platform Events and Change Data Capture

Platform Events

A pub/sub messaging system built into the Salesforce platform, based on Apache Kafka under the hood.

FeatureDetail
PublishApex, Flow, API
SubscribeApex triggers, Flow, Lightning components, external systems (CometD/gRPC)
DeliveryAt-least-once (high-volume) or at-most-once
Retention72 hours (high-volume); 24 hours (legacy standard-volume, being retired Summer ‘27). All new events are high-volume by default
VolumeBased on entitlement (typically 100K+/day)
ReplayReplayId for event replay from a point in time
Transaction boundaryPublished events are committed independently of the DML transaction

Change Data Capture (CDC)

CDC publishes events when Salesforce records are created, updated, deleted, or undeleted.

FeatureDetail
Events generatedCreate, Update, Delete, Undelete
ConfigurationSelect objects to track in Setup
PayloadChanged fields only (delta), with header metadata
SubscriptionSame as Platform Events (CometD, Apex triggers, gRPC)
Use caseNear-real-time data synchronization to external systems
Gap eventsPublished when events are missed (e.g., during maintenance)

When to Use Platform Events vs CDC

ScenarioPlatform EventsCDC
Custom business eventsYesNo (CDC is record-change only)
Record change notificationsCan build manuallyAutomatic
Integration data syncManual event designAutomatic field-level changes
Audit trailCustom designAutomatic change tracking
Custom event payloadsFull controlSalesforce-defined schema

Big Objects

Designed for storing and accessing massive datasets (billions of records) on the Salesforce platform without consuming standard data storage.

Big Object Characteristics

FeatureDetail
StorageSeparate from standard data storage
Record capacityBillions of records
QueryStandard SOQL on indexed fields only; limited filtering (composite key only). Async SOQL was retired in Summer 2023 — use Batch Apex or Bulk API 2.0 for complex queries
DMLinsertImmediate (async bulk insert)
RelationshipsLookup to standard/custom objects
ReportingNot available in standard reports
AutomationCannot trigger workflows, flows, or Apex triggers
Use casesAudit logs, historical data, IoT telemetry, transactional archives

Big Object limitations

Big Objects are not a drop-in replacement for standard objects. They cannot appear in standard reports, dashboards, list views, or most declarative tools. Queries must target the composite key, so you must know what you are looking for. Ad-hoc querying is not supported. Design the composite key carefully based on access patterns.

When Big Objects Make Sense

  • Archiving historical records (old cases, audit logs, transaction history)
  • Storing IoT or telemetry data that arrives at high volume
  • Compliance data that must be retained for years but rarely queried
  • Pre-computed analytics data for dashboards

Custom Metadata Types vs Custom Settings

Both store configuration data, but they serve different purposes and deploy differently.

FeatureCustom Metadata TypesCustom Settings (Hierarchy)Custom Settings (List)
DeployableYes (metadata API, change sets)No (data, must be loaded per env)No (data, must be loaded per env)
PackageableYesNoNo
SOQL queriesStatic methods (getAll, getInstance) bypass SOQL engine entirely. SOQL queries on CMTs do not count against the 100-query limit in Apex but DO count against query rowsNo (uses getInstance, no SOQL limit)No (uses getInstance, no SOQL limit)
Apex test visibilityAvailable without SeeAllDataRequires SeeAllData or setup in testRequires SeeAllData or setup in test
Per-user/profile valuesNoYes (hierarchy)No
VolumeLow (configuration)Low (configuration)Low-Medium
Use caseApp configuration, mapping tables, feature flagsPer-user/profile settings, feature togglesLookup/reference data

Default to Custom Metadata Types

For CTA exam scenarios, default to Custom Metadata Types for configuration data. The main advantage is deployability: they move through change sets, sandboxes, and packaging like metadata, not data. Custom Settings require manual data loading in each environment, which is error-prone and breaks CI/CD.

Platform Feature Matrix

Quick reference for which platform capabilities are available across common architectural patterns.

CapabilityDeclarativeApexAPIExternal
Record CRUDFlowsFull CRUDREST/SOAPVia API
Complex logicFlow decisionsFull programmingN/AFull programming
Scheduled executionScheduled FlowsSchedulable ApexN/ACron jobs
Bulk processingBulk Data LoadBatch ApexBulk APIETL tools
External calloutsFlow HTTP calloutApex HTTPN/ADirect
Email sendingEmail AlertsApex MessagingAPIExternal email service
File processingLimitedContentVersion ApexContent APIExternal processing
PDF generationLimitedVisualforce renderAsN/AExternal service
Complex calculationsFormulas (limited)Apex MathN/AExternal compute
ML / AIEinstein (managed)Einstein APIEinstein APICustom ML

Sources

Personal study notes for the Salesforce CTA exam. Content compiled from VJ's study notes, official Salesforce documentation, community sources, and online publicly available content, then organized and presented with AI assistance. Not affiliated with Salesforce. © 2025–2026 VJ Srivastava.