You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fiber, built on top of the fasthttp package, does indeed handle each request in a separate goroutine by default. This means that when a new request arrives, Fiber spawns a new goroutine to handle it. However, Fiber utilizes an efficient goroutine pool to manage these goroutines, ensuring that the overhead of goroutine creation is minimized.
Regarding the maximum number of concurrent goroutines, it's influenced by various factors including system resources and configuration settings. Neither Fiber nor fasthttp imposes a specific limit on the number of concurrent goroutines. Instead, it relies on the underlying Go runtime to manage goroutines efficiently.
These characteristics are specific to Fiber and are derived from its underlying fasthttp package, which is known for its lightweight and high-performance nature in handling HTTP requests in Go applications.
Question Description
This is a very fundamental question, but surprisingly, I couldn't find any answer by googling and searching for Stack Overflow.
There is a similar question on Stack Overflow but no one answers it.
Does Fiber handle each request in different goroutines?
Does Fiber create a new goroutine every time a new request comes? Or does Fiber use something like a goroutine pool?
What is the maximum number of concurrent goroutines? Is there a limit (imposed by Fiber or
fasthttp
) in the first place?Are the answers of the questions above specific to Fiber? Or are they derived from
fasthttp
?Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: