Salesforce Software Engineer Interview Prep Guide
Everything Salesforce actually asks Software Engineer candidates — concept walkthroughs, worked examples, and the real interview questions, drawn from candidate reports. Free to read.
Last updated

Focus most on Salesforce-style system design and next-week OOD: multi-tenant isolation, distributed storage/caching consistency, real-time events, class/data modeling, and concurrency correctness under retries. You're strong in Behavioral at 5/5 and Coding at 4/5, so linked lists, bitwise, and basic array/string work stay brief or normal while graph/grid/union-find gaps get extra space. The Salesforce-specific angle is quota-aware multi-tenancy, tenant isolation, Platform Events-style real-time integrations, and API/data model decisions for SaaS services. With 1–2 weeks left and an onsite next week, prioritize the emphasized onsite sections first, then use Technical Screen and OA sections as focused refreshers.
Technical Screen — 23 min
System Design
-
Distributed Storage, Caching And Consistency (Focus) — covered in depth under Onsite below.
-
Salesforce Platform Events And Real-Time Integrations (Focus) — covered in depth under Onsite below.
System Design is 3/5, but Kubernetes was not explicitly selected; cover core rollout, isolation, and troubleshooting patterns.

What's being tested
These prompts test whether you can turn ambiguous cloud requirements into a concrete Kubernetes architecture, then explain its operational and security consequences. The interviewer is probing knowledge of control-plane and node responsibilities, workload scheduling, networking, storage, identity, observability, and safe delivery—not merely whether you can name Kubernetes objects. Salesforce cares because software engineers must build multi-tenant services that remain secure, deployable, diagnosable, and resilient under partial failure.
Core knowledge
-
Control plane versus data plane:
`kube-apiserver`authenticates and validates requests;`etcd`stores cluster state; the scheduler assigns Pods; controllers reconcile desired state. Worker nodes run`kubelet`, a container runtime such as`containerd`, and networking components such as`kube-proxy`or an eBPF dataplane. -
Declarative reconciliation: A
`Deployment`records desired replicas and a`ReplicaSet`maintains them, while controllers continuously correct drift. Distinguish desired state, observed state, and actual process health; a running container can still fail readiness or serve incorrect traffic. -
Scheduling and capacity: Requests influence placement; limits constrain runtime usage, though CPU limits can cause throttling and memory overuse triggers eviction or OOM termination. Use
`nodeSelector`, affinity, taints, tolerations, and topology spread constraints to enforce isolation and availability across zones. -
Service networking: A
`Service`provides stable discovery over ephemeral Pod IPs, while an`Ingress`or Gateway handles external HTTP routing. Explain DNS, load balancing, TLS termination, and`NetworkPolicy`; a policy implementation requires a compatible CNI, and default-allow networking is a security risk. -
Availability and autoscaling: Run multiple replicas across failure domains, add Pod disruption budgets, and use readiness probes so traffic avoids unready instances. Horizontal Pod Autoscaler reacts to CPU, memory, or custom metrics; Cluster Autoscaler adds nodes, but neither fixes an application bottleneck or bad resource requests.
-
Stateful workloads: Prefer managed databases and queues when operationally possible. If Kubernetes must host state, use
`StatefulSet`, persistent volume claims, snapshots, replication, and tested restore procedures. Replicas improve availability, not necessarily durability; define RPO and RTO explicitly. -
Identity and least privilege: RBAC should grant service accounts only the verbs and resources they need, preferably within namespaces. Combine cloud workload identity, short-lived credentials, Pod Security Admission, image-signature verification, secret encryption, and
`NetworkPolicy`; never treat namespace separation as a complete tenant boundary. -
Supply-chain security: CI should build immutable, preferably digest-pinned images, scan dependencies and images, sign artifacts, and publish provenance. CD should verify signatures, render manifests or Helm charts, and deploy through an auditable identity rather than allowing arbitrary developer credentials to access the cluster.
-
Progressive delivery: A rolling update depends on
`maxSurge`,`maxUnavailable`, readiness checks, and a realistic termination grace period. Canary or blue-green deployment reduces blast radius, but requires objective rollback signals such as error rate, latency, saturation, and business-level request failures. -
Observability and incident response: Emit structured logs, metrics, and distributed traces with correlation IDs. Track golden signals—traffic, errors, latency, and saturation—plus deployment and scheduling events. Design alerts around actionable symptoms, and preserve audit logs for API activity, authorization decisions, and deployment history.
-
Failure boundaries and scaling assumptions: Ask whether the cluster spans availability zones, what happens if
`etcd`, a node pool, a CNI, or a cloud region fails, and how quickly recovery must occur. Capacity planning should include peak replicas, daemon overhead, disruption headroom, and control-plane rate limits.
Worked example
For “Design secure Kubernetes with CI/CD”, start by asking about workload type, regions and availability zones, traffic and `p99` latency targets, compliance requirements, deployment frequency, tenant isolation, RPO/RTO, and whether managed Kubernetes and managed databases are acceptable. Declare an initial assumption such as a stateless, internet-facing service with multi-zone availability, private cluster endpoints, and automated rollback within minutes. Organize the answer around four pillars: cluster architecture and failure domains, workload networking and identity, artifact-to-cluster supply-chain controls, and progressive delivery with observability. Place the control plane in the provider-managed service, use separate node pools where isolation or scaling differs, and keep persistent data outside the cluster unless there is a strong reason not to. Give each workload a dedicated service account with narrowly scoped RBAC, cloud workload identity, default-deny network policies, signed image verification, and encrypted secrets. Explicitly flag the tradeoff between deployment simplicity and isolation: namespaces and policies are efficient for many teams, while separate clusters provide stronger blast-radius and compliance boundaries at higher cost. Define CI as build, test, scan, sign, and publish, and CD as verify, deploy, observe, and automatically halt or roll back on failed health gates. Close by saying that with more time you would model a regional outage, test restore and rollback procedures, and review threat scenarios such as compromised CI credentials or a malicious image.
A second angle
For “Compare cloud compute; design Kubernetes security and CI/CD”, begin by comparing virtual machines, serverless containers, and managed Kubernetes against workload variability, startup latency, operational ownership, portability, and cost. Kubernetes is compelling when there are many services, custom scheduling needs, or a platform team that can absorb cluster complexity; it is not automatically cheaper or simpler than managed containers. The security design should then explain which controls remain the cloud provider’s responsibility and which belong to the engineering team. Close the comparison with a migration and rollout strategy, including workload classification, platform standards, and a fallback when Kubernetes adds more operational burden than business value.
Common pitfalls
Pitfall: Treating “three replicas” as an availability design. If all replicas land on one node or zone, one failure can remove the service; specify topology spread, disruption budgets, readiness behavior, and dependency availability.
A communication mistake is jumping directly into YAML, Helm, or a preferred cloud service without clarifying scale, compliance, tenancy, and recovery objectives. A stronger answer states assumptions first, labels optional choices, and continually ties architecture decisions to those requirements.
Pitfall: Saying “use RBAC and private networking” as though security is complete. Discuss workload identity, secret handling, image provenance, network-policy enforcement, auditability, credential rotation, and what happens if the CI system or a service account is compromised.
Connections
The interviewer may pivot to distributed-systems failure handling, zero-downtime deployment, service discovery, cloud IAM, or observability and SLOs. Be ready to connect Kubernetes mechanisms to application-level idempotency, backpressure, graceful shutdown, and dependency timeouts rather than treating the cluster as a substitute for resilient code.
Further reading
-
Kubernetes Documentation: Concepts — authoritative explanations of workloads, networking, storage, configuration, and security primitives.
-
Kubernetes Documentation: Security — covers RBAC, Pod Security Standards, Secrets, and control-plane security.
-
Google SRE Book: Release Engineering — useful principles for reproducible builds, progressive delivery, and safe rollback.
Practice questions
Relevant to Salesforce engineering workflows; review deployment gates, artifacts, secrets, and rollback safety at normal depth.

