Of course we can write a code snippet to redirect request to expected
server manually by node-http-proxy.

Based on https://github.com/nodejitsu/node-http-proxy/ examples, I just can
find snippet code to stick from proxy server to ONE nodejs (using websocket/
socket.io), I want redirecting from proxy server to 2 or more servers
(replication).

I guess node-http-proxy would be supporting it, because sticking from one
proxy to one server is not quite useful.

Waiting for more suggestions, thanks.

On Fri, Jul 27, 2012 at 9:08 PM, Bradley Meck <[email protected]>wrote:

> Load balancing is outside the scope of node-http-proxy. Configuration of
> load balancing algorithms is complex and least common denominator often
> leads to problems with things that use in memory storage across connections
> such as non-database sessions etc. There are multiple examples on npm and
> github of load balancers using node-http-proxy, but I doubt it will ever
> support configuration only load balancing.
>
> For socket.io in particular I would recommend using source to destination
> IP hashing, so that the same client always reaches a consistent server per
> proxy, but even that is only a few lines of code inside of your proxy.
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>



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

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to