joewalnes / websocketd

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
http://websocketd.com/
BSD 2-Clause "Simplified" License
17.14k stars 1.01k forks source link

Document how to run websocketd behind a frontend #27

Open joewalnes opened 10 years ago

joewalnes commented 10 years ago

In some production setups, it's desirable to run websocketd behind another HTTP frontend such as Nginx or HAProxy. Benefits include:

Add to the wiki configuration example of how to do this.

asergeyev commented 10 years ago

link with #79

VincentVToscano commented 9 years ago

Would love to see how this is addressed. In our production environments, if this service is to be used, it must be load balanced.

asergeyev commented 9 years ago

Websockets are somewhat different than regular HTTP sessions and there is certain trickery that would be specific for each use case.... But... if we write about "usual"... what would it be? How many clients connecting to service per minute? How long session stays open? How many hosts we think needed to be balanced to handle that load? My websocketd numbers are all for internal tools so they are really low and not that interesting... (it's somewhat around ~10 clients a day keeping session open for 3-12 hours)

Busindre commented 7 years ago

I have added a basic documentation on the wiki to implement Nginx as a frontend in different ways. I hope it is useful.

https://github.com/joewalnes/websocketd/wiki/Websocketd-behind-Nginx