Flaxton is an open source project to automatically load balance Docker containers using Linux ipTables, for getting maximum performance and scalability.
Using Flaxton you need just to scale the number of your containers, and you don't need to reload any configuration file for Load Balancing as you are doing now with other TCP load balancers by adding new container's IP addresses.
Flaxton consists of 3 parts:
- Flaxton Daemon: background working process which will automatically detect and load balance Docker containers (images) and child servers. Flaxton Daemon making Load Balancing by adding DNAT rules to ipTables.
- Flaxton CLI: small program for making manipulations with Flaxton Daemons, without dealing with server IP addresses
- Flaxton Daemon Backend: Node.js based (probably will switch to Golang) server side program to handle Flaxton Daemon requests with Docker container monitoring information, and task management for Flaxton Daemon. Main functionality is to store Daemon information to MongoDB and send available tasks from database to Flaxton Daemon.
Flaxton Daemon + CLI is a single executable which you can find in bin
directory, it compiled for x64 systems MAC OS and Linux.
If you want to compile it manually you need to have installed and configured Go programming language.
You can find Go programming language installation instructions at https://golang.org/doc/install
After installing and having configured golang
you can compile Flaxton project using following simple steps:
Before starting Flaxton Daemon you need to login using this command
./flaxton login -u test -p test
it will create .flaxton
configuration json file in your /home/[user]
directory, which is need to make a secure query's to container.flaxton.io
repository.
To start Flaxton Daemon you need to type one of the following commands
```bash sudo ./flaxton daemon sudo ./flaxton -d ```
It will start tracking available Docker images and containers with their state/load information.
And on every 1 second Flaxton Daemon will ask container.flaxton.io server to send him available tasks, by sending
tracked information from Docker (containers with stat/load, images).
Flaxton Daemon will start Load Balancing for specific port only when he will recieve Task, with 3 parameters
- Port for load balancing
- Docker image name for load balancing containers created only from that image
Or Child server Ip address who could also be load balancing with given port - Container Port - Forward requests to port on Docker container
Or Port on child server
Flaxton CLI is used for sending Tasks to container.flaxton.io repository, which will be available for executing on specific Flaxton Daemon.
Here is the basic usages for Flaxton CLI
```bash # Getting list of available Flaxton Daemon servers for logged in user ./flaxton daemon list./flaxton daemon set_name <daemon_id> <daemon_name>
./flaxton transfer -daemon daemon_dev -img flaxton/php:test -cmd /run.sh -count 2
./flaxton daemon map-image daemon_dev 80 flaxton/php:test 80
./flaxton daemon stop-port daemon_dev 80
<p>
<b>Development process very dynamic and many commands is adding day by day !</b>
</p>
# Flaxton Daemon Backend
<p>
This part is not open sources yet, because it will have a lot of changes during this month.<br/>
At this moment it is writtent in Node.js and it's live on container.flaxton.io with MongoDB database.
</p>
<p>
We are thinking of switching Node.js backend to Go project.
</p>
# Questions ?
<p>
This technology is giving a lot of opportunity and freedom for building Infinity scalable Docker infrastructure,
because you don't need to deal with Docker containers networking, all that is doing Flaxton Daemon by manipulating Linux ipTables.
</p>
<p>
<strong><i>One of the biggest advantages of Flaxton Technology is that it's not passing traffic through it as it
is doing other TCP load balancers, it is just manipulating Linux iptables. And for Flaxton Daemon it doesn't matter you have 1K req/s or 800k req/s,
it wouldn't affect CPU or RAM usage of Flaxton Daemon.</i></strong>
</p>
<p>
If you have a questions lets talk about <a href="mailto:tigran@flaxton.io">tigran@flaxton.io</a>
</p>