Skip to content

Boarding pass · Go Advanced

Go · Advanced interview

An AI mock interview for senior Go engineers. Reason about the scheduler and memory model, concurrency patterns, performance profiling, and building reliable concurrent services.

20–30 minEstimated6 questionsTailored live12 model answersTo study
  • Voice interview
  • Live feedback
  • Browser-only
  • No installation required

Your report · sample

AI Readiness Score

/100
Content score English score

Finish the mock and get this report — scored on content and English, with concrete tips and a model answer for every question, plus a study plan.

Your flight path

Five steps to interview-ready.

From a quick warm-up to a personalised study plan — here's the whole loop, and what you get at each gate.

  1. Step 01

    Preparation

    Skim the topics and warm up — you're briefed before takeoff.

  2. Step 02

    AI Interview

    A realistic AI interviewer asks tailored questions — answer by voice or text.

  3. Step 03

    Instant Score

    Finish and get a 0–100 readiness score across content and English.

  4. Step 04

    AI Feedback

    Concrete tips and a rewritten model answer for every response.

  5. Step 05

    Study Plan

    A personalised plan targets your weakest areas — so the next run scores higher.

Preview the AI demo

See one answer scored, end to end.

The whole loop on sample data — question, your answer, instant feedback and a study plan. Hover to pause.

aevrofy.com/session · live demoPlaying

Interviewer · Question 1

“Tell me about yourself.”

Who it's for

  • Senior Go engineers
  • Devs building high-throughput Go services
  • Anyone targeting senior/lead Go roles
  • Engineers who profile and tune Go

What you'll practice

  • The GMP scheduler and the GC
  • Concurrency patterns and pipelines
  • Profiling with pprof and avoiding allocations
  • Context propagation and goroutine-leak prevention

Topics covered

What this level expects.

Runtime

  • GMP scheduler
  • GC & memory
  • Escape analysis

Concurrency patterns

  • Fan-out/fan-in
  • Worker pools
  • Graceful shutdown

Performance

  • pprof
  • Allocations & sync.Pool
  • Race detector

Reliability

  • Context propagation
  • Goroutine leaks
  • Error strategy

Practice questions

12 questions, with model answers.

Read them, then run the live mock to answer out loud and get scored. Tap any question to reveal a model answer.

01How does Go's GMP scheduler work?

Go multiplexes goroutines (G) onto OS threads (M) via logical processors (P), where P count defaults to GOMAXPROCS. Each P has a local run queue of goroutines an M executes; when a goroutine blocks on a syscall the M can detach and another M serves the P, and idle Ps steal work from others (work-stealing). This lets millions of goroutines run efficiently on a few threads, with cheap, fast context switches in user space.

02How does Go's garbage collector work, and what's it optimized for?

Go uses a concurrent, tri-color mark-and-sweep collector optimized for low latency — it runs mostly alongside your program with very short stop-the-world pauses (sub-millisecond). It trades some throughput and a bit of CPU for predictable, short pauses, tuned via GOGC (and a soft memory limit). The practical implication is you reduce GC pressure by minimizing heap allocations rather than tuning the collector heavily.

03What is escape analysis and why does it matter?

At compile time Go decides whether a value can live on the stack (cheap, freed automatically) or must 'escape' to the heap (GC-managed). A value escapes if its lifetime outlives the function — e.g. returning a pointer to a local, or storing it somewhere reachable later. Understanding it helps you reduce heap allocations and GC pressure; go build -gcflags=-m shows escape decisions.

04How do you implement a fan-out/fan-in pipeline?

Fan-out starts multiple goroutines reading from the same input channel to process work in parallel; fan-in merges their results into one output channel. You connect stages by channels so each stage transforms and forwards, and use a WaitGroup to close the merged channel once all workers finish. Context cancellation threads through so the whole pipeline can stop early.

05How do you build a bounded worker pool, and why bound it?

Start a fixed number of worker goroutines that range over a jobs channel and send to a results channel; close jobs when done and use a WaitGroup to know when to close results. You bound concurrency to avoid exhausting memory, file descriptors, or overwhelming a downstream dependency — unbounded goroutine spawning is a common cause of resource blowups under load. The pool size becomes a tunable backpressure knob.

for i := 0; i < n; i++ {
  go func() { for j := range jobs { results <- do(j) } }()
}
06How do you implement graceful shutdown of a Go service?

Listen for SIGTERM via signal.NotifyContext, then on shutdown call server.Shutdown(ctx) to stop accepting new connections and let in-flight requests finish within a timeout, cancel the root context so background goroutines selecting on ctx.Done() exit, and wait (WaitGroup) for them before exiting. This drains work cleanly so deploys are zero-downtime and nothing is abandoned mid-flight.

07How do you profile a Go program with pprof?

Import net/http/pprof (or use runtime/pprof) to capture CPU, heap, goroutine, block, and mutex profiles, then analyze with go tool pprof — viewing top functions, flame graphs, and allocation sources. You measure first to find the real hotspot, then optimize. CPU profiles find compute hotspots; heap profiles find allocation sources driving GC; goroutine/block profiles find concurrency stalls.

08How do you reduce allocations, and when does sync.Pool help?

Reduce allocations by reusing buffers, preallocating slices with the right capacity, avoiding unnecessary interface boxing and string/[]byte conversions, and keeping values on the stack (escape analysis). sync.Pool reuses temporary objects across goroutines to cut allocation and GC pressure for short-lived, frequently-allocated objects (like buffers) — but it's not a cache and pooled items can be collected, so use it only for genuinely reusable throwaway objects.

09How does the race detector work and when do you use it?

The race detector (go test -race / go run -race) instruments memory accesses at runtime to detect when two goroutines access the same memory concurrently with at least one write and no synchronization. It catches data races that are otherwise intermittent and hard to reproduce. You run it in tests and CI; it slows execution and uses more memory, so it's a testing tool, not a production build flag.

10How should context propagate across API boundaries?

Pass context.Context as the first argument through every layer — handlers, services, database calls — so cancellation and deadlines flow end to end and a client disconnect or timeout aborts the whole chain. Don't store context in structs or pass nil; derive child contexts with timeouts where appropriate. Proper propagation is what stops a server doing work for requests no one is waiting on.

11How do goroutine leaks happen and how do you prevent them?

A goroutine leaks when it blocks forever — sending/receiving on a channel no one services, or waiting without honoring cancellation — so it never exits and its memory is never reclaimed. Prevent it by always giving goroutines a way to stop (select on ctx.Done()), ensuring channels have receivers or are buffered/closed appropriately, and using timeouts. You detect leaks with the goroutine profile showing a steadily growing count.

12What's a good error-handling strategy in a large Go codebase?

Wrap errors with context as they propagate (%w) so the final message is a readable trail, but don't double-log — handle or log an error once, at the boundary. Use sentinel errors or typed errors for conditions callers branch on (via errors.Is/As), keep error messages lowercase and without trailing punctuation by convention, and decide at the top layer how to map errors to responses/retries. Consistency in wrapping and where you handle is what keeps it maintainable.

Preparation tips

Walk in ready.

  • Be able to sketch G, M, and P and their roles
  • Know how to read a pprof CPU/heap profile
  • Always pair goroutine creation with a stop condition
  • Run tests with -race in CI

Ready for the real thing?

Run a 6-question Go mock interview, answer out loud, and get a readiness score with tips and model answers.

More advanced interviews

Aevrofy · Go advanced interview prep