Project · Go · MIT
brownout active
Go HTTP middleware for shedding some or all traffic to selected routes at runtime, from Go, a JSON admin API or a watched file.
go get github.com/rossedman/brownoutbrownout is plain net/http middleware that lets you turn off, or partly turn off, chosen routes while the server is running. Add a rule and the very next request sees it. Remove it when the incident is over. No restart and no redeploy.
- Partial brownouts. Let a percentage of traffic through instead of all or nothing.
- Method filters. Shed only writes to make an API read-only.
- Rules that expire, so a forgotten brownout doesn’t stay on forever.
- Three ways to change rules: the Go API, a JSON admin API, or a watched JSON file.
- No dependencies outside the standard library.
The docs site has an interactive playground for trying rules against paths.