0.0.5 • Published 2 years ago

@darkflare/balancer v0.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

darkflare/balancer

Installation

# Get the latest release.
npm i @darkflare/balancer

Usage

  1. Create a file named originServers.json in your src folder.

    {
      "us": ["127.0.0.3"], // country specific servers
      "*": ["127.0.0.1", "127.0.0.2"] // any country
    }
  2. Create a file named either error.html, error.json or error.txt in your src folder to serve when no server is available to handle the request.

  3. Build your worker script.

    npx @darkflare/balancer

Health Checks

The load balancer makes a HEAD request to http://{server_ip}/health. The server is considered healthy when the status code of the response is 2**.

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago