Skip to content

donuts-are-good/loba

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo donuts-are-good's followers donuts-are-good's stars donuts-are-good's visitors

loba

loba is a load balancer written in go. it's experimental so maybe dont use it at work yet.

what

loba uses a round-robin algorithm to distribute incoming http requests across multiple servers. it also logs each request and response, storing the data in a sqlite database. you can then generate reports on the total number of requests per domain and the most recent request time.

domains config

all you need to do is create a domains.json file in the config directory. here's an example:

[
  {
    "domain": "example1.com",
    "servers": [
      "http://server1.example.com",
      "http://server2.example.com"
    ]
  },
  {
    "domain": "example2.com",
    "servers": [
      "http://server3.example.com",
      "http://server4.example.com"
    ]
  }
]

each object in the array represents a domain and the servers that will handle requests for that domain.

health check

loba also includes a health check endpoint at /health. it's a simple way to verify that the load balancer is up and running.

reporting

want to see how your servers are doing? just hit the /report endpoint. you'll get a json response with the total number of requests and the most recent request time for each domain.

neosay config

here's an example of a neosay config:

{
  "HomeserverURL": "https://matrix.org",
  "UserID": "@myusername:matrix.org",
  "AccessToken": "sy_uegfiubwefiouh98h38u4hgr34uy",
  "Rooms": {
    "error": "!NvGwefy34y3lIy:matrix.org",
    "general": "!yzLf3445hheeQR:matrix.org",
    "request": "!Cydgojiihergsgk:matrix.org",
    "launch": "!WwehbewuybgweaPC:matrix.org"
  }
}

MIT License 2023 donuts-are-good, for more info see license.md

About

experimental load balancer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages