# Lura (KrakenD) — Ultra-Performance API Gateway Framework in Go > Lura is the open-source framework powering the KrakenD API Gateway. Written in Go, it assembles high-performance API gateways with middleware pipelines, response aggregation, and protocol translation — processing thousands of requests per second on minimal hardware. ## Install Save in your project root: # Lura (KrakenD) — Ultra-Performance API Gateway Framework in Go ## Quick Use ```bash # Install KrakenD (built on Lura) docker run -p 8080:8080 -v "$PWD:/etc/krakend" devopsfaith/krakend run -c /etc/krakend/krakend.json ``` ```json { "version": 3, "endpoints": [ { "endpoint": "/users/{id}", "backend": [{ "url_pattern": "/api/users/{id}", "host": ["http://backend:3000"] }] } ] } ``` ## Introduction Lura is an open-source Go framework for building API gateways, created by the team behind KrakenD. It provides the core routing, middleware, and aggregation engine that transforms a declarative JSON configuration into a high-throughput gateway, removing the need to write custom proxy code for common API composition patterns. ## What Lura Does - Routes incoming requests to one or more backend services based on declarative configuration - Aggregates multiple backend responses into a single unified response - Applies middleware pipelines for rate limiting, authentication, and transformation - Handles protocol translation between REST, gRPC, and GraphQL endpoints - Processes requests with zero-allocation techniques for minimal garbage collection pressure ## Architecture Overview Lura implements a pipeline architecture where each endpoint definition becomes a handler chain. The router dispatches incoming requests, the proxy layer fans out to backends concurrently, and the response merger combines results. Middleware hooks at each stage allow injecting cross-cutting concerns. The framework is stateless by design, relying on external stores only when features like distributed rate limiting require coordination. ## Self-Hosting & Configuration - Deploy as a Docker container or standalone binary on Linux, macOS, or Windows - Define all routing and behavior in a single JSON or YAML configuration file - Use the KrakenDesigner web tool to visually build gateway configurations - Scale horizontally behind a load balancer with no shared state between instances - Monitor performance via built-in OpenTelemetry, Prometheus, and logging integrations ## Key Features - Declarative configuration with no custom code required for standard use cases - Concurrent backend requests with configurable timeouts and circuit breakers - Response manipulation including field filtering, grouping, and renaming - Plugin system for extending functionality in Go without forking the framework - Sub-millisecond latency overhead per proxied request under normal load ## Comparison with Similar Tools - **Kong** — Lua-based with a database for configuration; Lura is stateless and config-file driven - **APISIX** — similar declarative approach but Nginx/Lua based; Lura is pure Go with lower resource usage - **Envoy** — C++ service proxy focused on mesh scenarios; Lura targets API composition and aggregation - **Tyk** — Go-based gateway with dashboard; Lura is a framework for building custom gateways without vendor lock-in ## FAQ **Q: What is the difference between Lura and KrakenD?** A: Lura is the open-source framework (the engine). KrakenD is a complete API gateway product built on Lura with additional enterprise features and support. **Q: Can Lura handle WebSocket connections?** A: WebSocket passthrough is supported for direct proxy scenarios. Full WebSocket manipulation requires custom middleware. **Q: How does performance compare to Nginx-based gateways?** A: Lura processes requests with lower memory usage and comparable throughput to Nginx for API gateway workloads, with the advantage of native response aggregation. **Q: Do I need a database?** A: No, Lura is completely stateless and reads all configuration from files. No database is required for operation. ## Sources - https://github.com/luraproject/lura - https://www.krakend.io/docs/ --- Source: https://tokrepo.com/en/workflows/asset-3cb2ed6b Author: AI Open Source