Skip to content
Tech Intuition
Tech Intuition

Appearance

Theme

Signal · Dark with amber

Background

Slow stars and the odd comet

Connect

Read first: How big-tech interviews work, round by round

By the end you will be able to
  • Separate what Microsoft publishes about its interviews from what candidates report, and plan around both.
  • Use the five Well-Architected pillars as the checklist for the trade-off part of your answer.
  • Name the Azure design patterns that match the concepts you already know, concept first and product second.
  • Walk through a complete design (a file sync service) and answer the senior follow-ups it invites.

2 code samples (79 lines), collapsed so the explanation stays in focus.

What Microsoft says about its own interviews

Microsoft's careers site has pages on interview tips and on technical interviewing, and Microsoft's own blogs add advice from recruiters and engineers. Some of those pages are several years old, so treat them as the shape of the interview, not a rulebook. The parts that matter for a design round:

Microsoft publishesWhat to do with it
The technical interview is short, about 45 minutesPractise a design that fits a timebox. Use the plan below.
For system design, know distributed systems, service-oriented and n-tiered architecture, and topics such as resiliency, high availability, auto-scaling, replication, CAP theory and partitioningThat is your syllabus. The next section maps each topic to a lesson here.
Ask clarifying questions and make a plan before you implementThe first ten minutes of the framework.
Talk through your thinking so the interviewer can follow and helpNarrate trade-offs: "I choose X because Y, and it costs Z."
Check your own work, call out corner cases and testIn design, that means failure modes and what breaks at ten times the load.
Use the STAR method for behavioural questions and show that you learn from feedbackBuild the story bank.

Microsoft describes an initial interview and, for candidates who are selected, a final round, with the format depending on the role.

The syllabus Microsoft names, mapped to this site

Microsoft listsWhere to learn it here
Distributed systems, and how to approach the questionA framework for system design interviews
Resiliency and high availabilityLoad balancing and consistency and availability
Auto-scalingLoad balancing and queues and async work
Replication and partitioningReplication and sharding
CAP theoryConsistency and availability
Service-oriented and n-tiered architectureThe Prime Video microservices-to-monolith breakdown shows the trade-off in a real case
A full design, end to endCase study: a URL shortener and the worked design below

HLD

The five Well-Architected pillars as a trade-off checklist

The Azure Well-Architected Framework is organised around five pillars: reliability, security, cost optimization, operational excellence and performance efficiency. Microsoft's own point is that design decisions must be balanced across them, which is exactly what a trade-off discussion is. Use them in the last five minutes: walk your design through each lens and say which one you traded away.

Fig. Review the finished design through five lenses
Fig. Review the finished design through five lenses
PillarThe question to put to your own design
ReliabilityWhat happens when each component fails, and when a whole region does? What recovery time and data loss are acceptable?
SecurityWho can call this? Which data is sensitive, and how is it protected at rest and in transit? How is abuse handled?
Cost optimizationWhich bill grows with traffic or data? What can be cached, tiered to cheaper storage, or expired?
Operational excellenceHow do you deploy safely, watch the system, and learn it is broken before users tell you?
Performance efficiencyWhere is the latency budget spent? What is the first bottleneck at ten times the load?

HLD

Azure patterns worth naming

The Azure Architecture Center keeps a catalog of cloud design patterns. Name a pattern when it clarifies your answer, and always state the idea first.

Pattern in the Azure catalogWhat it doesThe concept on this site
Cache-AsideLoads data into a cache from the data store on demandCaching
RetryRetries a call that failed for a transient reason, with a delay between attemptsThe circuit breaker below
Circuit BreakerStops calling a failing dependency so it can recover and callers fail fastThe circuit breaker below
Queue-Based Load LevelingPuts a queue between a producer and a service to smooth burstsQueues and async work
Competing ConsumersLets several workers take messages from one queueQueues and async work
ShardingSplits a data store into horizontal partitionsReplication and sharding
ThrottlingControls how much of a resource an application, tenant or service may useRate limiting
CQRSSeparates the read model from the write modelConsistency and availability, because the read side lags

The catalog itself suggests pairing Retry with Circuit Breaker, and Queue-Based Load Leveling with Competing Consumers. If you can say why, you understand the patterns rather than the names.

HLD

Fit a Microsoft design answer into 45 minutes

Microsoft's technical guide describes a short interview, so rehearse with a clock. This split leaves room for questions and keeps the trade-off discussion from being squeezed out.

Fig. A 45-minute plan
Fig. A 45-minute plan

HLD

Worked design: a file sync service

This is a practice prompt in the Microsoft product space, written by us. It is not a real interview question, and it does not describe how OneDrive or any other product works. It is a standard design for the problem.

Clarify. Users keep files in a folder that syncs across their devices. They can work offline, see version history and share links. The system must never lose a file, must send only what changed, and should bring online devices up to date within seconds.

