XRAPH/Work/Gateway extension
Go · since 2026

Bastion

The same idea as Octopus, but as a Forge extension for teams who want the gateway inside their own Go process. HTTP, WebSocket, SSE and gRPC proxying, per-target circuit breakers, traffic splitting for canary and shadow releases, and an admin dashboard written in ForgeUI.

Language
Go
Category
Gateway extension
Since
2026
Stars
0
Repository Docs
01

Highlights

3 claims
H.01
Fourprotocols
Through one proxy

HTTP, WebSocket, SSE and gRPC each get their own handler, with connection pooling and a shutdown that drains in-flight work.

H.02
Fivestrategies
Load balancing

Round-robin, weighted round-robin, random, least-connections and consistent hash, chosen per route.

H.03
FromFARP
Routes from descriptors

Services register a descriptor and the gateway derives its routes. There is no second place where routing is written down.

02

What it does

6 entries

The gateway for Forge applications, taking its routes from the same manifests Octopus reads.

02.1
Proxying

Four protocols, one engine

HTTP, WebSocket, SSE and gRPC each get a handler tuned to them, sharing connection pooling and a graceful shutdown that drains in-flight work.

Pooled
02.2
Discovery

Routes derived from descriptors

OpenAPI, AsyncAPI and GraphQL descriptors are read through FARP, so a service registers once and the gateway configures itself.

FARP
FARP specification
02.3
Balancing

Five strategies, chosen per route

Round-robin, weighted round-robin, random, least-connections and consistent hash. The strategy belongs to the route, so two routes to one upstream can balance differently.

Per-route
02.4
Resilience

Circuit breakers per target

Three states with configurable failure thresholds, reset timeouts and a limit on half-open probes, held per upstream target.

Three-state
02.5
Limits

Token buckets at three levels

Global, per-route and per-client rate limiting with a configurable burst allowance and automatic client identification.

Token bucket
02.6
Release

Traffic splitting

Canary releases, blue-green deployments, A/B tests and shadow mirroring, expressed as percentages across upstream versions.

CanaryShadow
03

Anatomy

3 modules
01

Edge

In-process gateway for Forge applications.

02

Aggregation

Composes several internal calls into one response.

03

Manifests

Consumes the same FARP declarations as Octopus.

04

Why it exists

Design notes

#What it is

Bastion turns a Forge application into a full reverse proxy. It is the in-process counterpart to Octopus: same FARP-derived routing, no additional deployment.

#What it does

  • Multi-protocol proxying across HTTP, WebSocket, SSE and gRPC, including streaming.
  • Automatic route generation from FARP manifests, alongside static routes from config or the admin API.
  • Load balancing: round-robin, weighted, random, least-connections, consistent hash.
  • Per-target three-state circuit breakers, active HTTP probes and passive failure tracking.
  • Token-bucket rate limiting, global or per-route or per-client, and retries with exponential, linear or fixed backoff plus a retry budget.
  • Traffic splitting for canary, blue-green, A/B and shadow releases.
  • Response caching with per-route policies that respect Cache-Control.
  • Upstream TLS and mTLS with automatic certificate reload.
  • OpenAPI aggregation across all upstream services, with Swagger UI and per-service specs.
  • An admin dashboard built in ForgeUI, plus a full REST admin API and hot config reload.

#The aggregation trick

Because every service's spec already arrives in its FARP manifest, the unified OpenAPI document is a by-product rather than something anyone maintains. That single fact has removed more documentation drift than any process I have tried.

05

Signals

GitHub
Stars
0
Language
Go
Since
2026
Adopters
00

Shipping something on Bastion? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed