Thanks for the detailed response Willy.
I apologize for not being more specific about COMET.
The "COMET" concept encompasses the streaming of data to the client where the server is able to push new data to the client via a HTTP connection which the client opens to the server and the server keeps open for an indefinite period of time.
The server must be able to handle a large number of open client connections (subscribers) and provide a mechanism for an application to trigger events to be sent to the subscribers, usually via another TPC-based control protocol.
Orbited is a python implementation of such a server, Meteor is a perl implementation. The Meteor website (http://meteorserver.org/) has some excellent documentation on the concept.
The comment about apache not being able to handle COMET well was based
on the fact that it does not generally handle a large number of parallel
open connections well (with code holding the connection and polling a
que for events). You can find some details about the philosophy behind
the implementation of orbited here
(http://orbited.org/svn/orbit/trunk/docs/scalable_comet_speaking_notes)
which should give you a pretty good idea of the challenge.
To summarize again, the solution I seek is to be able to service HTTP requests on the same hostname and port where the requests for one set of URI's get sent to apache and the requests for a second set of URI's get sent to a COMET-optimized server that will handle a large number of open connections.
Looking forward to your response.
Thanks!
Christoph
Willy Tarreau wrote:
> Hi,
>
> On Wed, Jan 30, 2008 at 01:08:43PM -0700, Christoph Dorn wrote:
>> 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
This archive was generated by hypermail 2.2.0 : 2008/01/31 21:45 CET