I am looking for a HTTP load balancing solution that will provide the following:
1) Accept HTTP connections on port X and forward them to one of multiple other hosts (and/or ports), either randomly or in a round-robin manner.
2) If the server reply contains a certain HTTP header with a certain value (i.e. 'Magic-Number: 12345'), remember it and forward all following requests containing the same header to this server.
3) At certain intervals, perform a keep-alive test by sending a specified HTTP request to all destination servers. If either server does not reply, stop forwarding to it until it comes online again.
4) (Not crucial, but nice to have) Accept HTTPS connections from clients and translate them to HTTP connections to the servers.
The solution must consist of free and/or open source software and run under Windows 200x Server.
Update: Cygwin or Portable Ubuntu (or other Colinux distribution) are also viable options, if they are able to run the appropriate *nix solutions.