You might be interested: https://github.com/mikeal/stud-proxy
pure TCP load balancer that sits behind stud w/ --write-ip. we're using this rather than HAProxy. it's dirt simple to rewrite the load balancing rules and our service registry does whenever a process goes down or we do a deploy. it's also stupid fast as it's a pure TCP load balancer. so far i haven't been able to max it out because even with 16 virtual cores and stud running with 14 threads i max out on SSL processing before maxing out this stud-proxy node process. -Mikeal On Jun 15, 2012, at June 15, 20127:05 PM, Jimb Esser wrote: > Sort of tangental, but we also use stud (for SSL termination anyway, we use > HAProxy for the actual load balancing), and I had to set up a 'preparse' > event in the node http module so that we could pull the IP off of the start > of the stream before the stream goes to the HTTP parser. Very small patch > [1], but it does require you to build your own version of node. For the most > efficient proxies that don't inspect the HTTP stream (or those that can't > because its encrypted), this seemed to be the only way to get the source IP > address. > > [1] https://github.com/Jimbly/node/commit/e8952eb > > On Friday, June 15, 2012 4:49:40 PM UTC-7, Mikeal Rogers wrote: > really excited about this. > > a few questions: > > 1) do you have a way to write headers, at least for the first incoming HTTP > request on that socket? > 2) do you have a way to pass the origin IP to the balanced server. > > --------------- > > I've had a lot of luck with stud-proxy lately. For me, i drop the origin IP > and the backend application processes are unaware of it. But, stud has this > interesting thing it does, it will use the first 5 bytes of every new TCP > connection to tell me the origin IP. > > this got me thinking, why can't I do this for a load balancer? > > the hangup is that the applications processes would need to be using a > special server, not a generic HTTP server. that could be problematic for many > use cases but it could work for me. > > just thinking out loud a little. very interested in this approach. > > -Mikeal > > -- > 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 -- 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
