← Salesforce Interview Insights

Salesforce·Backend Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

System design round at Salesforce for a backend engineer role, focused entirely on building the analytics backend for a ChatGPT-style product. No frontend, no model internals, just the data pipeline and serving layer. Pretty deep scope for a single question.

Questions Asked (1)

Q1

Design the analytics backend for a ChatGPT-like product. The system should ingest events from upstream services (chat sessions, messages, user accounts), store and aggregate the data, and serve a metrics dashboard. Cover what metrics to track, the ingestion pipeline, storage layer, query/serving layer, slicing dimensions, freshness vs. cost trade-offs, and PII/data-governance concerns.

System DesignProduct Analytics & MetricsTechnical Trade-offs
Author's notes

This one sprawled fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then walk through the end-to-end pipeline from ingestion to dashboard, explicitly calling out trade-offs at each layer. Anchor the design around key metrics and slicing dimensions, and weave in PII and governance considerations throughout.

Pro tip: Emphasize that analytics should be decoupled from the transactional path via an event bus or CDC, and propose a tiered storage strategy (hot/warm/cold) to balance freshness and cost. Also, proactively mention data governance (PII masking, retention policies) as a first-class concern, not an afterthought.

1. Clarify requirements and scope

Ask about scale (events/sec, data volume), latency needs, key metrics, and compliance constraints. Define what 'freshness' means for different consumers (e.g., real-time vs. daily).

2. Define metrics and slicing dimensions

List core metrics (e.g., DAU/WAU/MAU, messages per session, session duration, error rates, token usage) and slicing dimensions (time, user cohort, model version, geography, device).

3. Design ingestion pipeline

Propose a scalable, fault-tolerant ingestion layer using a message queue (e.g., Kafka) with schema validation, deduplication, and dead-letter queues. Consider CDC for database changes and batch uploads for historical data.

4. Design storage and serving layers

Choose a tiered storage approach: hot storage (e.g., Druid, ClickHouse) for real-time dashboards, warm storage (e.g., S3 + Parquet) for ad-hoc queries, and cold storage (e.g., Glacier) for archival. Implement pre-aggregation and materialized views for fast queries.

5. Address trade-offs and governance

Discuss freshness vs. cost (streaming vs. batch, pre-aggregation vs. raw), and PII handling (tokenization, encryption, access controls, retention policies). Ensure compliance with GDPR/CCPA.

Key Points to Mention

  • Decouple analytics from transactional systems using event streaming (e.g., Kafka) or CDC to avoid impacting production performance.
  • Use a tiered storage architecture (hot/warm/cold) and pre-aggregation to balance query latency and cost.
  • Define clear metrics and slicing dimensions aligned with business goals (e.g., engagement, performance, adoption).
  • Implement data governance: PII identification, masking/tokenization, encryption, access control, and retention policies.
  • Consider scalability and fault tolerance: partitioning, replication, backpressure, and exactly-once semantics.
  • Leverage Salesforce-specific context: multi-tenant architecture, Trust Layer, and integration with existing Salesforce analytics (e.g., CRM Analytics).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.