What's being tested
These interviews test whether you can turn an ambiguous delivery requirement into a reliable, secure CI/CD pipeline with explicit boundaries, interfaces, and failure handling. You must connect source control, build execution, artifact storage, Kubernetes deployment, authorization, observability, and rollback rather than describing isolated tools. For Salesforce, the underlying skill is operating software safely at large scale and across many teams, where tenant isolation, auditability, availability, and controlled change are as important as deployment speed.
Core knowledge
-
A robust pipeline separates continuous integration from continuous delivery: validate every commit, produce an immutable artifact once, then promote that exact artifact through environments. Rebuilding during production deployment creates non-reproducibility and undermines rollback.
-
Model the pipeline as stages: source trigger, dependency resolution, compilation, unit and integration tests, security checks, artifact publication, deployment, verification, and promotion. Each stage should have a clear contract, timeout, retry policy, and durable status.
-
Prefer immutable artifacts identified by content digest, such as an
OCIimage digest, rather than mutable tags likelatest. Store binaries and metadata in a registry such asArtifact Registry,ECR, orHarbor; retain provenance, commit SHA, dependency lockfile, and build environment. -
Kubernetes separates a managed control plane from worker nodes. The API server, scheduler, controller manager, and
etcdmaintain desired state; nodes runkubelet, a container runtime, and networking components. Managed control planes reduce operational burden but do not secure workloads automatically. -
Use layered
Kubernetessecurity: least-privilegeRBAC, separate namespaces,NetworkPolicy, restricted pod security settings, non-root containers, read-only filesystems, resource requests and limits, and admission controls such asOPA GatekeeperorKyverno. -
Never place long-lived cloud credentials in repository secrets or container images. Use short-lived workload identity, for example
OIDCfederation from the runner, and store only necessary secrets inVaultor a cloud secret manager; audit every privileged action. -
A deployment controller should reconcile desired and observed state. GitOps tools such as
Argo CDprovide an auditable model, while direct API deployment can be simpler and faster; explicitly compare drift detection, access control, rollback ergonomics, and operational complexity. -
Safe rollout strategies include rolling updates, blue-green deployments, and canaries. A canary limits blast radius, but requires health checks and automated abort thresholds; blue-green simplifies rollback but temporarily requires capacity for two versions.
-
Define readiness, liveness, and startup probes correctly. Readiness removes an unhealthy instance from traffic; liveness restarts a stuck process; startup prevents slow initialization from being killed. A liveness probe that checks a downstream
databasecan cause cascading restarts. -
For CI-job throttling, a token bucket supports bursts while enforcing an average rate: tokens accumulate up to capacity at rate , and each job consumes tokens. A distributed implementation needs atomic state, commonly
RedisLua scripts, plus lease expiry so crashed runners do not hold capacity forever. -
Rate limiting must define its scope: per repository, organization, runner pool, priority class, or global system. Fair scheduling often combines quotas with weighted queues; strict FIFO can let one large organization starve small teams, while purely per-tenant limits waste idle capacity.
-
Make retries safe with bounded exponential backoff and jitter. Retry transient registry, API, or node failures, but do not blindly retry compilation or deployment steps that may have side effects; use idempotency keys, operation IDs, and reconciliation to prevent duplicate releases.
-
Pipeline reliability is measurable through deployment frequency, lead time, change-failure rate, and time to restore, but system design should also track queue wait time, runner utilization,
p95/p99stage duration, flaky-test rate, rollback time, and failed-admission counts.
Worked example
For “Design secure Kubernetes with CI/CD”, a strong candidate first asks about deployment frequency, number of teams and clusters, compliance requirements, workload sensitivity, cloud provider, availability targets, and whether teams share runner infrastructure. They should declare assumptions such as multiple environments, immutable container images, managed Kubernetes, and a requirement that untrusted pull requests cannot obtain production credentials. The answer can then be organized around pipeline stages and artifact provenance, cluster and workload isolation, identity and secret management, and rollout observability with rollback. The candidate should explain that CI produces and signs an image, scans it, stores it by digest, and promotes that same digest through environments rather than rebuilding. They should distinguish control-plane responsibility from node and application responsibility, then describe RBAC, admission policy, network boundaries, pod hardening, and audit logs. One explicit tradeoff is whether to use GitOps reconciliation for stronger drift detection and auditability or direct deployment APIs for a simpler, lower-latency path. They should close by noting that they would next validate disaster recovery for etcd and registries, model multi-region failure, and run an incident exercise involving compromised build credentials.
A second angle
For “Implement a Rate Limiter for CI Jobs Rather Than for API Requests”, the central concern shifts from cluster hardening to protecting finite runner capacity and keeping scheduling fair under bursty workloads. Clarify whether jobs are queued or rejected, whether limits are global or per organization, how much burst capacity is acceptable, and what happens when a runner disappears. A token bucket with atomic distributed updates handles average throughput and bursts, while a durable priority queue and leases handle fairness and crash recovery. The important tradeoff is between strict per-tenant isolation, which protects noisy neighbors, and high global utilization, which may leave capacity idle during quiet periods.
Common pitfalls
Analytical mistake. A tempting answer says “use Kubernetes and add a rolling deployment,” but never defines artifact identity, authorization boundaries, health signals, or rollback conditions. A stronger answer traces one commit through immutable publication, policy validation, deployment, verification, and recovery.
Pitfall:
Communication mistake. Jumping immediately into Jenkins, GitHub Actions, or Argo CD makes the design sound tool-driven rather than requirement-driven. State assumptions first, organize the response into four or five pillars, and explain which properties matter independently of the vendor.
Pitfall:
Depth mistake. Saying “use a distributed rate limiter” or “secure the cluster with RBAC” is incomplete. Explain the algorithm, atomicity, lease expiry, quota scope, service-account permissions, admission policies, secret flow, and behavior when the control plane, registry, or runner pool is unavailable.
Connections
The interviewer may pivot to distributed locking, work queues and fair scheduling, supply-chain security, observability and SLOs, or disaster recovery. Be prepared to connect deployment safety with idempotency, eventual consistency, incident response, and multi-region architecture.
Further reading
-
SLSA — A practical framework for build provenance and software supply-chain integrity.
-
Kubernetes Documentation: Pod Security Standards — Concrete baseline controls for restricting workload privileges.
-
The Twelve-Factor App — Useful principles for configuration, disposability, logs, and deployable services.
Practice questions
Coding & Algorithms
- Arrays, Strings And Hash Counting — covered in depth under Online Assessment below.
Onsite — 42 min
System Design
Focus area — System Design is 3/5 and Salesforce onsite often probes tenant isolation, quotas, sharing boundaries, and noisy-neighbor protection.

