What is wedge?
--------------

Wedge is a TCP connection splicer that runs on the same machine as your
webserver.  When it receives a connection from the outside, it splices
the new connection to your existing webserver and grabs the URL the
user is requesting.  It then announces via UDP the list of connections
that it's currently handling.  It tracks the announcements made by
its peer servers so that it can take over their connections if it
is notified that one of the other servers fails.

The connection announcement is done in a purely soft-state fashion.
Connections are announced every "N" seconds.  If a connection is
not announced within some other, longer, amount of time, it is
assumed to have disappeared and is removed from tracking.

See wedge.h for the defaults for the timeouts used.

How do I run wedge?
-------------------

usage:  wedge  [-h] [-d <debug>] [-p port] [-r remote port]
        -h  ................. help (this message)
        -d <debug level> .... enable debugging, if compiled
        -p port ............. local port to bind to
        -r remote port ...... remote port to splice to

Wedge by default looks for a file named "servers" in the local
directory that contains a list of the names or IP addresses
of the servers with which it peers.  If it can't find this
list, it will complain.  It should NOT have its own IP
address in this list - it squawks loudly if it sees its
own announcements.  Sorry.

How do I make it fail over?
---------------------------
The wedge expects a "server died" message from your server
monitoring system.  (This is a component you provide).
The program 'kill-wedge' will send a message to all servers
in the serverfile you supply, informing them that host
"foo" has died.

   kill-wedge [-h] [-s serverfile] [host-that-died]


Known Bugs
----------
- The wedge consumes 100% of the CPU when clients are connected.
  There are instructions in wedge.c on how to fix this.  It
  requires a small change to the request processing.  We accept patches.

- HTTP parsing is incomplete.   We only support GET.  The wedge will
  break POST requests.

- Large HTTP headers could confuse the wedge, if the '\n\n' of the
  header end comes on a buffer size boundary.  In practice, this
  shouldn't happen often.

