Hello Gophers,
I’m sharing Gatewise, an MIT-licensed admission-control library and HTTP proxy written in Go.
When a dependency slows down, requests take longer and extra work stays in flight. Checkout requests and background jobs can then compete for a similar restricted database connections. Gatewise bounds the quantity of concurrent work and allows you to reserve capability for essential operations.
There are 4 integration paths:
- Go middleware round synchronous HTTP handlers.
- A standalone HTTP proxy for backends written in any language.
- An operation engine round Go employee jobs or different explicitly owned work.
- An adapter round an present database/sql pool that protects assertion, row-stream and transaction lifetimes.
For middleware customers, set up is:
go get github.com/HN026/gatewise@v1.0.0
You can begin with a hard and fast concurrency ceiling. Precedence tiers, tenant isolation and sharing, adaptive limits, useful resource indicators and bounded ready are optionally available. Limits are native to an engine/course of; Gatewise doesn’t present a cluster-wide capability finances.
A easy semaphore could already be sufficient when each request has the identical significance and also you solely want a hard and fast ceiling. Gatewise is meant for instances the place you additionally have to resolve which work receives scarce capability and perceive why admission adjustments.
The repository hyperlinks to a runnable PostgreSQL-backed instance with orders, catalog and stock providers, Postman collections and reproducible experiments. Reviews preserve well timed profitable work, refusals, errors and restoration seen collectively. The v1 sustained protocol handed eight three-minute runs throughout native and Linux environments, totaling 1,232,800 requests and 120 checks. These are managed experiments, not a declare about manufacturing capability.
One essential boundary: middleware holds admission till the protected handler returns, whereas a canceled proxy request could end earlier than distant work stops. SQL/operation guards defend these underlying lifetimes when wanted.
I’d admire suggestions on the mixing and coverage decisions. Should you handle providers that share a constrained dependency, what would cease you from attempting Gatewise, or what would you want earlier than adopting it?