Estimate (assumptions, to show the reasoning). Take 50 million users who each store 2 GB across 2,000 files. That is about 100 PB of file data, 100 billion file records, and about 50 TB of metadata at roughly 500 bytes a record. With 4 MB chunks that is up to 25 billion chunks before deduplication. Two conclusions follow: storage cost dominates, so deduplication and cheaper tiers matter, and the metadata is far too large for one database, so it must be sharded.

Fig. The shape of the system
Fig. The shape of the system

The decisions that carry the design:

  • Chunk and hash. Split each file into chunks, hash each one, and store chunks under their hash. A changed file uploads only its new chunks, and identical chunks are stored once. Chunk uploads are safe to retry because the same bytes always have the same name.
  • Commit last. The client uploads missing chunks first, then asks the metadata service to commit a new version: an ordered list of chunk hashes plus the version it was based on. The commit is one transaction on one shard.
  • Metadata is sharded by user (or by shared folder), so a user's whole file tree commits on one shard without a cross-shard transaction.
  • Notify, then pull. The notification carries no file data, only "this folder changed, cursor N". Each device then asks for changes since its own cursor. A lost notification is harmless, because devices also check periodically.
Fig. Saving a changed file, and another device catching up
Fig. Saving a changed file, and another device catching up

LLD

The file sync service data model

filesSQL
  • file_idbigint

    PK
  • namespacebigint

    SHARD KEYINDEX
  • parent_idbigint

    INDEX
  • nametext

  • versionint

  • chunkstext

    ordered list of chunk hashes for the current version

  • deletedbool

chunksblob metadata
  • hashbytes

    SHA-256 of the chunk

    PK
  • sizeint

  • refsint

    how many versions point at it

Chunks are immutable. A chunk is deleted only after refs reaches zero and a grace period passes.

LLD

A circuit breaker in C#

Retry handles a brief blip. A circuit breaker handles a dependency that is really down: after enough failures it stops sending calls, so callers fail fast and the dependency gets room to recover. It has three states.

StateCallsMoves to
ClosedAllowedOpen, after the failure threshold is reached
OpenRejected at onceHalf-open, after the cool-down
Half-openOne probe call allowedClosed if it succeeds, Open if it fails

The clock is passed in, so the behaviour can be tested without waiting. This version is for one thread, to show the logic; for concurrent use, guard the state with a lock.

C# · BreakerState, CircuitBreaker52 lines
using System;
using System.Diagnostics;

public enum BreakerState { Closed, Open, HalfOpen }

public sealed class CircuitBreaker
{
    private readonly int _failureThreshold;
    private readonly TimeSpan _coolDown;
    private readonly Func<DateTime> _now;
    private int _failures;
    private DateTime _openedAt;

    public CircuitBreaker(int failureThreshold, TimeSpan coolDown, Func<DateTime> now)
    {
        _failureThreshold = failureThreshold;
        _coolDown = coolDown;
        _now = now;
        State = BreakerState.Closed;
    }

    public BreakerState State { get; private set; }

    /// <summary>True if the caller may make the call. After the cool-down, exactly one probe is let through.</summary>
    public bool TryAcquire()
    {
        if (State == BreakerState.Closed) return true;
        if (State == BreakerState.Open && _now() - _openedAt >= _coolDown)
        {
            State = BreakerState.HalfOpen;
            return true;
        }
        return false;
    }

    public void RecordSuccess()
    {
        _failures = 0;
        State = BreakerState.Closed;
    }

    public void RecordFailure()
    {
        _failures++;
        if (State == BreakerState.HalfOpen || _failures >= _failureThreshold)
        {
            State = BreakerState.Open;
            _openedAt = _now();
            _failures = 0;
        }
    }
}

A test with a fake clock walks it through every state:

C#27 lines
using System;
using System.Diagnostics;

var clock = new DateTime(2026, 1, 1, 0, 0, 0, DateTimeKind.Utc);
var breaker = new CircuitBreaker(3, TimeSpan.FromSeconds(30), () => clock);

bool firstCall = breaker.TryAcquire();
breaker.RecordFailure();
breaker.RecordFailure();
Debug.Assert(firstCall && breaker.State == BreakerState.Closed);   // two failures: still closed

breaker.RecordFailure();                                           // the third trips it
bool whileOpen = breaker.TryAcquire();
Debug.Assert(breaker.State == BreakerState.Open && !whileOpen);

clock = clock.AddSeconds(31);                                      // the cool-down passes
bool probe = breaker.TryAcquire();
bool second = breaker.TryAcquire();
Debug.Assert(probe && !second && breaker.State == BreakerState.HalfOpen);   // one probe only

breaker.RecordFailure();                                           // the probe failed: open again
Debug.Assert(breaker.State == BreakerState.Open);

clock = clock.AddSeconds(31);
bool secondProbe = breaker.TryAcquire();
breaker.RecordSuccess();                                           // the probe succeeded: closed
Debug.Assert(secondProbe && breaker.State == BreakerState.Closed);

