ISP Config failover cluster

Discussion in 'Installation/Configuration' started by Jiri Benes, Nov 26, 2018.

  1. Jiri Benes

    Jiri Benes Member

    Hello guys,

    I would like to implement ISP Config for my client and one of his requirements is to be able to run ISPC from two different locations (Web, DNS and SQL on separated servers) when one location goes down (blackout, meteor crash etc :)) ).
    Is it possible to have 2 master DB servers in two different locations and replicate them? So each of master server is actual and if one of master servers goes down second can server ISP Config servers.

    I´d like to have 1 master server 1 DNS 1 Web and 1 SQL server for each location.

    Thanks for any help :)

    Regards
    Jiri
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I tested two ISPConfig db servers clustered on two different locations and they replicate just fine. So, I'd say this setup is very much possible.
     
  3. https://www.howtoforge.com/tutorial...abase-cluster-on-debian-8.4-with-ispconfig-3/
    This is a good base to start.
    From experience, server2 will handle every services if server1 fails (but you won't be able to modify anything via ISPConfig dashboard without server1).
    Edit : websites and database sync between servers need to be fast and reliable, I won't expect good results with a 500ms ping between the 2 servers.
     
    ahrasis likes this.
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I want to add a question, that may be others can share their opinions or experiences.

    Is it wise to use the same hostname fqdn for both ISPConfig db servers on different location and with different ip?
     
  5. Jiri Benes

    Jiri Benes Member

    Thanks! But what if I want to use ISPC panel even after first one crashed? I red that it´s possible to replicate master DB in master-master mode.
    So I would go for 2 separated ISPC installations and replicate master databases and slave servers. But not sure if it´s a good idea at all or if it will work.
     
  6. Even if database replication is master-master, the 'is mirror of' function in a cluster invokes that 'main' server has to be alive.
    The 2 servers are using different databases.
    @till told me here that 'main' database has to be alive to have changes propaganed, so it needs another database server to make a 3 legs cluster (hoping to have well understood).
    I'm on this, trying with VMs first...
     
  7. I think that would create (soon or later) confusion (but I thought to do it too)
     
    ahrasis likes this.
  8. Jiri Benes

    Jiri Benes Member

    I´m not sure if I understand it correctly.
    Lets say we have 2 VMs. First is main with ISPC panel and master DB (Web, DNS, mysql) and a second is a mirror of a master. If master goes down mirror wont be able to serve any services ? I mean if master goes down all websites etc wont be available even if mirror server is still up?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    No. If the master goes down, services on the mirror are not affected. The only thing that you can't do is add new websites, or email accounts until the master is up again.
     
    ahrasis and electronico_nc like this.
  10. All services will run 'as they were' when main server failed. No changes proparganed through ISPConfig dashboard.

    If that's a webserver, all websites pointing to 'dead main server'... is not a confortable situation.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Why shall all sites point to the dead server? Normally you have a load balancer in such a setup in front of your server cluster or you work with floating IP's that get switched to the active node, so neither sites nor mail will point to the dead system in that case. Like I explained above, the only thing that is not available is the ability to add or alter websites, mailboxes, etc.
     
    ahrasis and electronico_nc like this.
  12. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I also expect minor confusion but the aim is to used both as master-master db servers, so presumably if one is down, the other would still be accessible and usable by the web server(s), is there any logic in this?
     
  13. @till, you're right.
    When it (main server death) happened to me, I was thinking : nice, just have to change A entries for websites through the API script I wrote (too few ISPConfig understanding at this time).
    It will be floating IP for me (still on the bench).
     
  14. @ahrasis
    For me trouble occurs with DNS : what will tell your system to point to right server ? As @till said : load balancer or floating IP.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem with the DNS change approach is in my opinion that it's too slow. Some dns caches do not care about the TTL you've set, so the sites would be unavailable for hours in the worst case for some users until their dns caches are cleared. Beside the problem that you won't be able to change DNS trough ISPConfig master, while there workarounds for that of course like making the master DB highly available.
     
    ahrasis and electronico_nc like this.
  16. Cool ! I had understand correctly ! (working on this too)
    Thanks @till !
     
  17. Jiri Benes

    Jiri Benes Member

    Well I probably described my ISP Config environmet wrong. I will have only one server virtual server for ISPC administration, web, DNS and mysql services. And I would like to mirror this server to another location so if master server is not available (HW crash etc) second server still can serve web dns sql services. Does mirroring copy a web content to slave?
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  19. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    @electronico_nc, I did read about high availability database servers but I concluded that they are quite expensive setup for starters since the setup involves at least two load balancer, two database servers and floating ip.

    Anyway, I guess the setup I mentioned should work fine too so long as both ip for db.domain.tld servers are already specified in dns server.

    @Jiri Benes sorry to add up a question in your thread as I thought it is relevant but as said by @Taleman, the cluster setup should work just fine for your needs.
     
    electronico_nc likes this.
  20. Hi,
    You're right, I made searches too ... Using already made databases cluster seems very expensive too.
    One way would be to mutualise to use 4 (or more) servers and create our own database cluster.
    Proximty to Web servers for everyone could be an issue anyway,
    Probably geoip can be used so that the nearest database server is used by client.
    That's just thoughts, I don't know if people would be interrested by this kind of setup.
    Nicolas
    EDIT : datas encryption would be a must too...
    EDIT 2 : @Jiri Benes : please, excuse-me for your thread pollution.
     
    Last edited: Nov 29, 2018

Share This Page