← Perplexity AI Interview Insights

Perplexity AI·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Apr 2026

Summary

System design question at Perplexity AI for a software engineering role. Just the one question from what I can tell, focused on database selection for a chat app.

Questions Asked (1)

Q1

You're building a chat application. How do you choose between a SQL and a NoSQL database?

System DesignTechnical Trade-offsData Modeling
Author's notes

I went straight to the access patterns, which felt right.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the chat application's requirements—scale, consistency needs, message patterns, and query types—then map those to the strengths of SQL vs. NoSQL. Recommend a hybrid approach where appropriate, and justify your choice with concrete trade-offs rather than declaring one database universally better.

Pro tip: Mention that many production chat systems (e.g., Discord, WhatsApp) use a hybrid architecture: NoSQL for high-volume message storage and SQL for user metadata, billing, or analytics. This shows you think in terms of polyglot persistence and real-world system design.

1. Clarify requirements

Ask about scale (users, messages per second), consistency needs (strong vs. eventual), query patterns (recent messages, search, analytics), and latency requirements. This grounds the decision in actual needs rather than preferences.

2. Evaluate data model and access patterns

Chat messages are typically write-heavy, append-only, and accessed by conversation ID with time-ordering. This favors NoSQL (e.g., Cassandra, DynamoDB) for horizontal scaling and flexible schemas, while relational databases excel at complex joins and transactions for user data.

3. Compare trade-offs

Discuss SQL's ACID guarantees, mature tooling, and complex query support versus NoSQL's scalability, availability, and schema flexibility. Highlight that NoSQL often sacrifices strong consistency for partition tolerance and speed.

4. Propose a hybrid or single solution

Recommend a polyglot approach: NoSQL for message storage and SQL for user profiles, contacts, and billing. If forced to choose one, justify based on the dominant requirement (e.g., scale → NoSQL; transactions → SQL).

5. Address operational concerns

Mention factors like team expertise, operational overhead, backup/restore, and cost. Acknowledge that the best technical choice may be constrained by organizational realities.

Key Points to Mention

  • CAP theorem and the trade-off between consistency and availability
  • Write-heavy, append-only nature of chat messages and time-series access patterns
  • Need for horizontal scaling and low-latency reads at high volume
  • ACID transactions for user data vs. eventual consistency for messages
  • Polyglot persistence: using both SQL and NoSQL for different parts of the system
  • Real-world examples: Discord (Cassandra + SQL), WhatsApp (SQLite + custom storage)

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