Prefork Mode
ยท 5 min read
Most Go developers know that Go uses goroutines for concurrency. A single process handles thousands of connections by scheduling goroutines across OS threads. That is usually enough.
But Fiber has a trick that most Go frameworks do not: prefork mode. One line of config, and Fiber spawns multiple OS processes, each with its own event loop, all listening on the same port. It is the same pattern that Nginx and Node.js cluster mode use.
The surprise is not that Fiber supports this. The surprise is when it actually helps - and when it makes your app slower.
