Find the answer to your Linux question:
Results 1 to 5 of 5
Question: I have 2 zones. Zone 1 is my local infrastructure. Zone 2 is my virtual infrastructure which is hosted off site in a data center. In zone 1 I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4

    Simple IP failover based on ping


    Question:

    I have 2 zones.

    Zone 1 is my local infrastructure.

    Zone 2 is my virtual infrastructure which is hosted off site in a data center.

    In zone 1 I have files dropped off via fax/modem onto a server which then forwards them across a MAN (metropolitan area network) connection to it's respective server in my data center.

    I have an internet connection in zone 1 and a multi-homed internet connection in my data center (zone 2).

    This past weekend my MAN connection to my data center went down when they installed a new firmware on one of their routers.

    My MAN connection is the primary way that I want my data to flow, however if the MAN connection goes down I want to re-route the files to pass over the internet and then to my servers.

    Each server has a private ip and a public ip which is mapped through my firewall.

    Is there a way that I can set up a failover based on ping-ability to the server across the MAN connection? I would prefer a load-balancing solution because I will have to replicate this for a few servers. Bandwidth is not an issue because the files are only 1 - 2 MB max.

    I also need some kind of failure notification if possible. I usually use email and text messaging via Click-a-tell or a zabbix server. (I can code that part, I just need a return value)

    I have checked into LVS/Piranha/keepalived but I do not see anything that will fail over if a ping is not received and I can not use an agent because there is only 1 destination server.

  2. #2
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4
    failover.JPG

    Here is a basic diagram of what I am trying to do

  3. #3
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4
    I am thinking of doing a weighted round robin for this possibly since all of the load balancing packages that I've come across support this. I am wondering what kind of behavior it will look like in the event of a failure.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Look at routing and metrics. You should be able to have both up with one having a higher metric thus will only be used when the primary is down.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Nov 2012
    Posts
    4
    True. That would or should produce the desired results and would not require an extra server or service. I'll bring that up. They may want to do the weighted round robin in order to keep testing the connection. Thank you for the feedback!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •