redir

redir is a tiny cgi program written in C which does nothing more than a round-robin based redirection to a variable amount of backend webservers.

usage

redir needs just a redir.conf in its working directory (you can change this easily by touching the source code), eg.

http://www1.mywebfarm.tld
http://www2.mywebfarm.tld
http://www3.mywebfarm.tld
http://www4.mywebfarm.tld
http://www5.mywebfarm.tld

If you put redir on the host named www.mywebfarm.tld, then you have now created an el-cheapo loadbalancer.

compile

$ diet -Os gcc -W -Wall -s -pipe -o redir redir.c

download

redir.c