Performance (Gin)
Coming Soon — Alternative HTTP engine support is not yet implemented.
This section will cover performance optimization and alternative HTTP engines for Nika.
Current Engine
Nika is built on Gin, which is already one of the fastest HTTP frameworks in Go:
Future Engines
| Engine | Status | Description |
|---|---|---|
| Gin | ✅ Current | Default HTTP engine |
| Fiber | ⏳ Planned | Express-like API, fasthttp-based |
| Chi | ⏳ Planned | Lightweight, composable router |
| Echo | ⏳ Planned | Minimalist framework |
| net/http | ⏳ Planned | Go standard library |
Current Optimizations
Disable Debug Mode
import "github.com/gin-gonic/gin"
func main() {
gin.SetMode(gin.ReleaseMode)
app := nika.NewApp()
// ...
}
Enable Gzip Compression
Performance Tips
- Use connection pooling for database and cache connections
- Minimize allocations in hot paths
- Use streaming for large responses
- Enable Keep-Alive connections
- Use context timeouts for external calls
Status
| Feature | Status |
|---|---|
| Gin engine | ✅ Implemented |
| Engine abstraction layer | ⏳ Planned |
| Fiber adapter | ⏳ Planned |
| Performance benchmarks | ⏳ Planned |