PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/Atlassian

Design a scalable tagging system

Last updated: Jun 26, 2026

Quick Overview

This question tests a candidate's ability to design scalable data models and distributed indexing strategies for a multi-tenant tagging system. It evaluates system design competency across storage, caching, sharding, and consistency trade-offs — core skills assessed in senior software engineering interviews.

  • hard
  • Atlassian
  • System Design
  • Software Engineer

Design a scalable tagging system

Company: Atlassian

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

##### Question Design a scalable tagging system that lets users attach multiple tags to arbitrary resources (items) and query them efficiently. The system must support creating and managing tags, attaching/removing tags, and high read/write traffic. Address the following: 1. **Tag lifecycle:** Create / get-or-create tags, attach and remove tags from items, and prevent duplicate (item, tag) assignments. 2. **Single-tag query:** Return all items for a given tag, with pagination and sorting (e.g., by recency). 3. **Multi-tag query (AND / OR):** Return items matching a combination of tags, supporting both intersection (AND) and union (OR). 4. **Top-N per tag:** Efficiently list the top-N items for a tag (e.g., by recency or score). 5. **Counts:** Return the number of items per tag. 6. **Autocomplete / suggestions:** Prefix-based tag autocomplete and (optionally) related-tag suggestions. 7. **Data model & storage:** Specify the data model and storage choices for tags, items, and assignments. 8. **Indexing:** Indexing strategy for fast writes and reads, including an inverted index (tag → items) and forward index (item → tags), plus secondary indexes to handle high-cardinality / skewed tags. 9. **Caching:** What to cache, cache-invalidation strategy, and hot-key handling. 10. **Sharding / partitioning:** How to partition the OLTP store and the index, including multi-tenancy isolation and hot-tag mitigation. 11. **Consistency:** Choose and justify a consistency model (eventual vs. strong) and explain how to support read-your-writes. 12. **De-duplication, rename, and merge:** How tag de-duplication, renaming, and merging two tags are handled. 13. **Access control:** Tenant isolation and per-resource ACL filtering. 14. **Pagination:** A stable, scalable pagination strategy. 15. **Backfill & cleanup:** Reindex/backfill jobs and cleanup of orphan tags and drifted counters. 16. **Capacity, monitoring, and SLAs:** Provide order-of-magnitude capacity estimates and describe the key metrics, alerts, and SLOs.

Quick Answer: This question tests a candidate's ability to design scalable data models and distributed indexing strategies for a multi-tenant tagging system. It evaluates system design competency across storage, caching, sharding, and consistency trade-offs — core skills assessed in senior software engineering interviews.

Related Interview Questions

  • Design a simple greeting-card web app - Atlassian (medium)
  • Design a distributed rate limiter service - Atlassian (medium)
  • Design a Data Stream Processor - Atlassian (easy)
  • Design a scalable chatbot platform - Atlassian (medium)
  • Diagnose why a scaled system became slow - Atlassian (medium)
|Home/System Design/Atlassian

Design a scalable tagging system

Atlassian logo
Atlassian
Aug 4, 2025, 10:55 AM
hardSoftware EngineerTechnical ScreenSystem Design
21
0

Design a scalable, multi-tenant tagging system that lets users attach multiple tags to arbitrary resources ("items") and query them efficiently. The system must support creating and managing tags, attaching and removing tags, and sustained high read and write traffic.

Your design should address the following deliverables:

  1. Tag lifecycle — create / get-or-create tags, attach and remove tags from items, and prevent duplicate (item, tag) assignments.
  2. Single-tag query — return all items for a given tag, with pagination and sorting (e.g., by recency).
  3. Multi-tag query (AND / OR) — return items matching a combination of tags, supporting both intersection (AND) and union (OR).
  4. Top-N per tag — efficiently list the top-N items for a tag (e.g., by recency or score).
  5. Counts — return the number of items per tag.
  6. Autocomplete / suggestions — prefix-based tag autocomplete and (optionally) related-tag suggestions.
  7. Data model & storage — specify the data model and storage choices for tags, items, and assignments.
  8. Indexing — an indexing strategy for fast writes and reads, including an inverted index (tag → items) and a forward index (item → tags), plus a way to handle high-cardinality / skewed tags.
  9. Caching — what to cache, the cache-invalidation strategy, and hot-key handling.
  10. Sharding / partitioning — how to partition the OLTP store and the index, including multi-tenancy isolation and hot-tag mitigation.
  11. Consistency — choose and justify a consistency model (eventual vs. strong) and explain how to support read-your-writes.
  12. De-duplication, rename, and merge — how tag de-duplication, renaming, and merging two tags are handled.
  13. Access control — tenant isolation and per-resource ACL filtering.
  14. Pagination — a stable, scalable pagination strategy.
  15. Backfill & cleanup — reindex/backfill jobs and cleanup of orphan tags and drifted counters.
  16. Capacity, monitoring, and SLAs — order-of-magnitude capacity estimates plus the key metrics, alerts, and SLOs.

