Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Using Nginx as a load balancer
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Using Nginx as a load balancer

khavkhav Member

I am new to load balancing and i do have some questions:P

Beware : Noob alert but every once start from somewhere

Lets take this for example

upstream web_rack {
        server 10.0.0.1:80;
        server 10.0.0.2:80;
        server 10.0.0.3:80;
    }

While its obvious that i need to host a replica of my website on 10.0.0.1 , 10.0.0.2 and 10.0.0.3 , do i need to setup domain(BIND ) on each of them or only on the main server.

If i understand well , there is one main server + 3 backend server that do load balancing

Shred some light on this guys

Thanks in advance

Comments

  • ben78ben78 Member

    Your DNS IN A must point to the main server and the server will send your request to the backends.

    If your 'main server' is down, then your website will be done for your visitors, even if the 3 backends are up...

    Thanked by 1khav
  • Why would you think you would need to set it up on each of them? You dont even need to set it up on the main/front server but you only need to have any valid DNS server pointing to it.

    Thanked by 1khav
  • khavkhav Member

    Thanks for your replies

    @neroux so i just need to buy the "backends" server , open a port then i add then DNS A records on the backends to point to the main server just as @ben78 said and it will be done

    So basically i am just using the computing power of the backends and not individually hosting my site in multiple locations

    Correct me if i am wrong

  • Almost ;), the backends dont point anywhere though. Only the frontend to the backends (with the configuration you posted above) and in turn the desired hostname to the frontend.

  • khavkhav Member

    @neroux Based on your reply its seems its just buy some servers(backends) , modify the nginx config on the main server to match the one i posted above and then its done:)

    Also do the upstream web_rack need to contain the main server ip or just the backends?

  • It also depends on the overall topology. Will all servers be in the same network or in distributed ones (your descriptions rather sounds like the latter)?

  • khavkhav Member

    It will be distributed ones ....like one server from NY another from Atlanta , Seatle etc...

    what about

    Also do the upstream web_rack need to contain the main server ip or just the backends?

Sign In or Register to comment.