What's being tested
These designs test whether you can build multi-tenant systems that scale while preventing one customer from reading, mutating, or exhausting another customer's resources. The interviewer is probing tenant-aware data modeling, authorization boundaries, asynchronous processing, consistency, failure recovery, and operational isolation. Salesforce operates large shared platforms, so a strong answer must balance efficiency of pooled infrastructure against hard security boundaries, predictable per-tenant performance, and explainable failure behavior.
Core knowledge
-
Tenant context propagation must begin at authentication and travel through every request, job, query, cache key, topic, and storage path; never trust a client-supplied
tenantIdwithout deriving it from verified identity and authorization claims. -
Isolation models range from shared tables with
tenant_id, to separate schemas, to separate databases or accounts. Shared tables maximize utilization; dedicated databases improve blast-radius and compliance isolation but increase provisioning, migration, and operational cost. -
Enforce isolation redundantly: application authorization, repository APIs requiring tenant context, database row-level security such as
`Postgres`RLS, tenant-qualified indexes, and tests that attempt cross-tenant reads. Defense in depth catches missing predicates and confused-deputy bugs. -
For shared data, use composite indexes such as
(tenant_id, channel_id, created_at)and consider partitioning by tenant or time. A query filtering onlychannel_idis both slower and a potential isolation defect; make tenant scope structurally difficult to omit. -
Noisy-neighbor control requires per-tenant quotas, rate limits, bounded worker concurrency, queue fairness, and circuit breakers. A weighted fair scheduler or per-tenant token bucket prevents a large customer from consuming all
`Kafka`partitions, storage bandwidth, or websocket capacity. -
In messaging, separate durable writes from real-time delivery: persist an event with a monotonic sequence, then publish asynchronously. Clients reconnect using a cursor or read position; delivery is typically at-least-once, so consumers need idempotency and deduplication.
-
Ordering must be scoped explicitly: global ordering is expensive and unnecessary; channel ordering can use a partition key such as
(tenant_id, channel_id). If multiple writers exist, use database sequence numbers, logical clocks, or a single ordered partition. -
Fan-out depends on recipient count. Store once and resolve membership on read for large channels, or create recipient inbox entries for small channels requiring fast unread counts; hybrid fan-out avoids multiplying storage by millions of users.
-
Large-file replication should use multipart, checksummed, resumable transfers with a manifest containing tenant, object version, destination, and status. Upload to a temporary key, verify the complete checksum, then atomically mark the destination available.
-
Idempotency is mandatory for retries: identify work by
(tenant_id, object_id, version, destination)and make repeated copy, allocation, or delivery operations converge to one result. Exponential backoff with jitter handles transient failures; dead-letter queues retain unrecoverable work. -
Model resource allocation as an explicit state machine, for example
AVAILABLE → HELD → ALLOCATED → RELEASING → AVAILABLE, and reject illegal transitions. Store an owner, lease expiry, version, and timestamps so recovery can distinguish expiration from deliberate release. -
Optimistic locking prevents lost updates using
UPDATE ... WHERE id = ? AND version = ?, requiring exactly one affected row before incrementingversion. It works well for contention that is usually low; high contention may require sharding, queues, or pessimistic locking. -
Permissions are separate from tenant identity: users may belong to multiple tenants, channels can have roles, and administrators may have scoped cross-tenant support access. Check authorization at every operation, not only at login or API routing.
-
Measure isolation as well as correctness: track per-tenant
`p50`/`p99`latency, queue age, error rate, throttling, replication lag, and storage growth. Alert on cross-tenant access attempts and unusual tenant-level consumption, while keeping logs tenant-scoped and privacy-safe.
Worked example: Design a Multi-Tenant Enterprise Messaging System
A strong candidate first clarifies tenant count, peak messages per second, channel-size distribution, retention and search requirements, delivery guarantees, compliance constraints, and whether a user can belong to multiple tenants. They then state assumptions—for example, at-least-once delivery, per-channel ordering, durable history, and reconnectable clients using cursors. The answer can be organized around four pillars: tenant-safe identity and permissions, durable message storage, asynchronous fan-out and real-time delivery, and search/presence/read-position services. Every event and cache key should carry verified tenant context, while channel membership checks prevent both cross-tenant access and unauthorized same-tenant reads. A specific tradeoff is whether to fan out messages on write or read: write fan-out gives fast inbox reads but can explode for huge channels, so a hybrid threshold is more robust. The candidate should explain backpressure, reconnect semantics, idempotent message IDs, and how a failed websocket gateway catches up from durable storage. They should close by saying that, with more time, they would detail retention deletion, encryption and key isolation, multi-region failover, and load-testing methodology.
A second angle
For Design a tenant-isolated system to replicate large recordings to per-customer data centers, the central issue shifts from low-latency fan-out to durable, bandwidth-heavy workflows and destination-specific isolation. The design should emphasize manifests, multipart transfer, checksums, resumability, per-tenant scheduling, and explicit lifecycle states rather than websocket delivery. A shared transfer service can be efficient, but quotas and weighted scheduling must prevent one tenant's recordings from monopolizing network or disk. The same tenant context and idempotency rules apply at every queue, object path, retry, and destination.
Common pitfalls
Pitfall: Treating
tenant_idas merely a filter added by convention is an analytical mistake. A missing predicate, unscoped cache key, or background job can become a data leak; stronger answers enforce scope through APIs, database policies, indexes, and adversarial tests.
A communication mistake is jumping directly into `Kafka`, sharding, or multi-region replication before clarifying traffic, retention, ordering, and isolation requirements. State assumptions first, draw the trust boundary, and explain which guarantees are required versus optional.
Pitfall: Saying “use a transaction” or “make it strongly consistent” without defining the boundary is too shallow. Explain which state transition, message publication, or copy completion is atomic, then address retries, partial failure, duplicate work, and recovery.
Connections
The interviewer may pivot to authorization and RBAC, database sharding and partitioning, idempotent distributed workflows, or queue fairness and backpressure. Be ready to connect tenant isolation to encryption-key scope, disaster recovery, observability, and multi-region consistency.
Further reading
-
Designing Data-Intensive Applications — Martin Kleppmann’s treatment of replication, partitioning, consistency, streams, and failure modes.
-
Amazon Builders’ Library: Timeouts, retries, and backoff with jitter — practical guidance for reliable asynchronous distributed systems.
-
Google Zanzibar: A Global Authorization System — foundational model for scalable relationship-based authorization.
Practice questions
Focus area — System Design is 3/5 with many selected gaps: caching, sharding, offline sync, observability, search, quotas, and replication.

