[aida] WebSockets behind a proxy

Phil (list) pbpublist at gmail.com
Wed Jun 15 13:06:18 CEST 2016

So I've done some more investigating and I think what's going on is
that the client is opening up the WebSocket with Apache, and Apache in
turn is attempting to open up a WebSocket with Aida.  It looks like it
is this second hop that is having the problem.

If I'm following what's going on correctly it appears that by the time
the request times out the SwazooBuffer has the correct request header
(i.e. the host name matches what I'd expect to see from the proxy
server and it is a connection upgrade request) in its read buffer (i.e.
its internal collection ivar) but when I attempt to #fillBuffer I still
get a StreamNoDataError: No data available. Socket probably closed.

I'm thinking (more accurately at this point: guessing) perhaps the
request is arriving in an unexpected manner from Apache? i.e. because
it's effectively relaying the request in a less direct way than it does
with non-WebSocket requests there might be a small delay between the
request starting and the header data actually becoming available that
is causing Swazoo some problems?  Note that only WebSockets are having
this problem, everything else in Aida is working fine behind the Apache

On a related note: unfortunately, the Swazoo website appears to be gone
so any docs on its internals are no longer available.  Is there
anything (docs, diagrams, mailing list archives) that you might have
copies of that you could post on the Aida site that might be helpful in
working through this?


On Tue, 2016-05-31 at 11:34 +0200, Janko Mivšek wrote:
> Phil (list) je 25. 05. 2016 ob 22:29 napisal:
> > I was taking a look at using WebSockets for an application but it
> > appears that Aida/Swazoo doesn't know how to deal with WebSockets
> > from
> > behind a proxy without a bit of work (i.e. where the connection has
> > been pre-upgraded by Apache.)  I was wondering if there are any
> > pointers as to how to best handle this scenario?
> It is supposed that a proxy server deals with proxying WebSocket 
> requests, AFAIK. So far my real-time apps are on intranets, so I
> didn't 
> yet have this case to know more about.
> Best regards
> Janko
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

More information about the Aida mailing list