Constraints & Assumptions

Treat these as the working numbers unless the interviewer changes them — state them explicitly and design against them.

  • Scale: ~100M items, average ~8 tags/item → on the order of ~800M (item, tag) assignments.
  • Skew: tag popularity is Zipfian; the top ~1% of tags hold roughly half of all assignments, and a handful of "hot" tags have tens of millions of items.
  • Traffic: reads dominate writes by roughly 10:1; both are sustained and high (order of tens of thousands of reads/sec, thousands of writes/sec).
  • Latency: read p95 in the tens-to-low-hundreds of milliseconds; writes must be durable and correct.
  • Multi-tenancy: strict tenant isolation; tags are scoped per tenant (Atlassian-style — tags live inside a site/instance, not in one global namespace).
  • Items are opaque references identified by (tenant_id, item_id) ; the tagging system stores references, not item bodies. Full-text search of item content is out of scope.
  • Tolerable staleness: counts and ordering may lag by seconds; the assignment itself (did the attach succeed?) must be strongly consistent.

Clarifying Questions to Ask

A strong candidate scopes the problem before designing. Reasonable questions to raise up front:

  • Are tags scoped per tenant, per project, or globally shared? Are tag names case-sensitive, and what is the normalization rule?
  • What is the read:write ratio and the absolute QPS we should design for, and what is the latency SLO per query type (single-tag, multi-tag, autocomplete)?
  • How fresh must query results be — is seconds of staleness acceptable for counts and ordering, and must a user see their own just-applied tag immediately (read-your-writes)?
  • Do queries need per-resource access-control filtering (can two users tagging the same tenant see different result sets), or is tenant-level isolation sufficient?
  • What sort orders must we support for single-tag and multi-tag queries (recency, a relevance/score, multiple)?
  • Are exact counts required, or are approximate (eventually consistent) counts acceptable for the common case?

What a Strong Answer Covers

The interviewer is evaluating breadth across the deliverables and depth on the hard parts. A strong answer demonstrates the following dimensions (these are the things to cover, not the answers):

  • Requirements & sizing — separates functional from non-functional needs, states explicit capacity estimates, and identifies skew and write fan-out as the core challenges.
  • Architecture & rationale — a clear high-level design (e.g. a source-of-truth store vs. read indexes) with a justified reason for the split and how the two stay in sync.
  • Data model — concrete schema for tags, items, and assignments; how the model itself enforces de-duplication, idempotency, and tenant isolation.
  • Query execution — algorithms for single-tag, AND, OR, top-N, counts, and autocomplete — not just "use a search engine," but how each is served cheaply and how counts avoid COUNT(*) on the hot path.
  • Skew & hot-key handling — a concrete strategy for high-cardinality tags across the index, cache, and write path.
  • Consistency & read-your-writes — an explicit, defended choice (strong where it matters, eventual where it's affordable) and a mechanism to mask staleness where a user would notice.
  • Lifecycle correctness — de-dup, rename, and merge handled without breaking existing references or moving stable identifiers.
  • Multi-tenancy & access control — structural tenant isolation and a strategy (pre- vs. post-filter) for per-resource ACLs, with awareness of the trade-offs.
  • Pagination — a stable, scalable cursor/keyset scheme that works across shards.
  • Operability — backfill/reindex with zero downtime, counter-drift reconciliation, orphan cleanup, and concrete SLOs, metrics, and alerts (including the single most important health signal).
  • Trade-off articulation — naming alternatives (search engine vs. custom postings, pre- vs. post-filter ACLs, strong vs. eventual) and defending the choice rather than asserting one right answer.

Follow-up Questions

  • A single tag has grown to 60M items and its queries are timing out. Walk through exactly how you detect this, split it, and migrate live traffic without downtime or lost writes.
  • A tenant complains that an item they tagged 30 seconds ago still doesn't appear when they query that tag. Diagnose the possible causes and describe how your design prevents (or bounds) this.
  • The per-tag usage_count has drifted from the true number of assignments after a partial outage. How did it drift, how do you detect and reconcile it, and how do you keep it from drifting again?
  • How would you extend the design to support tag-based access control changes (a resource's ACL changes) without serving stale "you can see this" results in multi-tag queries?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Atlassian•More Software Engineer•Atlassian Software Engineer•Atlassian System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.