What's being tested
These designs test whether you can turn vague requirements into explicit consistency, durability, latency, and availability contracts, then choose storage and caching mechanisms that satisfy them. The interviewer is probing practical distributed systems reasoning: replication, partitioning, cache invalidation, ordering, retries, and failure recovery—not just naming databases. Salesforce operates multi-tenant enterprise systems where one tenant’s traffic, data, or outage must not compromise another’s correctness or isolation.
Core knowledge
-
Consistency models define what reads may observe: linearizability gives a single real-time order, sequential consistency preserves each client’s order, and eventual consistency allows stale reads. State which operations require which guarantee instead of labeling the whole system “strongly consistent.”
-
Replication improves availability and read throughput but creates divergence. Leader-based replication simplifies writes and ordering; multi-leader or leaderless designs improve locality but require conflict resolution, version vectors, last-write-wins, or application-specific merges.
-
For quorum systems, with replication factor , choose write quorum and read quorum such that to overlap replicas. This detects recent writes, but does not automatically provide linearizability under clock skew, sloppy quorums, or read-repair lag.
-
Cache-aside keeps the database authoritative: read cache, fetch on miss, then populate; write the database first and invalidate or update the cache. Protect against stale repopulation by using versioned values, compare-and-set, or delayed invalidation strategies.
-
TTL bounds staleness but does not prevent stale reads before expiry. For correctness-sensitive mappings, use explicit invalidation, generation numbers, or a strongly consistent metadata store; add jitter to TTLs to avoid synchronized expiration storms.
-
Hot keys can overload one cache shard or database partition even when aggregate traffic is moderate. Replicate popular immutable values, request-coalesce concurrent misses, shard counters, or route reads across replicas; never assume horizontal scaling fixes skew automatically.
-
Partitioning should isolate tenants and distribute load using tenant ID, conversation ID, or a composite key. Hash partitioning balances traffic; range partitioning supports scans but risks hot ranges. Large tenants may need dedicated shards or subpartitioning.
-
Idempotency makes retries safe. Assign a client request or event ID, persist it with the result, and enforce a uniqueness constraint in
Postgresor the chosen durable store; a timeout means “unknown outcome,” not automatic permission to duplicate work. -
Ordering must be scoped realistically. A per-conversation sequence number or partition key can provide ordered messages, while global ordering is expensive and often unnecessary. Persist sequence metadata and define behavior for gaps, duplicates, and late arrivals.
-
Durability requires acknowledging writes only after the configured persistence boundary—such as replicated log commit or quorum acknowledgment. Separate durability from availability: accepting a write during a partition may preserve availability but weaken read-after-write guarantees.
-
Failure handling should cover cache loss, replica lag, leader failure, network partitions, retries, and partial fan-out. Use bounded timeouts, exponential backoff with jitter, circuit breakers, dead-letter or repair workflows, and observability for
p50,p99, error rate, lag, hit rate, and stale-read rate. -
Tenant isolation includes authorization at every read and write path, tenant-aware cache keys, quotas, encryption boundaries, and noisy-neighbor controls. A cache key such as
objectIdwithout tenant context can become a cross-tenant data leak even when the database query is correct.
Worked example: Design a Multi-Tenant Enterprise Messaging System
A strong candidate first clarifies tenant scale, peak messages per second, maximum acceptable message loss, required ordering scope, retention, search freshness, presence accuracy, and whether direct messages need stronger guarantees than presence. They should declare that durable message history is authoritative, real-time delivery is best-effort and replayable, and ordering is per conversation rather than global. The answer can then be organized around partitioned durable storage, an event-delivery path, read and search models, and authorization plus tenant isolation. Messages might be appended with a conversation sequence, published through Kafka-like partitions, persisted before acknowledgment, and delivered through WebSocket gateways with offline replay from the history store. Read positions and presence should be modeled separately because read positions need durable monotonic updates while presence tolerates staleness. A key tradeoff is whether to synchronously fan out to every participant or store once and fan out on read for large channels; the latter protects writes from celebrity-channel explosions but increases read work. Caches can accelerate conversation metadata and recent history, but tenant-scoped keys and explicit invalidation are required to avoid stale permissions or cross-tenant exposure. The candidate should close by saying they would next quantify partition hot spots, failure recovery, retention compaction, search indexing lag, and load-test reconnect storms.
A second angle
For Design a URL-Shortening Service, the central consistency question is different: a short code must never ambiguously map to two destinations, while redirects can usually tolerate briefly stale cache entries. Use a durable uniqueness constraint or collision-resistant ID allocation for creation, then cache immutable or versioned redirect mappings at the edge. A delete or expiration policy introduces a cache invalidation race, so include generation checks, bounded TTLs, and an explicit policy for redirects already cached by clients or CDNs. Multi-region creation may favor a globally unique ID scheme and asynchronous replication, whereas a single-writer metadata region makes collision and update semantics simpler.
Common pitfalls
Analytical mistake: Saying “use eventual consistency everywhere for scale” ignores operation-specific correctness. A better answer classifies writes, reads, permissions, counters, and presence separately, then states where linearizable or read-after-write behavior is required.
Pitfall: Treating a cache hit as proof that the value is current, authorized, or tenant-safe.
Communication mistake: Jumping directly to Cassandra, Redis, or Kafka without requirements makes the design sound cargo-culted. State assumptions, sketch request and failure flows, and explain why each component satisfies a stated latency, durability, or isolation requirement.
Depth mistake: Discussing replication only in the healthy path misses the interview’s most valuable signal. Explain what happens during leader loss, network partition, duplicate delivery, cache outage, replica lag, and a tenant generating disproportionate traffic.
Connections
The interviewer may pivot to CAP tradeoffs, failure detectors, event sourcing, CQRS, or multi-region disaster recovery. Be ready to connect consistency choices to schema design, idempotent APIs, authorization enforcement, and operational metrics without drifting into infrastructure ownership outside the service boundary.
Further reading
-
Designing Data-Intensive Applications — Martin Kleppmann’s treatment of replication, partitioning, consistency, transactions, and stream processing.
-
Dynamo: Amazon’s Highly Available Key-value Store — seminal discussion of quorum-style availability, conflict resolution, and eventual consistency.
-
Caching in the Distributed World — Stripe’s idempotency-key pattern for making retried distributed requests safe.
Practice questions
Focus area — Salesforce-specific extension for real-time messaging, integrations, event delivery, replay, ordering, and backpressure.

