Level: AdvancedInterview

Go System Design Scenarios: Build It at Scale

Updated 11 min read
Go System Design Scenarios featured image: short link, rate limit and sharding cards

These Go system design scenarios ask you to design real services, from URL shorteners and rate limiters to chat, feeds and payment flows. Each one adds a twist such as scale, failure or cost, so you practise the follow-up questions too. We gathered them from public interview lists and design rounds, then rewrote each one in our own words.

This post is questions only, so answer each one in your own words first. When you need help, read our post on microservices, Go Redis caching and Go rate limiting. Also, finish our post on security scenarios first, because every design needs a trust model.

How to Use These Go System Design Scenarios

For each of these Go system design scenarios, follow four steps in order. First, ask about scope and numbers. Then sketch the main parts, go into detail on one hard part, and finish with trade-offs and failure modes.

The table below lists each section and its number of questions.

SectionWhat it testsQuestions
Classic designsShortener, limiter, queue and more15
Real-time systemsChat, push and live data15
Data-heavy systemsFeeds, search and analytics15
Scale and reliabilityReplicas, regions and failure15
Storage and cachingSQL, key-value, objects and caches15
Interview approachScope, numbers and trade-offs15
Go System Design Scenarios diagram showing six kinds of design problems for Go backends
The six kinds of design problems covered in this question list.

Go System Design Scenarios for Classic Services

Before you answer, study Go REST API tutorial and Go database tutorial. These Go system design scenarios are the classics that appear in most design rounds.

  1. Design a URL shortener that handles 1,000 new links and 100,000 redirects per second, so where would you start?
  2. Your short codes must never collide, so would you hash URLs or use counters?
  3. When a rate limiter must work across 20 API pods, where does its state live?
  4. A job queue must retry failed jobs with backoff, so how would you design it in Go?
  5. Imagine a pastebin that stores text for 30 days, then how would you expire old pastes?
  6. Your file upload service must accept 2 GB files, so how would you avoid holding them in memory?
  7. After launch, one short link gets 50 percent of all traffic, so what would you add?
  8. A unique ID generator must work without a central database, so which approach would you pick?
  9. When a cron service must run 10,000 scheduled jobs per minute, how would you split the work?
  10. Your webhook delivery service must retry for 24 hours, so how would you store pending attempts?
  11. A key-value store must survive one node failing, so how would you replicate data?
  12. When a leaderboard must update in real time for a million players, what structure would you use?
  13. A config service must push changes to 500 pods quickly, so would you push or poll?
  14. Scenario: when the interviewer cuts your budget in half, which parts of your design would you simplify?
  15. Scenario: when the interviewer asks what fails first at ten times the load, how would you answer?

Go System Design Scenarios for Real-Time Systems

Before you answer, study Go WebSockets chat and Go server-sent events. Real-time systems hold many open connections, so these Go system design scenarios test that load.

  1. Design a chat service for 100,000 users online at once, so how many Go servers would you start with?
  2. Your WebSocket server must send a message to a user connected to another pod, so how would you route it?
  3. When a user goes offline, how would you store and deliver missed messages?
  4. A live sports score must reach a million clients within a second, so which transport would you pick?
  5. Imagine typing indicators in a group chat, then how would you avoid flooding the server?
  6. Your notification service sends push, email and SMS, so how would you handle provider failures?
  7. After a deploy, every WebSocket client reconnects at once, so how would you smooth the spike?
  8. A ride app must show driver locations every two seconds, so how would you store and fan them out?
  9. When chat messages must keep order per conversation, how would you guarantee it?
  10. Your presence system shows who is online, so how would you handle flaky mobile networks?
  11. A stock ticker sends 10,000 updates per second, so how would you batch them for browsers?
  12. When all members of a 50,000 member group must read a message, how would you fan it out?
  13. Your server holds 200,000 open connections, so what limits on the machine would you check?
  14. Scenario: when users complain about duplicate chat messages, where would you add deduplication?
  15. Scenario: when a region goes down, how would chat users reconnect to another region?

Go System Design Scenarios for Data-Heavy Systems

