Menu

I built loadbear – a lightweight HTTP load balancer & reverse proxy in Go (with circuit breakers, token-bucket rate limiting, and Prometheus metrics)
📰

I built loadbear – a lightweight HTTP load balancer & reverse proxy in Go (with circuit breakers, token-bucket rate limiting, and Prometheus metrics)

#backend#redditbackend#circuit#load#request
Reading 0:00
15s threshold

Hey r/Backend !

I’ve been working on loadbear , a small, dependency-light HTTP reverse proxy and load balancer written in Go, and I'd love to get some architectural feedback from backend engineers here.

Why I built it: Most reverse proxies fall into two extremes: massive production tools (Nginx, Envoy, HAProxy) with heavy configuration overhead, or overly simplistic toy proxies that skip real-world fault tolerance. I wanted a self-contained binary configured via a single YAML file that stays readable and easy to inspect while still implementing proper backend resilience patterns.

Request Pipeline & Architecture: Incoming traffic flows through a sequential middleware/handler pipeline before hitting Go’s httputil.ReverseProxy : ProxyListener -> Per-IP Rate Limiter -> Balancer -> Circuit Breaker -> Upstream Backend

Core Backend Features:

Load Balancing Algorithms: Implements round_robin , smooth_weighted_round_robin (Nginx-style smooth distribution), least_connections (tracking active in-flight requests),…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.