What's being tested
This topic tests whether you can design and debug event-driven distributed systems around Salesforce without assuming stronger guarantees than the platform provides. A Software Engineer should be able to choose between Platform Events, Change Data Capture (CDC), synchronous APIs, and the Pub/Sub API, then explain delivery, replay, ordering, duplication, failure recovery, and security. Salesforce cares because integrations must remain reliable under bursts, consumer outages, transaction failures, and partial downstream availability—not merely work in a happy-path demo.
Core knowledge
-
Platform Events are custom, append-only messages published through Salesforce’s event bus. Publishers use
Apex,Flow,REST,SOAP, or APIs; subscribers consume asynchronously, decoupling the Salesforce transaction from downstream processing. -
CDC describes changes to Salesforce records, while Platform Events describe application-defined business facts. Use CDC for synchronization such as “Account changed”; use a custom event for intent such as “Invoice approved.” Do not treat them as interchangeable.
-
The
Pub/Sub APIuses gRPC and supports high-throughput event consumption with topic schemas, replay, and flow control.CometDuses Bayeux over HTTP long polling and remains common for clients subscribing through/cometd/{version}. -
Delivery is generally at least once, so a consumer must tolerate duplicates. Include a stable event identifier such as
EventUuid, persist processed IDs or a business idempotency key, and make the side effect transactional with the deduplication record where possible. -
Replay lets a subscriber resume from an event position after disconnecting. Store the last successfully processed replay position durably, but avoid acknowledging or advancing it before the downstream side effect commits.
-
Do not promise global ordering. Events may be ordered within a limited publishing context or stream, but multiple publishers, partitions, retries, and independent consumers can produce reordering. Include a source timestamp, sequence number, or version and define conflict behavior.
-
Salesforce publication is coupled to the originating transaction: a rollback generally prevents the event from being committed. After commit, delivery to subscribers is asynchronous; the publisher should not assume the consumer has completed before the API request returns.
-
Backpressure prevents a fast producer from overwhelming a slow consumer. Bound in-memory queues, use controlled concurrency, monitor lag, and apply exponential backoff with jitter. A retry storm is worse than a temporarily slow consumer.
-
Design a dead-letter path for poison messages that repeatedly fail validation or downstream processing. Preserve the original payload, event ID, error, attempt count, and timestamps; support replay after correcting code or data rather than silently dropping the event.
-
A useful reliability decomposition is:
Measure each stage separately with publish errors, subscriber lag, processing failures, and downstream latency. -
Schema evolution must be additive where possible. Consumers should ignore unknown fields, tolerate missing optional fields, and use explicit event versioning for incompatible changes. Never overload one field with a new meaning merely to avoid a schema update.
-
Apply least privilege using Salesforce Connected Apps, OAuth scopes, integration users, and subscriber authorization. Do not put secrets in event payloads; encrypt sensitive data, minimize fields, and remember that events can be retained or replayed.
Worked example
Representative prompt: Design a reliable Salesforce Platform Event integration
In the first 30 seconds, clarify the event volume and burst rate, acceptable end-to-end latency, retention and replay requirements, ordering scope, downstream side effects, and whether duplicate processing is tolerable. I would state the assumption that delivery is asynchronous and at least once, so the consumer must be idempotent rather than relying on exactly-once delivery. I would organize the answer around four pillars: event contract and publication boundary, subscriber transport and checkpointing, idempotent processing with retries, and observability/security. The consumer would read through Pub/Sub API or CometD, persist a durable checkpoint only after successful processing, and route repeatedly failing events to a dead-letter store. I would explicitly choose between synchronous confirmation and asynchronous publication: synchronous APIs provide immediate business feedback, while Platform Events improve decoupling but shift failure handling into the consumer. I would also explain that a database uniqueness constraint on (event_id, operation) is stronger than an in-memory duplicate cache. Finally, I would close with: if I had more time, I would load-test burst behavior, simulate subscriber outages and replay gaps, and verify schema compatibility during rolling deployments.
A second angle
Representative prompt: How would you prevent duplicate downstream actions from a Salesforce event stream?
Here the central constraint is not transport selection but the boundary between event consumption and an irreversible side effect such as charging a card or sending a fulfillment request. The strong framing is to distinguish deduplication from retry: deduplication recognizes a previously completed operation, while retry handles an unknown outcome after a timeout. Use an idempotency key accepted by the downstream service, or persist an operation state machine such as PENDING, SUCCEEDED, and FAILED with a unique event key. If the side effect and local database update cannot share one transaction, acknowledge the distributed limitation and use reconciliation or an outbox-style completion record.
Common pitfalls
Pitfall: Saying “Platform Events guarantee exactly-once processing” is analytically wrong. State at-least-once delivery and design idempotency, durable checkpoints, and replay handling explicitly.
A common communication mistake is starting with Kafka, microservices, or generic event-bus terminology without clarifying Salesforce constraints. Lead with the required guarantee, volume, consumer type, and failure model, then map the design to Pub/Sub API, CometD, Platform Event limits, and Salesforce authentication.
A depth mistake is discussing retries without explaining what happens after a consumer crashes between the downstream call and the acknowledgment. A stronger answer names the ambiguous-outcome case and proposes downstream idempotency keys, transactional state, reconciliation, and a dead-letter workflow.
Connections
An interviewer may pivot to distributed transactions, the transactional outbox pattern, Change Data Capture, or API rate-limit and backpressure design. They may also test schema compatibility, OAuth integration security, observability through p95/p99 latency and consumer lag, or how to test replay and failure recovery.
Practice questions
Coding & Algorithms
- Arrays, Strings And Hash Counting — covered in depth under Online Assessment below.
Software Engineering Fundamentals
Focus area — Your note says OOD round next week; emphasize class boundaries, APIs, data models, tests, reviews, and secrets.

What's being tested
These prompts test whether you can turn ambiguous requirements into low-level designs with explicit entities, invariants, lifecycle transitions, and failure behavior. You must reason about concurrency, transactional boundaries, optimistic locking, API contracts, and maintainable class responsibilities—not merely draw classes or list technologies. Salesforce cares because production services are multi-tenant, highly concurrent, and security-sensitive; a design that works only on the happy path can cause data leakage, double allocation, downtime, or credential exposure.
Core knowledge
-
Domain modeling separates stable configuration from runtime state: a
MoviehasShowinstances, while a reusableSeatlayout is distinct from per-showSeatReservationstate. Keep ownership and invariants explicit rather than putting all behavior in a god class. -
State machines make lifecycle rules executable. For a reservation, valid transitions might be
AVAILABLE → HELD → BOOKEDorHELD → AVAILABLE; rejectBOOKED → AVAILABLEunless a defined cancellation workflow exists. Store state transitions with timestamps and actor IDs for auditability. -
Concurrency control prevents double booking. Use a database transaction with a conditional update such as
UPDATE seats SET status = 'HELD' WHERE show_id = ? AND seat_id = ? AND status = 'AVAILABLE'; require the affected-row count to equal the requested count. -
Optimistic locking adds a version predicate:
UPDATE resource SET state = ?, version = version + 1 WHERE id = ? AND version = ?. A zero-row update means a conflicting write occurred; return a retryable conflict rather than silently overwriting another tenant’s decision. -
Pessimistic locking such as
SELECT ... FOR UPDATEcan simplify correctness for short, bounded transactions, but reduces concurrency and risks lock contention. Never hold a database lock while calling a payment provider; use a short reservation hold plus an explicit payment workflow. -
Idempotency makes retries safe. Require an idempotency key for payment confirmation, allocation requests, and credential-rotation operations; persist the key, request fingerprint, final result, and expiry. Reusing a key with different parameters must fail, not create a second operation.
-
Code review should proceed in layers: behavior and invariants first, then authorization and tenant isolation, transaction boundaries, error handling, data modeling, performance, observability, and maintainability. A review that checks formatting while missing an unscoped
UPDATEis not thorough. -
Multi-tenancy requires tenant identity to be enforced at every data-access boundary, not merely accepted from a request body. Prefer repository methods requiring
tenant_id, database row-level security where appropriate, and tests proving that IDs from another tenant cannot be read or mutated. -
Secrets management means database passwords belong in a dedicated secret manager such as
AWS Secrets Manager,HashiCorp Vault, or a cloud-native equivalent—not source control, container images, logs, or ordinary configuration files. Applications should receive short-lived or tightly scoped credentials where practical. -
Zero-downtime rotation requires overlap: create a new credential, publish it, let clients reload or reconnect, validate connectivity, then revoke the old credential after a grace period. Connection pools must refresh safely; caching a secret forever defeats rotation.
-
Reliability and observability are part of the design. Define timeouts, bounded retries with exponential backoff and jitter, dead-letter or reconciliation handling where needed, structured audit events, and metrics such as
hold-expiry rate,conflict rate,allocation latency, andsecret-refresh failures.
Worked example — Design a Movie-Ticket Booking System's Classes and Prevent Double Booking
In the first 30 seconds, I would clarify whether users select individual seats, how long a payment hold lasts, whether payment is synchronous, and whether a booking may span multiple shows or only one. I would declare that seat-layout metadata is immutable per auditorium version, while availability is modeled per show and seat. I would organize the answer around four pillars: domain classes and state transitions, transactional booking behavior, payment/idempotency integration, and expiry/reconciliation. The central invariant is that one (show_id, seat_id) can have at most one active booking or hold. To enforce it, I would use a conditional database update or a unique constraint over an active reservation representation, then verify the affected-row count inside a transaction. I would keep payment calls outside the seat lock, using HELD with an expiry timestamp and a confirmation endpoint carrying an idempotency key. The explicit tradeoff is between SELECT ... FOR UPDATE, which is straightforward but can reduce throughput, and optimistic conditional updates, which scale better but require conflict handling and retries. I would close by saying that, with more time, I would specify cancellation races, clock handling for expiry, payment webhooks, load-test assumptions, and a reconciliation job for ambiguous payment outcomes.
A second angle — Store, Deliver and Rotate an API Server's Database Credentials
The same discipline applies to database credentials, but the primary invariant changes from unique seat ownership to “only authorized workloads can obtain a usable credential, and rotation never causes avoidable downtime.” I would separate the secret manager, workload identity, credential-delivery mechanism, connection-pool refresh logic, and rotation controller. The key lifecycle is CURRENT → OVERLAPPING → REVOKED, with validation and a grace period between publication and revocation. The main tradeoff is short-lived dynamic credentials, which reduce exposure but add dependency and renewal complexity, versus longer-lived rotated credentials, which are simpler but riskier if leaked. I would also review logs, crash dumps, tracing, environment-variable exposure, and failure behavior when the secret manager is temporarily unavailable.
Common pitfalls
Pitfall: Treating an in-memory seat map or application-level mutex as the concurrency guarantee. Multiple API instances bypass that lock; the database transaction and uniqueness or conditional-write invariant must be authoritative.
A common analytical mistake is saying “use a transaction” without defining what the transaction protects or what happens when payment fails, a request retries, or a hold expires. State the invariant, transition conditions, idempotency behavior, and recovery path explicitly.
A communication mistake is presenting a long class diagram before confirming assumptions. Start with scope, scale, consistency requirements, and failure semantics, then explain only the classes and interfaces that support those decisions.
A depth mistake is recommending a secret vault while ignoring delivery and rotation mechanics. Explain workload authentication, caching, connection-pool refresh, overlapping validity, revocation, and the behavior of a failed refresh.
Connections
An interviewer may pivot to distributed transactions, the outbox pattern, and webhook idempotency when discussing payment or allocation workflows. Other natural pivots are row-level security, RBAC, connection-pool behavior, structured audit logging, and contract or property-based testing.
Further reading
-
Designing Data-Intensive Applications — Martin Kleppmann’s treatment of transactions, concurrency, replication, and consistency tradeoffs.
-
OWASP Secrets Management Cheat Sheet — practical guidance for secret storage, access, rotation, and exposure prevention.
-
Release It! — production failure modes, stability patterns, timeouts, retries, and operational design.
Practice questions
Behavioral & Leadership
You self-rated Behavioral 5/5, but selected leadership themes; keep concise STAR stories ready for onsite.
What's being tested
These prompts test whether you can lead through ambiguity without relying on formal authority: take ownership, communicate clearly, resolve disagreement, adapt plans, and help teammates improve. A strong Software Engineer answer connects behavior to engineering outcomes such as safer releases, faster incident recovery, maintainable code, and reliable handoffs. Salesforce cares because distributed teams operating large, shared systems need engineers who build trust while making technically sound decisions under pressure.
Core knowledge
-
STAR or CAR structure keeps behavioral answers evidence-based: describe the context, your specific actions, and measurable results; reserve most of the answer for decisions and tradeoffs rather than background.
-
Ownership means driving an issue to a durable outcome, not merely completing your assigned code. Show how you clarified responsibility, surfaced risk early, coordinated the right people, and verified the fix through tests, dashboards, or follow-up review.
-
Conflict resolution should separate people from technical claims. State the disagreement, compare alternatives against explicit criteria such as latency, reliability, complexity, and operational cost, then use a lightweight experiment, prototype, benchmark, or design review to resolve uncertainty.
-
Incident response follows a sequence: stabilize customer impact, communicate status and mitigation, preserve evidence, identify the root cause, and prevent recurrence. Distinguish mitigation from remediation; a rollback may restore service while a later code or process change eliminates the defect.
-
Blameless postmortems focus on system conditions and decision paths rather than individual fault. A useful action item has an owner, due date, priority, and verification method—for example, adding a regression test and confirming it catches the original failure mode.
-
Technical handoffs require more than sharing source code. Document architecture, invariants, deployment and rollback steps, dashboards, known failure modes, open decisions, and escalation paths; schedule a walkthrough and have the receiving engineer execute a small task independently.
-
Prioritization under a pivot should make sunk-cost reasoning explicit. Reassess customer or reliability impact, deadline, dependencies, reversibility, and remaining effort; preserve reusable work, record what is abandoned, and renegotiate scope rather than silently working longer.
-
Code review standards are most effective when automated where possible: formatters, linters, static analysis, unit and integration tests, API compatibility checks, and CI branch protection. Reserve human review for design, correctness, security, operability, and maintainability.
-
Coaching starts with diagnosis rather than prescribing. Ask the teammate to explain their approach, identify the specific gap, pair on one representative task, and define a measurable outcome such as reduced review iterations or independently shipped changes.
-
Persuasion without authority combines a clear proposal with evidence and a reversible path. A benchmark, failure reproduction, canary, feature flag, or small design spike is often more persuasive than asserting that one implementation is “best.”
-
Communication during uncertainty should distinguish facts, hypotheses, decisions, and asks. Include impact, current mitigation, owner, next update time, and confidence level; avoid claiming root cause before logs, traces, metrics, or a minimal reproduction support it.
-
Engineering impact should be concrete: reduced
p99latency, fewer rollback events, shorter mean time to recovery, lower defect escape rate, faster onboarding, or fewer review cycles. If the result is qualitative, explain the observable behavior that changed and how you measured it.
Worked example: Answer ownership, conflict, and failure recovery questions
For “Answer ownership, conflict, and failure recovery questions,” a strong candidate first clarifies whether the interviewer wants one integrated incident or separate examples, then states the system context, their role, and the level of customer impact. They should organize the answer around four pillars: what they owned, how they handled disagreement, how they stabilized the failure, and what changed afterward. They might describe discovering that a newly deployed service caused elevated error rates, coordinating rollback with the on-call engineer, and communicating a concise status update to dependent teams. The conflict portion should explain a specific disagreement—for example, whether to patch quickly or wait for a broader refactor—and compare the options using blast radius, reversibility, and time to mitigation. The candidate should explicitly distinguish the immediate rollback from the durable fix, such as adding an integration test and a deployment guard. They should quantify the result with measures such as recovery time, error-rate reduction, or recurrence over subsequent releases. They should also acknowledge their own contribution to the failure without blaming a teammate or hiding behind process. They can close by saying, “If I had more time, I’d also explain how we verified the prevention mechanism in a later release and whether the new alert had acceptable signal-to-noise.”
A second angle
For “Behavioral: Pivoting Mid-Project and Handing Off Work You Owned,” the emphasis shifts from incident recovery to adaptability and continuity. Frame the pivot by explaining what changed, which original assumptions became invalid, and how you re-ranked work rather than simply abandoning it. For the handoff, emphasize operational completeness: current state, design rationale, open risks, test and deployment procedures, and a live walkthrough with the new owner. A strong answer names the tradeoff between maximizing your own delivery and investing time to make another engineer effective. Close with evidence that the transition worked, such as the new owner shipping the next milestone without repeated clarification.
Common pitfalls
Pitfall: Giving a polished team story with no individual contribution. Saying “we aligned and fixed it” does not show leadership; identify the decision you made, the artifact or action you drove, and the measurable engineering result.
A communication mistake is presenting conflict as a personality problem or portraying yourself as the only competent engineer. “I convinced them because my design was clearly better” lands poorly; explain the other view fairly, use shared criteria or evidence, and show how the final decision preserved trust.
Pitfall: Staying shallow on the technical failure. Naming “a bug caused an outage” is insufficient for a Software Engineer; explain the failure mode, why tests or monitoring missed it, how you reduced blast radius, and which concrete change prevents recurrence.
Connections
An interviewer may pivot from these behaviors to distributed-systems failure modes, observability with logs, metrics, and traces, CI/CD safety such as canaries and rollbacks, or API and code-review design tradeoffs. Be ready to connect interpersonal decisions to correctness, operability, and maintainability.
Further reading
-
Google SRE Book — Incident Management — practical guidance on roles, communication, mitigation, and post-incident learning.
-
Google Engineering Practices — Code Review Developer Guide — concrete standards for constructive, technically rigorous review.
Practice questions
Online Assessment — 7 min
Coding & Algorithms
Coding is 4/5, but you selected strings/two-pointers and have new parsing-related ratings, so keep normal depth.
What's being tested
These problems test frequency counting, hash-based lookup, prefix invariants, and careful distinctions between subsequences, substrings, partitions, and anagrams. You should demonstrate how to reduce brute force with counters, sets, or structured scans while stating time and space complexity and handling empty inputs, repeated characters, and boundary positions.
Patterns & templates
-
Frequency signature for anagrams — count characters with a fixed array or map; grouping is
O(nm)fornstrings of lengthm, plus output storage. -
Hash map lookup — store counts, last positions, or canonical keys for expected
O(1)average access; distinguish worst-case guarantees from practical performance. -
Prefix invariant — after each update, verify whether every position in a required prefix is active; track the current prefix boundary instead of rescanning all positions.
-
Greedy partitioning — maintain a character set for the current repeat-free piece; when a duplicate appears, close the piece and reset in
O(n)time. -
Two-pointer subsequence scan — advance through the candidate substring while matching characters from the source; subsequence matching is non-contiguous, substring matching is contiguous.
-
Deletion and substitution evaluation — enumerate each candidate removed character or local replacement, then scan efficiently; avoid mutating the original string repeatedly.
-
Complexity discipline — state whether
O(nm),O(n + alphabet), orO(n²)is acceptable, and include hash-map space plus result/output space.
Common pitfalls
Pitfall: Treating anagrams as sorted strings everywhere can add
O(m log m)per string; frequency vectors are typically faster and deterministic for bounded alphabets.
Pitfall: Confusing a subsequence with a substring leads to invalid matches; explicitly track whether selected characters must remain contiguous.
Pitfall: Rechecking every prefix or partition from scratch hides an avoidable quadratic loop; maintain an invariant and update only the affected state.
Practice these
The practice cards below cover the canonical variants — solve all of them and time yourself.
Practice questions
Other — 11 min
Coding & Algorithms
- Arrays, Strings And Hash Counting — covered in depth under Online Assessment below.