Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

luxflux/cloudbalancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudBalancer

Build Status Code Climate

Ever wanted the servers behind your loadbalancer to register themself with the it? Ever wished your loadbalancer would react on high load or other events on the backend servers?

This project will solve your problems (as soon as its finished, haha...).

Concept

  • A new node registers itself at its loadbalancers
  • Loadbalancer gets in a defined period of time announcements from the nodes about their current status
  • Loadbalancer weights the nodes according to their status
  • It will be easy to write your own node-plugin (want to check Seconds_behind_master on a MySQL-Slave?)
  • In the first version, there will be just generic TCP-relaying, soon after that there will be HTTP-Proxying
  • Primarily based on AMQP/RabbitMQ

Whats already implemented?

  • Node check-in at the loadbalancer
  • Monitoring the heartbeat of a node
  • Simple TCP-Weighted-Round-Robin Loadbalancer
  • Hacky start scripts for each
  • Status-CLI which outputs some JSON :)

Open parts for the first RC

  • Nice start scripts
  • Nice CLI
  • Plugin infrastructure for the weighting
  • Live rebalancing when the weight of a node changes

Planned features

  • Everything is a plugin
    • Want to use STOMP instead of AMQP?
    • Easily write your own checks on a node
  • Webinterface
  • HTTP-Proxying (including Varnish-Cache?)
  • SMTP-Proxying

Giving the current version a try

  • Install & start RabbitMQ
  • Start the loadbalancer:
ruby bin/cloudbalancer-loadbalancer
  • Start the echo servers:
ruby bin/echo-server.rb
ruby bin/echo-server2.rb
  • Start the nodes
ruby bin/cloudbalancer-node
ruby bin/cloudbalancer-node2
  • Connect to localhost:8080 with netcat
nc localhost 8080

About

Cloud Loadbalancer Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages