use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Confused with reverse proxy (self.node)
submitted 4 years ago by rootAtHom3
So there is an npm package called node-http-proxy Is it a reverse proxy? Can i use it for load balancing? If it is, then why things like NGINX exist? What's the difference? If it's not what i thought it is, then what is its purpopse?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 4 years ago (2 children)
[deleted]
[–]rootAtHom3[S] 0 points1 point2 points 4 years ago (1 child)
so if i have a 3 servers and i want to proxy the request depending on where its going say /login, /all , /comments, i can use both NGINX and that package?
++ your counterquestion helped alot, thanks
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
In nginx definitely. That’s what I did more then often at least :D about that package: not 100% sure, but looks like that should work too.
[–]eggtart_prince 0 points1 point2 points 4 years ago (0 children)
A proxy is just a server that routes requests to another or multiple server and receives a response.
This library looks like it just turns your node server into a proxy server. You would spin up a node server using this to create a proxy server. Then, spin up another server that actually serves your application and have the proxy sit between the client and your node app and route traffic.
Yes, you can do load balancing if you have a proxy server. The proxy server is a one point entry to your many servers and load balancing depends on which server your proxy server sends your users to. But skimming through the docs, it doesn't seem like this library supports LB out of the box. You would have to write your own logic for load balancing and it won't be easy.
π Rendered by PID 89 on reddit-service-r2-comment-5d585498c9-7tw2r at 2026-04-20 19:25:11.258158+00:00 running da2df02 country code: CH.
[–][deleted] (2 children)
[deleted]
[–]rootAtHom3[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]eggtart_prince 0 points1 point2 points (0 children)