I'm learning about load balancing and way to configure the load-balanced server architecture, and I have a question about an architecture.
If I use load balancers, this means that I want to reduce load for each backend servers by putting them behind load balancers(nginx, haproxy, ...). Then, do I have to separate the load balancer and the other backend servers in physically different servers? It feels like there is no reason to put load balancer and backend servers together in a single machine, because that won't distribute the load at all (all the processes will be in a single machine).
In other words, for example, if I run nginx server in machine A, do I have to run Node.js backend server(s) in machine B? Or is it okay to put the entire architecture in a single machine?
I know there isn't best architecture, but I want to know about general architecture pattern.
If my question seems vague or hard to understand, please comment - then I will try to explain more concretely.
It is my understanding you would want to run each "load-balanced" server on a different box or VM. Otherwise, you are right, the load wouldn't be "balanced". You would run a backend for each server that is part of the load balanced cluster.