Things I wish I knew before I started using Docker
boot2docker init
boot2docker up
| [api]: New apis / changes to apis | |
| [test]: Update test/* files | |
| [dist]: Changes to submodules, version bumps, updates to package.json | |
| [minor]: Small changes | |
| [doc]: Updates to documentation | |
| [ux]: Updates to UX | |
| [fix]: Bug fixes | |
| [bin]: Update binary scripts associated with the project | |
| [merge]: Resolved git merge from upstream or otherwise | |
| [refactor]: Refactor of existing code with no external API changes |
| /* | |
| * base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers | |
| * | |
| * (C) 2010, Nodejitsu Inc. | |
| * | |
| */ | |
| var base64 = exports; | |
| base64.encode = function (unencoded) { |
| /* | |
| Mustache templating library made available for the CommonJS environment using the | |
| modules definition available at: http://wiki.commonjs.org/wiki/Modules/1.1 | |
| Shameless port of a shameless port | |
| @defunkt => @janl => @aq => @voodootikigod | |
| See http://github.com/janl/mustache.js for more info about Mustache itself. | |
| */ |
| // To start vlc with telnet remote control: | |
| // ./VLC --extraintf rc --rc-host 0.0.0.0:3000 | |
| // | |
| // To connect to multiple vlc's | |
| // node vlcrc.js host1:3000 host2:3000 | |
| var net = require('net'); | |
| var readline = require('readline'); | |
| //addresses of servers |
| Breaker | |
| Clutch | |
| Flash | |
| Hawk | |
| Scarlett | |
| Ace | |
| Doc | |
| Duke | |
| Torpedo | |
| Roadblock |
| module['exports'] = function echoHttp (hook) { | |
| console.log("Console messages are sent to /logs"); | |
| console.log(hook.params); | |
| console.log(hook.req.path); | |
| console.log(hook.req.method); | |
| /* | |
| http://hook.io/Marak/image | |
| */ | |
| var gm = require('gm'); | |
| module['exports'] = function image (hook, callback) { |
| module['exports'] = function imageResize (hook, callback) { | |
| // GraphicsMagick fully supported | |
| var gm = require('gm'); | |
| // for a more complete example that supports file uploads and streaming uploads | |
| // see: http://image.resize.hook.io | |
| // grab an image as a url | |
| // no file has been uploaded, fallback to the image "url" parameter | |
| var stream = hook.open('https://hook.io/img/robotcat.png'); | |
| hook.res.writeHead(200, { 'Content-Type': 'image/png' }); | |
| gm(stream) |
So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])