digitalbazaar/bedrock-loadbalancer

Name: bedrock-loadbalancer

Owner: Digital Bazaar, Inc.

Description: A Bedrock module for performing run-time reconfigurable load balancing

Created: 2016-12-24 19:24:45.0

Updated: 2016-12-24 19:25:00.0

Pushed: 2016-12-26 22:38:27.0

Homepage: null

Size: 12

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

bedrock-loadbalancer

A Bedrock module that provides automatic HTTPS-enabled loadbalancing services.

Quick Examples
install bedrock-loadbalancer bedrock-letsencrypt bedrock bedrock-server bedrock-express

Create a basic Bedrock application server:

bedrock = require('bedrock');
config = require('bedrock').config;

odules
ire('bedrock-server');
ire('bedrock-express');
ire('bedrock-letsencrypt');
ire('bedrock-loadbalancer');

onfig
ig.server.port = 443;
ig.server.httpPort = 80;
ig.server.bindAddr = ['lb-1.example.com'];
ig.server.domain = 'lb-1.example.com';
ig.server.host = 'lb-1.example.com';
ig.server.baseUri = 'https://' + config.server.host;

ig.loadbalancer.domains = {
ttp://unsecure.example.org/': 'http://192.168.128.64/',
ttps://secure.example.org/': 'https://192.168.128.65/'


et this to 'production' in a full production environment
ig.letsencrypt.mode = 'staging';
onfig.letsencrypt.domains is auto-generated from loadbalancer.domains
ig.letsencrypt.email = 'domains@example.com';
ig.letsencrypt.redisOptions = {
: 1,
ssword: 'REDIS_PASSWORD'


ock.start();

Run the application above on any host with public access to the Web. You need to ensure that at least ports 80 and 443 are available on the public Internet because the Let's Encrypt servers will attempt to contact your host during the certificate issuance process.

Configuration

For documentation on this module's configuration, see config.js.

You will need to setup a Redis server to store the accounts, keypairs, and certificates for all domains behind the load balancer. More on Redis configuration options can be found in the Redis configuration options.

Requirements

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.