I've done quite a bit research on this for servers, namely how to build a cluster of cheap servers on the cheap.
One option is to use Arduino with a Relay board and Ethernet Shield.
That will give you maximum of around 40 relays, depending upon model of Arduino used etc.
Parts can be sourced from:
http://arduino-direct.com and eBay
Some information:
http://arduino-info.wikispaces.com/ArduinoPower#4-8As for finished product i ended up choosing IP Power 9258T and Avocent Direct PDU for initial setups for it's low buy-in price.
For KVM i ended up choosing Belkin Omniview for larger setups and Aten CS1716i for smaller setups.
For big setups Belkin Omniview works out somewhere around 30-40$ per node, depending upon do you get your gear from cheap or expensive place.
Aten CS1716i is a few $ more expensive per node only, but the Belkin also provides saner setup by the means of using CAT5 cabling
