Skip to content

danilhendrasr/gorrola

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Gorrola

A simple Round Robin Load Balancer

MIT License LinkedIn

About The Project

It's a simple load balancer implementing the Round Robin algorithm. This toy project was created because I wanted to have something that's built in Go on my GitHub. I use this article as a reference, so some parts of the code might look similar, but I assure you I use my own brain most of the time and not just blindly copy what the author wrote.

I have some interesting ideas on how to develop this project further so as to make it my software engineering playground, some of which you can find in the issues page. I don't know if I'm gonna implement those in the future, I might though... probably, when I'm bored :p

For now, it has basic functionalities such as:

  • Route traffic (I mean, of course)
  • Health checks (passive and active)
  • Route traffic only to healthy backends
  • CLI-based interface

Not very impressive right, but I'm proud of it, lol.

(back to top)

Getting Started

The fast way (Linux only)

  1. Download the latest binary from the release page
  2. Run it
    chmod +x ./gorrola
    ./gorrola run --backends <your backends URLs here, separated by comma>
  3. Gorrola by defaults will be served at port 3000

Build from source

  1. Clone the repo
  2. Build the binary
    go build
  3. Run the example backends
    chmod +x scripts/up-backends.sh
    ./scripts/up-backends.sh
  4. Run the binary
    ./gorrola run --backends "http://localhost:8080,http://localhost:8081,http://localhost:8082" -p 3001
  5. Gorrola will be served at port 3001

The docker way? 🫤

I don't provide any docker image at the moment.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.