Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HAProxy and nodeJs server using SocketIO
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
hd nguyen  
View profile  
 More options Jul 30 2012, 5:52 am
From: hd nguyen <nguyenhd2...@gmail.com>
Date: Mon, 30 Jul 2012 16:52:08 +0700
Local: Mon, Jul 30 2012 5:52 am
Subject: HAProxy and nodeJs server using SocketIO

Hi all,

I did some google search but not find any detail document described about
combination between HAProxy and Nodejs apps(use socketIO), something for me
to believe that it can work well.

I have another option is Nginx, but just want you guys help me to confirm
that is it possible to use HAproxy as load balancer for Nodejs server farm
(using SocketIO to transfer data)?

Thanks in advance.

--
Nguyen Hai Duy
Mobile : 0914 72 1900
Yahoo: nguyenhd_lucky


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Łukasz Michalski  
View profile  
 More options Jul 30 2012, 7:33 am
From: Łukasz Michalski <l...@zork.pl>
Date: Mon, 30 Jul 2012 13:33:30 +0200
Local: Mon, Jul 30 2012 7:33 am
Subject: Re: HAProxy and nodeJs server using SocketIO
On 07/30/2012 11:52 AM, hd nguyen wrote:

> Hi all,

> I did some google search but not find any detail document described
> about combination between HAProxy and Nodejs apps(use socketIO),
> something for me to believe that it can work well.

> I have another option is Nginx, but just want you guys help me to
> confirm that is it possible to use HAproxy as load balancer for Nodejs
> server farm (using SocketIO to transfer data)?

Yes, using two instances of haproxy.

Look in the archives for my eariler posts.

Regards,
Luke


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Strimpel  
View profile  
 More options Jul 30 2012, 11:29 am
From: Jason Strimpel <jstrim...@gmail.com>
Date: Mon, 30 Jul 2012 08:29:21 -0700
Local: Mon, Jul 30 2012 11:29 am
Subject: Re: HAProxy and nodeJs server using SocketIO

I set up a proof of concept using haproxy a few months back. It worked
well.  haproxy was listening on port 80 then directing socket traffic to
node and static resource requests to nginx.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hd nguyen  
View profile  
 More options Jul 30 2012, 11:39 am
From: hd nguyen <nguyenhd2...@gmail.com>
Date: Mon, 30 Jul 2012 22:39:29 +0700
Local: Mon, Jul 30 2012 11:39 am
Subject: Re: HAProxy and nodeJs server using SocketIO

Please send me the link to your earlier poet @Lucas.

--
Nguyen Hai Duy
Mobile : 0914 72 1900
Yahoo: nguyenhd_lucky

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shripad K  
View profile  
 More options Jul 30 2012, 1:43 pm
From: Shripad K <assortmentofso...@gmail.com>
Date: Mon, 30 Jul 2012 23:13:24 +0530
Local: Mon, Jul 30 2012 1:43 pm
Subject: Re: HAProxy and nodeJs server using SocketIO

@hd nguyen. I have put up a config file here :
http://stackoverflow.com/questions/4360221/haproxy-websocket-disconne...

For polling transports you can balance source or use cookie based
persistence. I would suggest you use cookie based persistence along with
balance source coz IP based balancing alone doesn't work well when clients
have dynamic address.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hd nguyen  
View profile  
 More options Jul 30 2012, 9:57 pm
From: hd nguyen <nguyenhd2...@gmail.com>
Date: Tue, 31 Jul 2012 08:57:04 +0700
Local: Mon, Jul 30 2012 9:57 pm
Subject: Re: HAProxy and nodeJs server using SocketIO

Thanks Shripad,

I will take a look at it and get back to you later.

On Tue, Jul 31, 2012 at 12:43 AM, Shripad K <assortmentofso...@gmail.com>wrote:

--
Nguyen Hai Duy
Mobile : 0914 72 1900
Yahoo: nguyenhd_lucky

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philmod  
View profile  
 More options Aug 1 2012, 4:52 am
From: Philmod <philippe.mod...@gmail.com>
Date: Wed, 1 Aug 2012 01:52:33 -0700 (PDT)
Local: Wed, Aug 1 2012 4:52 am
Subject: Re: HAProxy and nodeJs server using SocketIO

Jason, can you provide more information about?  Maybe a blog post or github
link?

Thanks,
Philmod


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mgutz  
View profile  
 More options Aug 1 2012, 5:27 pm
From: mgutz <mario.l.gutier...@gmail.com>
Date: Wed, 1 Aug 2012 14:27:49 -0700 (PDT)
Local: Wed, Aug 1 2012 5:27 pm
Subject: Re: HAProxy and nodeJs server using SocketIO

Our setup in production is

Stud - SSL termination. HAProxy doesn't do SSL.

HAProxy - load Balancer. Can handle websockets. Basically, haproxy sends
websocket traffic to 1 or more node servers. We didn't bother with node
cluster.  Static requests are forwarded to nginx.

Nginx - serve static assets. Nginx doesn't yet support web sockets. Varnish
would be a viable option but nginx will support websocket in the near
future.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arne de Bree  
View profile  
 More options Aug 1 2012, 5:33 pm
From: Arne de Bree <a...@de-bree.nl>
Date: Wed, 1 Aug 2012 23:33:52 +0200
Local: Wed, Aug 1 2012 5:33 pm
Subject: Re: HAProxy and nodeJs server using SocketIO

Same can be achieved using stunnel for ssl termination (or AWS ELB's in
TCPssl mode)

Downside of all this is that you loose the Client IP. None of stud, stunnel
or ELB in TCPssl mode will set the X-Forwarded-For, which caused me to
fallback to xhr and jsonp polling transports and use regular HTTPS
termination sollution.

You also want to watch out if you need stickyness or not, when you need to
keep state in your Node.js server, and you have multiple of them. Keep some
kind of stickyness in sight, or you need to share state between your nodes.

Regards,
Arne

--
Met vriendelijke groet / with kind regards,

Arne de Bree

www.arnedebree.nl
+31 6 11208981
@adebree


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Strimpel  
View profile  
 More options Aug 1 2012, 11:35 am
From: Jason Strimpel <jstrim...@gmail.com>
Date: Wed, 1 Aug 2012 08:35:48 -0700
Local: Wed, Aug 1 2012 11:35 am
Subject: Re: HAProxy and nodeJs server using SocketIO

Philmod

Unfortunately all the work was done on a centos box that no longer exists.
I have a bunch old haproxy conf files hanging around on my desktop like
https://gist.github.com/3227797. I am not sure which conf was the final. I
kept changing the config because I ran into an issue like
https://github.com/LearnBoost/socket.io/wiki/Socket.IO-and-firewall-s... on
a WIN7 box, but did not recognize it. Below are couple links that I think I
used to get started.

http://engineering.bistri.com/post/14307969768/socket-io-haproxy-http...

http://www.darkcoding.net/software/proxy-socket-io-and-nginx-on-the-s...

Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mgutz  
View profile  
 More options Aug 2 2012, 6:39 pm
From: mgutz <mario.l.gutier...@gmail.com>
Date: Thu, 2 Aug 2012 15:39:58 -0700 (PDT)
Local: Thurs, Aug 2 2012 6:39 pm
Subject: Re: HAProxy and nodeJs server using SocketIO

We create chat rooms based on client's remote address. Our deploy
environment is close to this article, except we use stud since it performed
better.

http://www.darkcoding.net/software/proxy-socket-io-and-nginx-on-the-s...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »