Courses
Go Advanced: Performance, Concurrency, and Production
Check Yourself
Five scenario questions on bounded worker pools, sync.Mutex vs sync/atomic, and race detection.
Course content
Join this Course
Sign in to save your progress.
-
Bounded Concurrency and Worker Pools
-
Bound Concurrency With a Worker Pool
-
Coordinate Shared State With sync.Mutex and atomic
-
-
-
Memory, Allocations, and Benchmarking
-
Measure Speed and Allocations With go test -bench
-
Cut Allocations With Pre-Sizing and sync.Pool
-
-
-
Profiling and Diagnostics
-
Find CPU and Heap Hotspots With pprof
-
Catch Goroutine Leaks and Slow Tests Early
-
-
-
Resilience and Defensive HTTP
-
Add Retries With Backoff and Jitter
-
Protect Endpoints With Rate Limiting and Panic Recovery
-
-
-
Production Builds and Containers
-
Embed Static Assets and Version Info With embed and ldflags
-
Ship a Multi-Stage Scratch Go Container
-
-
-
Fuzzing, GC Tuning, Tracing, and Reflection
-
Fuzz Testing Parsers and Decoders With go test -fuzz
-
Escape Analysis and GC Tuning (-gcflags="-m", GOGC, GOMEMLIMIT)
-
Execution Tracing and Block/Mutex Contention Profiling
-
Reflection, Struct Tags, and go generate
-
-
1.
You need to call an external API for 2,000 items, and the API allows at most 10 concurrent connections. Why is a fixed 5-worker pool better than `for _, item := range items { go fetch(item) }`?
2.
In `runPool`, why did `items` print as `[1 16 25 36 4 9]` instead of `[1 4 9 16 25 36]`?
3.
You only need to increment a single `totalRequests` counter across 50 goroutines. Which primitive is cleanest and lock-free?
4.
Why must you never perform an HTTP call or `time.Sleep` while holding a `sync.Mutex`?
5.
Which `go` flag instruments your tests or runs to catch unsynchronized concurrent memory reads/writes?
About
Five scenario questions on bounded worker pools, sync.Mutex vs sync/atomic, and race detection.
- Duration
- 5 min
- Last update
- 11/27/2026
Was this helpful?
0
0
Comments
Sign in to commentNo comments yet.