Skip to main content
0.4.0 just releasedsee what's new

Route. Aggregate. Extend.

Kono is a lightweight API Gateway in Go — parallel fan-out, flexible aggregation, and zero configuration magic.

Fan-out & Aggregate

Dispatch a single request to multiple upstreams in parallel and combine their responses — merge JSON objects, wrap into an array, or namespace by upstream name.

flows:
- path: /api/summary/{user_id}
upstreams:
- hosts: http://users:8081
method: GET
path: /{user_id}/short
- hosts: http://orders:8082
method: POST
path: /create
aggregation:
strategy: merge
best_effort: true
on_conflict:
policy: prefer
prefer_upstream: users

Resilient by Default

Per-upstream circuit breaker, configurable retry with backoff, and load balancing across multiple hosts — out of the box, via YAML. No code required.

policy:
retry:
max_retries: 3
retry_on_statuses: [ 404, 409 ]
backoff_delay: 500ms
circuit_breaker:
max_failures: 3
reset_timeout: 10s
load_balancing:
mode: least_conns

Extend with Plugins

Hook into request and response phases using dynamic .so plugins — modify headers, transform responses, validate tokens, or short-circuit requests.

package main
import "github.com/starwalkn/kono/sdk"
type Plugin struct{}
func (p *Plugin) Info() sdk.PluginInfo {
return sdk.PluginInfo{
Name: "snakeify",
Version: "v1",
Author: "starwalkn",
}
}
func (p *Plugin) Type() sdk.PluginType {
return sdk.PluginTypeResponse
}
func (p *Plugin) Execute(ctx sdk.Context) error {
// transform response JSON keys
// to snake_case
return snakeify(ctx.Response())
}