Before you answer, study Go PostgreSQL with pgx and Go pagination. Data grows faster than traffic, so these Go system design scenarios test storage and reads.

  1. Design a news feed for 10 million users, so would you build feeds on write or on read?
  2. Your feed must handle a celebrity with 20 million followers, so how would you change the plan?
  3. When a product search must answer in 100 ms over 50 million items, what would you add?
  4. An analytics service ingests 1 million events per minute, so how would you store them?
  5. Imagine a dashboard that needs daily totals over two years of data, then how would you precompute them?
  6. Your e-commerce site needs a recently viewed list per user, so where would you store it?
  7. After a year, one table holds 2 billion rows, so how would you partition it?
  8. A reporting query slows down the main database, so where would you move it?
  9. When nobody may ever change an audit log, how would you store it?
  10. Your search index lags behind the database by minutes, so how would you keep it in sync?
  11. A data export for big customers takes hours, so how would you run it in the background?
  12. When storage costs grow 30 percent a month, what data would you move to cheaper storage?
  13. A recommendation feature needs data from many services, so how would you build its input?
  14. Scenario: when a feed shows posts out of order, which part of the design would you check?
  15. Scenario: when product wants real-time analytics instead of daily reports, what changes?

Go System Design Scenarios for Scale and Reliability

Before you answer, study Go health checks and Go graceful shutdown. Big systems fail in parts, so these Go system design scenarios test how yours keeps running.

  1. Your service must stay up if one data center fails, so how would you deploy it?
  2. A payment flow must never lose a payment, even during crashes, so how would you design it?
  3. When traffic grows ten times during a sale, how would you prepare the system?
  4. A single database is the bottleneck, so would you add replicas, shard or cache first?
  5. Imagine a global app with users in India, Europe and the US, then where would you put data?
  6. Your SLO is 99.9 percent, so how much downtime per month does that allow?
  7. After a region failover, some users see old data, so how would you explain and limit it?
  8. A queue between two services backs up during peaks, so how would you size consumers?
  9. When a dependency has no SLA, how would you protect your own SLO?
  10. Your system must handle a sudden bot attack, so where would you stop it?
  11. A deploy must never take the whole system down, so how would you roll out changes?
  12. When should you choose consistency over availability?
  13. Your team must cut cloud costs by 40 percent, so which parts would you redesign?
  14. Scenario: when the interviewer kills your primary database mid-design, what happens next in your system?
  15. Scenario: when your design has a single point of failure, how would you find and remove it?

Go System Design Scenarios for Storage and Caching

Before you answer, study Go sqlc vs GORM and Go in-memory cache. Storage choices shape everything else, so these Go system design scenarios test your reasons.

  1. A new service needs transactions and joins, so would you pick SQL or a key-value store?
  2. Your app stores user uploads, so would they go in the database or in object storage?
  3. When a cache sits in front of the database, how would you keep them in sync?
  4. A hot key gets 100,000 reads per second, so how would you spread the load?
  5. Imagine a shopping cart for guest users, then where would you store it, and for how long?
  6. Your session data must survive pod restarts, so where would you keep it?
  7. After choosing NoSQL, the team needs complex reports, so what would you do?
  8. A counter such as likes per post gets many writes, so how would you store it?
  9. When should a Go service keep a local in-memory cache as well as Redis?
  10. A privacy rule forces you to delete data from caches and backups, so how would you plan it?
  11. A time series of metrics grows fast, so which storage fits best?
  12. When should you denormalise data for faster reads?
  13. Your read replica lags during heavy writes, so which reads must use the primary?
  14. Scenario: when the cache cluster fails, how much load reaches the database, and what protects it?
  15. Scenario: when two storage options both fit, how would you decide in an interview?

Interview Approach and Trade-Offs

