← Atlassian Interview InsightsSoftware Engineer

Atlassian·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Atlassian software engineer interview with a system design question focused on a content popularity tracker. Pretty classic design problem but the distributed scaling angle made it more interesting than I expected.

Questions Asked (1)

Q1

Design a system that tracks content popularity on a social media platform, supporting operations to increase a score, decrease a score, and retrieve the most popular content at any time. Walk through your data structure choices, time complexity trade-offs, and how you'd scale this across multiple servers.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

I went straight to a hash map plus a max-heap combo and felt pretty good about it until they pushed on the decrease operation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a data structure like a hash map for scores and a heap or balanced BST for ranking, discussing time complexity trade-offs. Finally, address scaling with sharding, distributed caching, and eventual consistency.

Pro tip: Emphasize that the choice between a heap and a balanced BST depends on the read/write ratio and whether you need to retrieve top K items; also mention that using a heap with lazy deletion can handle updates efficiently.

1. Clarify Requirements and Scale

Ask about expected number of content items, update frequency, read patterns (e.g., top 1 vs top K), and consistency requirements. This guides data structure and scaling choices.

2. Design Core Data Structures

Propose a hash map for O(1) score updates and a heap or balanced BST for O(log n) retrieval of most popular content. Discuss trade-offs: heap gives O(1) peek but O(log n) updates; BST gives O(log n) for both but more overhead.

3. Analyze Time Complexity and Trade-offs

Compare operations: increase/decrease score O(1) with hash map, but updating heap/BST O(log n). Retrieving top item O(1) with heap, O(log n) with BST. Mention lazy deletion for heap updates to avoid O(n) removal.

4. Scale Across Multiple Servers

Discuss sharding by content ID, using a distributed cache (e.g., Redis) for scores, and a message queue for updates. For global top K, use a two-tier approach: local top K per shard, then merge.

5. Address Consistency and Fault Tolerance

Choose between strong consistency (e.g., using a distributed lock or consensus) and eventual consistency (e.g., CRDTs or periodic reconciliation). Mention replication and failover for high availability.

Key Points to Mention

  • Hash map for O(1) score updates and heap/BST for O(log n) ranking.
  • Lazy deletion in heap to handle score updates without O(n) removal.
  • Sharding by content ID to distribute load and scale horizontally.
  • Two-tier aggregation for global top K: local top K per shard, then merge.
  • Trade-offs between strong and eventual consistency for score updates.
  • Use of distributed cache (e.g., Redis) for fast score reads and writes.

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