haproxy and orbited (COMET server)

From: Christoph Dorn <christoph#christophdorn.com>
Date: Wed, 30 Jan 2008 13:08:43 -0700


I was wondering if it is possible/practical to proxy a specific URL to an orbited daemon (http://www.orbited.org/).

I have a basic setup that proxies "GET /orbited" to the daemon running on port 8000. HAProxy connects but there are some problems:

  1. orbited is receiving connections from HAProxy every second even though I have the server "check" option not set.
  2. When a client connects to "/orbited" on haproxy the request goes to orbited just fine, however the connection is dropped after 5 seconds (I presume by haproxy) which defeats the purpose of COMET :)
  3. When a client is connected to "/orbited" and a trigger is sent to the orbited daemon the event is not relayed to the client. I presume haproxy does not continue to listen for responses from orbited daemon as the connection is already closed.

The whole reason for wanting to use HAProxy is to direct a specific URI to a socket running on a different port than your standard apache so that there are no javascript security problems on the browser side. Now if HAProxy has the same limitations as apache/backend when many client connections are kept open for a long time then using HAProxy is obviously not a solution either.

Any comments on this setup? Any other solutions that anyone is running to get COMET working on same hostname:port as main website?

Thanks!
Christoph Received on 2008/01/30 21:08

This archive was generated by hypermail 2.2.0 : 2008/01/30 21:15 CET