Before you answer, study our post for senior roles. These questions are about how you run the design conversation itself.

  1. The interviewer says design Twitter, so which questions would you ask in the first five minutes?
  2. Your estimate needs requests per second from daily users, so how would you calculate it?
  3. When you do not know a tool the interviewer mentions, how would you respond?
  4. A design has three valid options, so how would you present the choice?
  5. Imagine running out of time before the detailed part, then what would you skip?
  6. Your diagram gets messy, so how would you keep it readable?
  7. After you finish, the interviewer asks for weak points, so what would you name?
  8. A follow-up asks how Go helps in this design, so what would you say about goroutines and memory?
  9. When the interviewer pushes back on your choice, how would you respond?
  10. Your design has no monitoring, so what would you add at the end?
  11. A question asks for exact numbers you do not know, so how would you estimate?
  12. When should you go deep on one part instead of covering everything?
  13. How would you practise system design alone?
  14. Scenario: when the interviewer stays silent while you talk, how would you keep the session useful?
  15. Scenario: when you realise halfway that your first choice was wrong, how would you change course?

Code Reading Questions

Read each program carefully and predict the output before you run it. Then explain the result in your own words.

package main

import (
    "fmt"
    "strings"
)

const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

func encode(n uint64) string {
    if n == 0 {
        return "0"
    }
    var b []byte
    for n > 0 {
        b = append(b, alphabet[n%62])
        n /= 62
    }
    for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
        b[i], b[j] = b[j], b[i]
    }
    return string(b)
}

func decode(s string) uint64 {
    var n uint64
    for _, c := range s {
        n = n*62 + uint64(strings.IndexRune(alphabet, c))
    }
    return n
}

func main() {
    for _, id := range []uint64{0, 61, 62, 125000, 56800235583} {
        code := encode(id)
        fmt.Println(id, code, len(code), decode(code) == id)
    }
}
  1. What code does each ID get, and why is 56800235583 the largest ID with six characters?
  2. Why do counter based codes leak how many links exist, and how would you hide that?

The second program runs a token bucket with fixed timestamps.

package main

import (
    "fmt"
    "time"
)

type Bucket struct {
    tokens, max float64
    rate        float64
    last        time.Time
}

func (b *Bucket) Allow(now time.Time) bool {
    b.tokens += now.Sub(b.last).Seconds() * b.rate
    if b.tokens > b.max {
        b.tokens = b.max
    }
    b.last = now
    if b.tokens >= 1 {
        b.tokens--
        return true
    }
    return false
}

func main() {
    t0 := time.Date(2026, 10, 10, 9, 0, 0, 0, time.UTC)
    b := &Bucket{tokens: 3, max: 3, rate: 1, last: t0}
    var got []bool
    for _, ms := range []int{0, 100, 200, 300, 1300, 1400} {
        got = append(got, b.Allow(t0.Add(time.Duration(ms)*time.Millisecond)))
    }
    fmt.Println(got)
}
  1. Which requests pass, and why does the request at 1300 ms pass again?
  2. How would you share this bucket across many pods, for example with Redis?

Quick Revision Table for Design Building Blocks

Use the table below as a final check before your interview. It maps common needs to a building block and its main risk.

NeedBuilding blockMain risk
Fast readsCache with TTLStale data
Spread write loadSharding by keyHot keys and rebalancing
Decouple servicesMessage queueDuplicates and lag
Limit abuseToken bucketShared state across pods
Big filesObject storageAccess control on links
Survive failuresReplicas in zonesLag and failover time

Also, many interviewers ask you to compare scaling up and scaling out. The diagram below shows the difference side by side.

Go system design diagram comparing scaling up with scaling out
Scaling up uses a bigger machine, while scaling out adds more machines that share the load.

Official Resources

These official pages explain the Go tools behind these designs.

Quick Recap

  • These Go system design scenarios cover classic services, real-time systems, data, reliability, storage and interview approach.
  • Start with scope and numbers, then sketch, go deep on one part and discuss trade-offs.
  • Keep services stateless so you can scale out.
  • Pick storage by access pattern, and add caches with a clear invalidation plan.
  • Design for failure with replicas, timeouts, retries and graceful degradation.
  • Explain how Go helps, for example cheap goroutines for many connections.

What’s Next?

By now, you have Go system design scenarios for the design rounds of senior interviews. Practise them with a friend, then check your progress in the Go interview topics study guide.

Next up: Go interview questions hub with every post by topic and level