1 Webserver, 2 ISP static IPs, load balancing.. how to do it?

By HungryMind
Oct 30, 2011
Post New Reply
  1. Hi Guys,

    Got very good inputs from the forum on setting up my network..and its working fine now.

    Got one more issue where I need inputs from experts for the best way to do it.

    I have got a webserver running behind a router. Now I am planning to add redundancy by taking another static IP from other ISP.

    And I wish to balance my incoming load between two connections.

    What would be the best way to reach this goal with minimum cosyt involved and best security.

    Do I add multiple NIC card on the websers, would that help

    Or is it possible to connect two router to same switch.

    or would HA proxy be of any help n addition to something above.

    Any pointers to a good site or tutorial would also be gr8

  2. jobeard

    jobeard TS Ambassador Posts: 11,128   +982

    yes, this can work with (2x) nic's in the webserver
    isp#1=== webserver === isp#2
    is not trivial.
    As shown, the first connection (let's assume it's #1) will get the default route in your
    routing table (that's in the webserver, not a router or switch). The default route is important & solves the question
    • where do I send the data when I don't know the IP address?
    It's the DNS that does this and it will be routed to the default gateway
    (see route print).

    Adding a router +- a switch or two do not solve the problem.

    The presence of isp#2 will only add a specific route for that ISPs gateway.
    1. If isp#1 gateway is at
    2. isp#2 gateway is at
    3. your webserver is at
    then the routing table might well look like
    Network Destination        Netmask          Gateway       Interface  Metric
         [COLOR="Blue"][/COLOR]       20
          [COLOR="Blue"][/COLOR]     [COLOR="Blue"][/COLOR]       20    
          [COLOR="Red"][/COLOR]      [COLOR="Red"][/COLOR]    [COLOR="Red"][/COLOR]      20
       20       20
         20       1
    Default Gateway:
    the -> is the default for all unknown traffic
    the -> would be all local traffic on that nic
    and -> would be local traffic for the 10.1.2.* nic.

    THERE IS NO WAY to round-robin requestes between the
    192.168.0.* connection and the 10.1.2.* connection

    Load Balancing is frequently done by
    • registring a domain name
    • adding two more more DNS servers for that domain
    • and then choosing a round-robin scheduling technique to provide a different one to every dns request.
    Using google.com as an example, there are FOUR dns servers
    Domain servers in listed order:
    • ns1.google.com ==>
    • ns2.google.com ==>
    • ns3.google.com ==>
    • ns4.google.com ==>

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...