Design a Rate-Limited Incremental Crawler for SaaS Connectors

Last updated: November 29, 2026

Quick Overview

Design the service that keeps a customer's index in sync with sources like Google Drive, Jira and Confluence: initial full crawl, ongoing incremental updates, deletions and permission changes, all within each vendor's API rate limits.

Glean
System Design
Software Engineer
Glean
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the service that keeps a customer's index in sync with sources like Google Drive, Jira and Confluence: initial full crawl, ongoing incremental updates, deletions and permission changes, all within each vendor's API rate limits.

Glean's value depends on hundreds of connectors that ingest content, metadata and ACLs without getting throttled or banned by vendor APIs. This round checks whether a candidate can design scheduling under quotas, resumable crawls, idempotent writes and a clear plan for deletions, which are easy to miss.

What the Interviewer Expects
  • Separates a scheduler, per-source workers and a write path into the index
  • Enforces per-tenant, per-source token buckets that match vendor quotas, with backoff on 429
  • Uses change cursors or webhooks for incremental sync and checkpoints for resumability
  • Handles deletions and permission changes explicitly, with periodic reconciliation
  • Makes writes idempotent keyed by source document id and version
  • Prioritizes permission updates over content updates
Key Topics to Cover
web crawling
rate limiting
change data capture
idempotency
job scheduling
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A customer connects a Drive with 30 million files. How long does the first crawl take and how do you prioritize what gets indexed first?
  • A vendor's webhooks are unreliable. How do you detect missed events?
  • How do you share a single API quota between content, permission and activity crawls?
  • How do you safely roll out a connector code change across hundreds of customers?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Full crawl of a new source, then incremental sync with new content searchable within about 5 minutes and permission removals within about 1 minute where the API allows. Must respect vendor limits (for...

High-Level Design
  • Scheduler holds crawl tasks per (tenant, source): full-crawl pages, incremental-poll ticks, reconciliation sweeps.
  • Rate limiter: a token bucket per (tenant, source, credential) sized to th...

Submit Your Answer
Markdown supported

Related Questions