[Openstack] Websocket support long term

Adam Young ayoung at redhat.com
Thu May 31 01:28:18 UTC 2012


The recent discussion about node.js made me rethink the state of 
Websocket support for Apache and Openstack.  A quick recap:

1) neither mod_wsgi nor mod_proxy support Web sockets.
2)  There is a Websocket Module for Apache, but using it requires an 
additional apache module.
3)  There is websocket support in Eventlet.
4)  The argument for node.js is the same for Eventlet:  rapid dispatch 
to support a large number of connections
5)  noVNC currently uses websockify, and uses a simplistic web server to 
proxy over VNC traffic.



The more I think about it,  the more I think that the simplest, and most 
correct path forward is to use the websocket Apache module,  and to 
write an additional module that will hook it up to Eventlet.  Eventlet 
can listen on a local Port (127.0.0.1 only) and Apache will map that to 
a suburl.  I'll code name it mod_websocket_proxy for now.

I've written a spec to package up mod_websocket for Fedora. 
http://admiyo.fedorapeople.org/apache-websocket.spec
It should be trivial to package it for Ubuntu as well.

Supposedly mod_python does support web_sockets,  but it has been called 
a dead project.  It might be possible to hack it back into shape as 
well, and use it only for websocket support. I don't have much 
confidence in this approach, but it is probably worth at least a cursory 
evaluation.

In the case of noVNC,  it probably makes more sense to link that up to 
the VNC server directly,  so we would need C code for websockify. That 
would then be exposed from dashboard under https://hostname/novnc/.  
While this could in theory be done using a combination of websockify and 
mod_websocket_proxy,  it probably will be worth the effort to 
performance tune  this in C.  We can start with the proxy and profile to 
justify the work prior to implementing.

I am not aware of current Websocket usage anywhere in openstack except 
for noVNC.   If you know of another location, or have a potential need 
for it in mind, please speak up.





More information about the Openstack mailing list