Design Permission-Aware Search Across a Company's SaaS Apps
Last updated: November 29, 2026
Quick Overview
Design an enterprise search system that indexes content from dozens of SaaS tools for a single customer and returns relevant results in under 500 ms, never showing a user a document they cannot open in the source app.
Glean
November 29, 20260
0
0 solved
Design an enterprise search system that indexes content from dozens of SaaS tools for a single customer and returns relevant results in under 500 ms, never showing a user a document they cannot open in the source app.
This is the core of what Glean builds, so a system design round for backend or search infrastructure roles often centers on it. Interviewers look for permission enforcement inside retrieval rather than as a post-filter, a credible ingestion and freshness story, and ranking that uses enterprise signals such as activity and the people graph.
What the Interviewer Expects
- Separates ingestion (connectors, normalization), indexing, permission sync and query serving
- Enforces ACLs as a filter inside retrieval using precomputed principal sets
- Explains freshness targets for content versus permission changes and how each is propagated
- Combines lexical and semantic retrieval with a learned re-ranker using activity and graph features
- Addresses per-customer isolation and data residency
- Plans for connector rate limits and partial outages
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- A user is removed from a Slack channel. What is your worst-case time until its messages stop appearing, and how do you bound it?
- How do you rank well for a 2,000-person customer with very little click data?
- Some sources cannot be crawled fully, such as email. When would you query them live instead?
- How would you reindex everything after changing the embedding model without downtime?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: search across Drive, Confluence, Slack, Jira, Salesforce and similar for one customer; filters by app, author, date; snippets. Non-functional: p95 under 500 ms; zero permission leaks; new ...
High-Level Design
- Connectors per source pull content, metadata, ACLs and activity via APIs and webhooks, writing normalized documents to a durable queue.
- Processing: extract text, chunk, compute embedding...