Common questions about using Fiber, its design decisions, and best practices. If you have a question not covered here, feel free to open an issue or ask in our Discord community.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gofiber/fiber/llms.txt
Use this file to discover all available pages before exploring further.
Getting Started
How should I structure my application?
How should I structure my application?
How can I use live reload?
How can I use live reload?
- Install Air by downloading the appropriate binary for your operating system from the GitHub release page or by building the tool from source.
-
Create a configuration file for Air in your project directory, such as
.air.tomlorair.conf:
- Start your Fiber application with Air:
Error Handling
How do I set up an error handler?
How do I set up an error handler?
How do I handle custom 404 responses?
How do I handle custom 404 responses?
Templates and Rendering
Routing and Networking
Does Fiber support subdomain routing?
Does Fiber support subdomain routing?
Compatibility and Integration
How can I handle conversions between Fiber and net/http?
How can I handle conversions between Fiber and net/http?
net/http handlers directly—just pass an http.Handler, http.HandlerFunc, compatible function, or even a native fasthttp.RequestHandler to your routing method.For other interoperability scenarios, the adaptor middleware provides utilities for converting between Fiber and net/http. It allows seamless integration of net/http handlers, middleware, and requests into Fiber applications, and vice versa.For details on how to:- Convert
net/httphandlers to Fiber handlers - Convert Fiber handlers to
net/httphandlers - Convert
fiber.Ctxtohttp.Request
Is Fiber compatible with net/http?
Is Fiber compatible with net/http?
net/http for performance reasons. However, Fiber provides:- Adaptor middleware for converting between Fiber and
net/httphandlers - Similar API to Express.js and other web frameworks for easier learning
- Context wrappers that can be converted to
http.Requestandhttp.ResponseWriter
net/http handlers, using native Fiber handlers will provide better performance.Performance and Architecture
Why is Fiber so fast?
Why is Fiber so fast?
- Built on fasthttp: Uses fasthttp instead of
net/http, which is optimized for speed - Zero-allocation router: Custom router designed to minimize memory allocations
- Efficient memory pooling: Reuses objects to reduce garbage collection pressure
- Optimized middleware: Middleware pipeline is designed for minimal overhead
- No reflection in hot paths: Avoids expensive reflection operations in critical code paths
What is zero-allocation routing?
What is zero-allocation routing?
- Reusing route parameter buffers
- Using memory pools for common objects
- Avoiding unnecessary string allocations
- Optimizing path matching algorithms
Should I use Fiber for production?
Should I use Fiber for production?
- Battle-tested foundation: Built on fasthttp, which is widely used in production
- Active maintenance: Regular updates and security patches
- Large community: Extensive middleware ecosystem and community support
- Proven performance: Excellent benchmarks and real-world performance
- Test thoroughly with your specific use case
- Monitor performance in production
- Follow security best practices
- Keep dependencies updated
Community and Support
Does Fiber have a community chat?
Does Fiber have a community chat?

How can I contribute to Fiber?
How can I contribute to Fiber?
- Report bugs: Open an issue on GitHub
- Submit PRs: Fix bugs or add features
- Improve docs: Help improve documentation
- Create middleware: Build and share middleware packages
- Help others: Answer questions on Discord and GitHub
Where can I find examples?
Where can I find examples?
Advanced Topics
Can I use Fiber with microservices?
Can I use Fiber with microservices?
- Low resource footprint: Uses minimal memory and CPU
- Fast startup time: Quickly starts and stops for container environments
- High throughput: Handles many requests efficiently
- Small binary size: Compiles to compact executables
- REST APIs
- gRPC services (with adaptor)
- Event-driven services
- Service mesh components
How do I handle WebSockets?
How do I handle WebSockets?
Can I run multiple Fiber apps?
Can I run multiple Fiber apps?
- On different ports:
- Using app mounting:
- Subdomain routing (see example above)