Am 10.01.2013 um 10:02 schrieb Sven Van Caekenberghe <sven@stfx.eu>:
On 09 Jan 2013, at 19:31, Norbert Hartl <norbert@hartl.name> wrote:
Am 09.01.2013 um 16:11 schrieb Sven Van Caekenberghe <sven@stfx.eu>:
Norbert,
On 09 Jan 2013, at 14:57, Norbert Hartl <norbert@hartl.name> wrote:
Am 09.01.2013 um 14:30 schrieb Sven Van Caekenberghe <sven@stfx.eu>:
Since most proxies and load balancers, most notably Apache, don't handle the WebSocket protocol very well, the only solution is to arrange for direct connections to the Smalltalk image.
Who's interested in load balancing for websockets should look at HAProxy (http://haproxy.1wt.eu/)
FYI,
Norbert
Yeah, I knew that HAProxy seems to be able to do it, but I didn't want to learn how to deal with the complexity of yet another technology stack. There is also the fundamental question whether it makes sense to proxy/tunnel the semi-permanent WebSocket connections. You would consume twice the resources while gaining little.
Agreed about yet another stack. But I don't think there is something like a fundamental question about those things. In my experience the first or second new requirement to your project always proves you wrong :) There are often use cases where it is inevitable to have a single entry point, have balancing even for TCP connections, pinning, etcâ¦
Have you used HAProxy ? For WebSockets too ?
I used HAProxy 5 years ago or so. But I'm referring to the experience of a friend of mine who actually uses it in production for http://www.userlike.de/. He uses Socket.IO for the chat connections and there are requirements he needs to use something like HAProxy.
Cool. So you like HAProxy. Would you say it is easy to use compared to Apache ?
As I said, my experience with HAProxy is quite dated. It works great but what I remember it was quite hard to convince HAProxy to do what you want to. This situation should (!) have change in the meantime. At least there should be some documentation for certain use cases. HAProxy is widely used in installations so that would be my hope. Apart from that I'm glad my current stuff can be handled by nginx only and I don't have to use any of HAProxy, varnish, etc⦠These are all good pieces of software with an awful way of configuring it. And you need to know exactly for what purpose they are designed. At the end they are not very flexible that's why you have to find the right software that fits your needs. And when it comes to http every of those solves a distinct 5% of the overall puzzle.
Maybe I do have to try it when I have some time.
IMHO that is always a good idea if you set yourself a limited time frame for it.
If you would recommend it, what would be a good place to start, a good tutorial ?
I think it's best to wait for my friend to return from vacation (within the next days). I'll bug him them for the information and links and get to you back.
Btw. my post wasn't meant to "you should use HAProxy". I just wanted to give some hints for people who feel they need for it.
Yes, I understood it that way ;-)
Good :) Norbert