Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
/ cmiyc Public archive

A simple reverse proxy & load balancer written in Go, configurable via YAML

License

Notifications You must be signed in to change notification settings

papey/cmiyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cache Me If You Can

logo

A HTTP reverse proxy & load balancer written in Go, configurable via YAML. Supports multiple routes and backends, with per-route caching healthchecks and load balancing strategies.


Features

  • Configurable via YAML.
  • Route requests based on URL path prefix matching.
  • Supports graceful shutdown.
  • Configurable per route:
    • load balancing strategies (single, round-robin, random)
    • cache (max size, max entry size, ttl)
    • health checks (path, interval, timeout, fails, passes)
  • no httputil.ReverseProxy here.

Configuration

The load balancer is configured using a YAML file. Example:

listen: "localhost:8042"
routes:
  /:
    lb:
      strategy: "single"
    cache:
      enabled: false
    health_check:
      enabled: false
    backends:
      - url: "http://localhost:8080"
  /api:
    lb:
      strategy: "round_robin"
    cache:
      enabled: true
      max_size: 500
      max_entry_size: 1
      ttl: 3
    health_check:
      path: "/health"
      enabled: true
      interval: 5
      timeout: 2
      fails: 3
      passes: 2
    backends:
      - url: "http://localhost:8081"
      - url: "http://localhost:8082"
      - url: "http://localhost:8083"

Build

make

Run

./cmiyc -h

Run Test Suite

make validate

License

See LICENSE

About

A simple reverse proxy & load balancer written in Go, configurable via YAML

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors