HAProxy

The Reliable, High Performance TCP/HTTP Load Balancer


Quick links

Quick News
Description
Design Choices
Supported Platforms
Performance
Reliability
Security
Download
Documentation
Live demo
Commercial Support
Products using HAProxy
Contributions
Other Solutions
Contacts
Mailing list archives


Willy TARREAU


visitors online
 
Web 1wt.eu

2013/04/01 - Getting HAProxy in the sky to get faster internet access

Note: I've got too many responses from people who believed it was true because they did not read till the last two words : look at the date, it was an April Fool's ! Don't believe everything you see on the net just because there are a few photos ! OK, the bazaar on the desk and the hardware specs are real though :-)

Haproxy has long been known for its very little resource usage. I was wondering how far we could go in terms of efficiency so I decided to make a little experimentation.

I'm using a Linuxstamp. It's a very neat little board running a 400 MHz extremely low-power ARM chip, 32 MB of RAM, 256 MB of NAND Flash, a micro-SD slot, a USB port and a Fast Ethernet port and many GPIO. It's great for robotics or monitoring. Haproxy achieves about 1350 HTTP requests per second on this board, and can sustain about 1000 concurrent connections (due to the limited amount of RAM). The board runs on extremely low power, something like 100mW in idle. It does not have any WiFi though, so I also used a cheap USB->WiFi adapter.

This board can be powered from 5V found on the console port's pin 3. I wanted to power it using a small 3.7V Li-ion cell-phone battery. So I used a 3V-5V converter I bought on DX for a few euros.

A preliminary test shows that the battery has no problem powering the board via the small converter. In fact for me this is not news since I'm already using this board in an hexapod robot :
 

Then I got an idea. Why not put haproxy in the sky ? Using WiFi, it could serve as a relay between many systems, especially these days where WiFi is omnipresent and even the only connectivity found on some devices (eg: Ultrabooks). The battery could be recharged using a solar panel. I quickly assembled two solar panels as a charger, plugged the WiFi adapter into the board, soldered the battery to the converter then to the board and taped everything together. I verified that I could connect via SSH, everything was OK :
 

I need something to make it fly. This kit has everything necessary. No need for the camera nor the heat pack, the payload will simply be the Linuxstamp, the battery and the solar panel.

It was time to launch. So far so good.
 

It was time to configure it using SSH. Once in altitude, it sees many access-points, indicating that it can probably connect very far away, which is expected since there is very low interference in altitude. After discovering some stores' access-points, I discovered one that I attributed to a datacenter, probably used by maintenance personnel during local operations. Then a second one, then a third one. So I thought I could provide a more direct access to the systems that are hosted overthere.

I started to set up haproxy in transparent mode with a content-switching configuration to select the correct server based on the Host header.

Due to the limited bandwidth on the WiFi access, I enabled compression so that more users could use it at a time. I also enabled SSL later because since the device is in the sky, everyone sees what you're exchanging with remote servers. Also, it's important to stay in 802.11b as it consumes less power. Now after several hours of discovery, I have set up 145 hosts which provide me with a faster access than what I get with my ADSL link. We'll see if it lasts till next April Fool's.

Contacts

Feel free to contact me at for any questions or comments :

  • Main site : http://1wt.eu/
  • e-mail :