← Atlassian Interview Insights

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

Senior
Jun 2026

Summary

System design round at Atlassian focused on concurrency in a hierarchical org structure. Pretty deep question with a lot of moving parts, felt like they wanted to see how far you could push the design before it fell apart.

Questions Asked (3)

Q1

Given an organization hierarchy with users and groups, design thread-safe add and remove operations. Walk through your API design, your concurrency strategy, and how you'd avoid deadlocks.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one sprawled way more than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and defining the API for add/remove operations on users and groups. Then discuss concurrency strategies like fine-grained locking or lock-free approaches, and explain how to avoid deadlocks through lock ordering or timeouts. Finally, analyze trade-offs and potential edge cases.

Pro tip: Mention that you would use a read-write lock to allow concurrent reads while ensuring exclusive writes, and that you would acquire locks in a consistent global order (e.g., by ID) to prevent deadlocks. This shows practical experience with concurrency control.

1. Clarify Requirements and Scope

Ask about expected read/write ratio, consistency requirements, and whether operations can be batched. Define the API methods (e.g., addUserToGroup, removeUserFromGroup) and their parameters.

2. Design the API

Propose method signatures that are intuitive and thread-safe. Consider returning success/failure or throwing exceptions for invalid operations. Discuss idempotency and error handling.

3. Choose Concurrency Strategy

Evaluate options: coarse-grained locking (simple but low concurrency), fine-grained locking (better concurrency but complex), or lock-free using concurrent data structures. Recommend a hybrid approach based on requirements.

4. Avoid Deadlocks

Explain techniques: lock ordering (always acquire locks in a predefined order), lock timeouts, or using a single lock for related operations. Mention deadlock detection and recovery if applicable.

5. Discuss Trade-offs and Edge Cases

Compare performance, scalability, and complexity of different strategies. Address edge cases like concurrent add/remove on the same user-group pair, and how to maintain consistency.

Key Points to Mention

  • Use of read-write locks to allow concurrent reads and exclusive writes.
  • Fine-grained locking on individual users and groups to increase concurrency.
  • Lock ordering by unique identifiers (e.g., user ID, group ID) to prevent deadlocks.
  • Consideration of lock-free data structures like ConcurrentHashMap for high concurrency.
  • Handling of cyclic group memberships and ensuring no deadlocks in such cases.
  • Trade-offs between consistency, performance, and complexity.

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

Q2

How do you guarantee that reads are consistent while writes are happening concurrently, especially for long-running read queries?

System DesignTechnical Trade-offs
Author's notes

Talked about linearizability vs read-consistency and they seemed fine with me drawing the distinction, but I got a bit tangled when they asked specifically about long-running reads.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the consistency requirements (e.g., strong vs. eventual) and the specific read patterns (e.g., long-running analytical queries vs. point reads). Then discuss concrete techniques like MVCC, snapshot isolation, and read replicas with staleness bounds, and explain how they apply to the given scenario. Finally, highlight trade-offs between consistency, latency, and throughput, and how you would choose based on business needs.

Pro tip: Emphasize that 'guarantee' is often about defining acceptable staleness and using mechanisms like consistent snapshots or versioned reads—not necessarily locking. Show you understand that long-running reads can be served from a snapshot without blocking writes, which is key for scalability.

1. Clarify requirements and constraints

Ask about the consistency level needed (strong, bounded staleness, eventual), read/write patterns, and latency/throughput goals. This ensures your solution aligns with actual needs.

2. Choose a consistency model

Select an appropriate model such as snapshot isolation, read-your-writes, or monotonic reads. Explain how it guarantees consistency for long-running queries.

3. Describe implementation techniques

Detail mechanisms like MVCC, versioned data, read replicas with sync/async replication, or distributed snapshots. Explain how they prevent anomalies during concurrent writes.

4. Address long-running read challenges

Discuss how to handle queries that run for minutes/hours: e.g., snapshot isolation to avoid blocking writes, or using a separate read-only replica with a consistent snapshot.

5. Evaluate trade-offs and failure modes

Compare options on latency, throughput, complexity, and consistency guarantees. Mention potential issues like replica lag, snapshot expiration, or increased storage.

Key Points to Mention

  • MVCC (Multi-Version Concurrency Control) and snapshot isolation
  • Read replicas with synchronous vs. asynchronous replication and staleness bounds
  • Versioning or timestamp-based reads for consistent snapshots
  • Trade-offs between consistency, latency, and throughput
  • Handling long-running queries without blocking writes (e.g., snapshot reads)
  • Real-world examples like PostgreSQL's MVCC, Amazon Aurora, or Google Spanner

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

Q3

How would you test for concurrency correctness in this system? What does your testing strategy look like?

System DesignTechnical Trade-offs
Author's notes

Went straight to stress tests and race detection tooling.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's concurrency model and critical sections, then outline a layered testing strategy that combines static analysis, stress testing, and deterministic verification. Emphasize how you would reproduce and debug concurrency bugs, and tie your approach to Atlassian's scale and reliability needs.

Pro tip: Mention that you prioritize testing for liveness and safety properties separately, and use tools like ThreadSanitizer or Java's jcstress to catch subtle races early. Also, highlight the importance of testing under realistic load and failure conditions, not just unit tests.

1. Identify concurrency model and critical sections

Understand the system's threading model, shared state, and synchronization primitives. Map out critical sections and potential race conditions.

2. Static analysis and code review

Use static analyzers (e.g., FindBugs, ThreadSanitizer) and conduct focused code reviews to catch common concurrency pitfalls like unsynchronized access.

3. Deterministic and stress testing

Write deterministic tests using controlled scheduling (e.g., jcstress) and stress tests with high thread counts and varying loads to expose races and deadlocks.

4. Property-based and model checking

Define safety and liveness properties and use model checking (e.g., TLA+) or property-based testing to verify them under all interleavings.

5. Production monitoring and chaos testing

Instrument production for concurrency metrics and run chaos experiments (e.g., kill threads, inject delays) to validate resilience under real-world conditions.

Key Points to Mention

  • Race conditions and data races: detection and prevention
  • Deadlock, livelock, and starvation scenarios
  • Memory consistency and visibility (e.g., Java Memory Model)
  • Tools: ThreadSanitizer, jcstress, Helgrind, model checkers
  • Testing under load and failure injection (chaos engineering)
  • Reproducibility and debugging of concurrency bugs

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