What metrics and testing procedures validate the scalability of enterprise integrations under peak load volumes?
Answer
Basics: Integrations fail at peak, not on average days. Load testing simulates peak concurrent traffic to find bottlenecks before production. Salesforce has a performance testing policy: you must follow it, typically testing in a Full sandbox only, never production, and may need to notify or get approval from Salesforce (Scale Test tooling exists for some editions; verify current policy).
How it works:
- Define targets from business volumes: peak requests per second, records per hour, acceptable p95/p99 latency, error budget.
- Build the test with representative data volume and sharing/automation (a Full sandbox copy), including all triggers, flows and validation.
- Ramp load (JMeter, k6, Gatling, or a middleware test harness), then hold a soak period and a spike.
- Collect metrics from clients, middleware and Salesforce (limits, debug/ApexLog, Event Monitoring, Limits API).
- Tune, repeat, and document limits and a rollback plan.
Advanced / deep dive: Salesforce-specific failure points: record lock contention (UNABLE_TO_LOCK_ROW) on parent skew or hot records; Apex CPU time and SOQL/DML limits from automation firing on bulk loads; the daily API request allocation and concurrent long-running request limits; Bulk API batch and record limits; async capacity (Queueable and Batch queue depth, 5 concurrent batch jobs); platform event publishing and delivery allocations; and sharing recalculation after large loads. Design for resilience: retries with exponential backoff and jitter, circuit breakers, dead-letter handling and idempotency. Observe on both sides: end-to-end correlation IDs, middleware queue depth, and error categories. Test failure modes too (Salesforce maintenance, slow downstream) rather than only happy-path throughput.
Code / config example:
(System.OrgLimit l : System.OrgLimits.getMap().values()) {
(l.getName() == || l.getName() == ) {
System.debug(l.getName() + + l.getValue() + + l.getLimit());
}
}