CODESEEDSign in
Explore projects
Gointermediatebackend

HTTP Load Balancer

HTTP load balancer in Go with multiple algorithms (round-robin, least-connections, weighted), health checks, and hot reload config.

5 steps

Project steps

  1. 01

    Basic Reverse Proxy

    httputil.ReverseProxy that forwards requests to a fixed backend.

  2. 02

    Round-robin

    Rotates backends with an atomic counter for thread safety.

  3. 03

    Least-connections

    Tracking active connections per backend with atomic int64.

  4. 04

    Health checks

    Goroutine that tests /health per backend at a configurable interval; marks as unhealthy.

  5. 05

    Hot reload config

    SIGHUP re-reads config.json and updates backends without downtime.

Recommended resources

Ready to build this?

Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.

5 steps

Tech stack

Gonet/httpsync/atomicencoding/json