ISPconfig on Debian Squeeze (Debian 6.0) with mirror server in different location

Discussion in 'HOWTO-Related Questions' started by Julian, Dec 2, 2011.

  1. Julian

    Julian Member

    Hi
    I want to install two servers like in this howto:
    http://www.howtoforge.com/installin...tabase-cluster-on-debian-5.0-with-ispconfig-3

    only using ISPconfig on Debian Squeeze (Debian 6.0) with mirror server in different location.

    My question is how can I do it so if the power goes down in one location to have the second server up in the second location.

    Thank you very much.

    PS: From I read on the forums that the GlusterFS its not so good. Do you think that its the best for what I need?
     
    Last edited: Dec 4, 2011
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If the servers are in different locations, then you should consider to use unison instead of glusterfs to sync the directories.
     
  3. Julian

    Julian Member

    Thank you Till for your answer, what about high availability when a server goes down?
    Because I don't want to become another "Single Point Of Failure", I want to provide high-availability for the servers,
    with the servers in different location with different ISP
     
    Last edited: Dec 4, 2011
  4. SwOsHiE

    SwOsHiE New Member

    You can write multiple dns records with different costs like:

    mail.example.com 10
    mail2.example.com 20

    so if mail.example.com is not responding it takes the secound best choice.
     
  5. Julian

    Julian Member

    On that server I have web, mail, dns, mysql! Not only the mail!
    Something like heartbeat its not posibile?
     
    Last edited: Dec 4, 2011
  6. SwOsHiE

    SwOsHiE New Member

  7. Julian

    Julian Member

    Thank you Swoshie for your answer, but I think that will work when the servers are in the same network!
    I have the servers in diferit location with diferit ip classes.
     
    Last edited: Dec 4, 2011
  8. Julian

    Julian Member

  9. Julian

    Julian Member

    Hi,

    Because I didn't find a solution to my problem and from what I see not too many users are trying to help me I decide to do this scenario:

    Web Server 1: http1.example.com, IP address: 192.168.0.100
    Web Server 2: http2.example.com, IP address: 192.168.0.101
    Virtual IP address that floats between http1 and http2: 192.168.0.99

    1. Configuring A High Availability Cluster (Mirror) with Heartbeat like here: http://www.howtoforge.com/high_availability_heartbeat_centos

    2. Installing A Web, Email And MySQL Database Cluster (Mirror) On Debian Squeeze With ISPConfig 3
    using this howto: http://www.howtoforge.com/installin...tabase-cluster-on-debian-5.0-with-ispconfig-3

    3. Setting Up Unison File Synchronization Between The Servers using this howto: http://www.howtoforge.com/setting-u...ization-between-two-servers-on-debian-squeeze

    4. Secure the server like here:
    Extending Perfect Server - Debian Squeeze [ISPConfig 3]
    http://www.howtoforge.com/extending-perfect-server-debian-squeeze-ispconfig-3

    What I'm trying to build:
    - A High Availability Cluster With Failover
    - if one server go down the mirror take his place
    - sync the files (webfiles, mail) between two servers (main server and the mirror)

    but I have couple questions:

    1. Do you think this is the best solution? I'm missing something?
    2. Do I need to install only Heartbeat or do I need to install other (like HAProxy, ldirectord)
    3. In the howto I saw that every time for High-Availability Load Balancer I need 4 servers. Can I do it with two servers, so it balance between them?
    Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Lenny
    http://www.howtoforge.com/setting-u...lancer-with-haproxy-heartbeat-on-debian-lenny
    4. Can the Virtual IP address be a public IP and the IP's from server be local IP's ??

    Here's a little diagram that shows what I want:

    shared IP=192.168.0.99
    192.168.0.100 192.168.0.101
    -------+----------------+-----
    | |
    +---+---+ +---+---+
    | http1 | | http2 |
    +-------+ +-------+
    haproxy haproxy
    heartbeat heartbeat

    I will really appreciate your help.

    Thank you
     
    Last edited: Dec 7, 2011
  10. Julian

    Julian Member

    Come on man! no one can help me??!!
    There are no techs here anymore!?

    There are a lot of nice howtos about this subject! its no one here?

    :((
     
  11. poisen

    poisen New Member

    Hey Julian,

    do you have a solution for your problem already? I wanna do the same thing, I have 2 servers, they are clustered already and that is working, now I only have the problem with failover so in case one of the 2 servers goes down, the other one does the business.
     
  12. Julian

    Julian Member

    no, I didnt found a solution to this:

    can you describe a little bit your solution?


     
  13. poisen

    poisen New Member

    I have 2 servers hosted at "Hetzner" and also have a failover-IP where you can switch between both servers using a web interface, but now I am a little bit confused since I don't exactly know what to do now. The DNS settings of a domain have to route to the failover-ip, is that correct? sadly, when I ping the failover-ip, I get no reply. Do I have to make some more settings on the two servers?
     
  14. falko

    falko Super Moderator Howtoforge Staff

    That's right.

    You have to configure the failover-IP on both servers (e.g. as eth0:0).
     
  15. poisen

    poisen New Member

    Hey falko,

    I did the following, edited /etc/network/interfaces and added

    Code:
    post-up /sbin/ifconfig eth0:0 178.63.45.111 netmask 255.255.255.192 broadcast 178.63.45.111
    post-down /sbin/ifconfig eth0:0 down
    
    afterwards did the following:

    Code:
    root@vishnu ~ # ifup eth0:0
    Ignoring unknown interface eth0:0=eth0:0.
    
    ....what am I doing wrong? The servers are hosted at Hetzner. Thanks for your help
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Is this a physical server or a virtual machine?
     
  17. poisen

    poisen New Member

    Hello falko,

    I have 2 physical machines and one failover ip ... I already figured out the network configuration, just added the following to both config files of /etc/network/interfaces

    Code:
    auto eth0:0
    iface eth0:0 inet static
      address   FA.IL.OVER.IP
      broadcast FA.IL.OVER.IP
      netmask   255.255.255.255
    
    only problem is now that I have problems receiving emails from domains that are configured through ispconfig. Do I have to configure multiple MX-records to each of the physical servers or do I configure only one MX-record to the reverse-dns of the failover-ip? I'd be very thankful to get an answer to that question.
     
  18. falko

    falko Super Moderator Howtoforge Staff

    You just need one MX record that points to an A record which points to your failover IP.
     
  19. bc2946088

    bc2946088 New Member

    Why not just use a DNS provider that has failover?
     

Share This Page