In production you would not write this yourself. .NET 8 ships resilience packages built on Polly: Microsoft.Extensions.Http.Resilience adds a standard pipeline to an HttpClient with AddStandardResilienceHandler(), which combines rate limiting, timeouts, retry and a circuit breaker. Know the mechanism so you can explain what that one line does.

Senior depth

Senior depth: what a deeper Microsoft design round pushes on

Interviewer follow-upL5Two devices edit the same file while offline. What happens when both reconnect?How to answer

Every commit carries the version it was based on. The first device to commit wins. The second commit is rejected because its base is stale, so that device keeps its edit and uploads it as a separate "conflicted copy" next to the original, and the user resolves it. Silently letting the last writer win is the answer to avoid, because it loses someone's work. Structured documents that people edit together need merging (operational transformation or CRDTs), which is a different problem from file sync.

Interviewer follow-upL6How do you avoid re-uploading a 1 GB file when only 1 KB changed?How to answer

Chunk and hash, then upload only chunks the server lacks. With fixed-size chunks, inserting a byte near the start shifts every later boundary, so every chunk changes. Content-defined chunking fixes that: boundaries come from a rolling hash of the content, so an insert changes only the chunks around it. The cost is more client CPU, variable chunk sizes and more metadata per file.

Interviewer follow-upL6How do you make it impossible for metadata to point at a chunk that does not exist?How to answer

Order the operations. Chunks are uploaded first and the metadata commit comes after, and the commit checks that every referenced chunk exists. A crash between the two leaves orphaned chunks, which are harmless. Garbage collection removes a chunk only when nothing references it and after a grace period, so it never races with an upload in flight.

Interviewer follow-upL7You deduplicate across users. What is the privacy risk, and how do you handle it?How to answer

If the server answers "I already have this chunk" for a hash the client sends, an attacker can test whether someone else stored a particular file. Options are to deduplicate only within one account or tenant (costs some storage), or to require proof of ownership before skipping the upload, where the server challenges the client to show it holds the data. Say which you picked and what it costs.

Interviewer follow-upL7A folder is shared with 50,000 people and one file changes. How does notification cope?How to answer

Fan-out per user means 50,000 messages for one change. Publish one event per shared namespace instead, and let the notification tier deliver it to the connections subscribed to that namespace. Devices pull changes with their cursor, and bursts of edits are coalesced so a device is told at most once every few seconds. The shared folder is a hot key, so spread its subscribers across several gateway nodes.

Interviewer follow-upL5How do you roll out a change to this service safely?How to answer

Release in stages: a small share of traffic or one region first, watch error rate and latency against the baseline, and roll back automatically if they degrade. Feature flags separate deploying code from turning it on. This is the operational-excellence pillar in practice: safe deployment and the monitoring to know it worked.

Interviewer follow-upL6A whole region fails. What do clients see?How to answer

It depends on replication. Metadata is replicated across zones inside a region synchronously and to another region asynchronously, so a regional failover can lose the last few commits. Clients detect that their cursor is ahead of the server and re-list changes. Chunks in geo-redundant blob storage are unaffected. State the recovery time and the possible data loss out loud, then say what you would pay to shrink them.

A four-week plan for the Microsoft design round

WeekFocusWhere
1The framework, estimation, load balancing and cachingThe first three system design lessons
2Replication, sharding, queues and consistencyLessons 4 to 6
3Two full designs from a blank page, ending each with the five-pillar wrap-upThe URL shortener, then the file sync design above
4Timed mock designs with a partner, plus your behavioural storiesMock interviews

Sources

Check yourself

QuestionWhich parts of this guide are published by Microsoft and which are reported by candidates?Reveal answer

Published: the short technical interview, the system design topics it lists (distributed systems, resiliency, availability, replication, CAP, partitioning), the advice to clarify, plan, think aloud and test, and the five Well-Architected pillars. Reported: the exact number of rounds and how much weight design carries at each level. Confirm the reported part with your recruiter.

QuestionWhy does the file sync design upload chunks before it commits the metadata?Reveal answer

So metadata can never point at a missing chunk. If the client crashes between the two steps, the result is an orphaned chunk, which is harmless and later garbage-collected. Committing first would leave a file that cannot be downloaded.

QuestionIn a circuit breaker, why is only one probe allowed in the half-open state?Reveal answer

The dependency may still be broken. One probe tests it cheaply, while letting every waiting caller through would hit a struggling service with a flood. A successful probe closes the breaker and a failed one opens it again.

Lesson 4 of 14

Nice. Lock it in, then keep going.

Up next · Lesson 5Amazon interview process for software engineersWhat Amazon publishes about hiring software engineers: the online assessment, the loop of four interviews, the Bar Raiser and the decision, what candidates add (labelled as reported), and a four-week plan.

Send a message

It goes straight to my inbox. I usually reply within a few days.