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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Bedrock module that provides automatic HTTPS-enabled loadbalancing services.
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.
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.