Configs2026年5月21日·1 分钟阅读

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.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Lura Overview
通用 CLI 安装命令
npx tokrepo install 3cb2ed6b-54af-11f1-9bc6-00163e2b0d79

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产