AlgoViz

The AWS DynamoDB DNS outage of 2025

hard 32 min

On October 19 and 20, 2025 two automatic programs raced while updating the DNS record of DynamoDB in the N.

See it run

Replay the race, the collapse and the flapping checks, then the repaired design. Plan numbers are examples.

Operations

The race

The order of events in the AWS summary.

Step 1 of 8

Plans arrive

DNS PlannerPlan storeplans 3, 4, 9Enactor AEnactor BRegional recordplan 3

The Planner writes plan after plan. The record uses plan 3.

Step 1: Plans arrive

def enactor(plan):    if plan <= record.plan: return    # checked once    for endpoint in endpoints:        retry(write, endpoint, plan)  # may take very long    clean_up(older_than=plan - many)def clean_up(older_than):    for p in plans:        if p < older_than: delete(p)  # even if in use
Shows
An empty record
Costs
157 minutes without DNS

Look at the moment between the check and the write.

In the real world

The same the aws dynamodb dns outage of 2025 doing real jobs. Pick one and step through it.

One service in the east region, with no second region.

Step 1 of 4

Before

name?replicateYour serviceDNSaddressesDynamoDB eastDynamoDB westreplica

The name has addresses. Calls succeed.

Step 1: Before

Common mistakes

The bugs interviewers watch for, with the fix beside each.

  • Check, wait, write

    critical

    The answer of the check may be false when the write happens.

    Wrong
    if plan > record.plan:    slow_work()    record.plan = plan
    Right
    slow_work()write_if(record, plan, where="plan > record.plan")
  • Deleting by age only

    critical

    An old version may be in use.

    Wrong
    delete(p for p in plans if p < limit)
    Right
    delete(p for p in plans if p < limit and p not in used)
  • Retrying the whole backlog

    major

    Work that expires before it finishes is pure load.

    Wrong
    for d in droplets: queue.put(d)
    Right
    for d in newest(droplets, limit): run(d)
  • Unlimited automatic removal

    major

    A wrong check can remove healthy capacity.

    Wrong
    if not check(n): remove(n)
    Right
    if not check(n) and removed < limit: remove(n)

Interview tips

  • How to explain it

    • Late Enactor, stale check, old plan.
    • Clean-up deleted the plan in use.
    • Empty DNS record, healthy servers.
  • Numbers worth knowing

    • 11:48 PM to 2:25 AM: DNS.
    • 14 h 32 min in total.
    • 3 Enactors in 3 zones.
  • Race, erase, backlog

    • Race: fence the write.
    • Erase: protect what is used.
    • Backlog: admit what can finish.
  • Do not say

    • The tables were lost.
    • A lock alone solves it.
    • Running instances failed.