Some buyers ask for automatic failover between two data centers, so that calls keep working even if one whole site goes down. On MOR, the short answer is no: its automatic failover works inside one data center. On M4, the answer is yes, with a four-server layout split across two data centers. Kolmisoft can host that layout in two of its own data centers, or install it on your servers.
Before you choose, be clear about which failure you are protecting against, because each step up costs more servers and more care than the one before.
Backup, spare server, second site
A backup protects your data. If a disk dies, you restore the database onto another server and carry on. On MOR, the built-in backup is a dump of the database: CDRs, invoices, users and providers. Configuration files, Asterisk files and audio recordings are not in that dump, so back them up separately. You can also run a live copy, which is a second database that receives every change as it happens. If the main disk dies, the copy is identical or nearly identical. Neither option keeps calls running, though. They only make sure the data survives.
A spare server in the same data center protects the service when one machine dies. This is the most popular MOR setup, M4 offers the same option, and it is what most people mean by server redundancy. The next section explains how it works.
A second data center protects the service when the whole site is lost, for example in a power or network outage at the provider. It is also the hardest to get right, because the two sites have to agree on every balance and every CDR across a link that can break.
| You want to survive | You need | What keeps working |
|---|---|---|
| A dead disk | A backup or a live database copy | Your data |
| A dead server | A spare server on the same network | New calls, on the same IP address |
| A dead data center | A second site and a reliable link between them | New calls, if both sites agree on the data |
Redundancy does not add capacity. A standby server waits, and it carries no calls until the main one fails. If you need more concurrent calls, you need more active servers. That is a separate decision, covered in MOR vs M4.
How failover works on MOR, and why it stays in one data center
MOR’s automatic failover depends on a virtual IP address. That is the address your customers and carriers send calls to, and it is not tied to one machine. Two servers sit on the same network, and MySQL replication keeps their databases in sync. The main server holds the virtual IP. If it stops responding, the spare (the failover server) takes over the address after about 10 seconds and starts accepting new calls. Nobody has to change anything on their side, because the address stays the same.
That only works when both servers are on the same subnet, and two data centers can’t give you that. There are two ways around it. You can stretch one network across both sites with a VPN, or you can point a DNS name at the live site and change the record when a site fails. Both can be made to work, but you would build and run them yourself. Kolmisoft doesn’t automate the DNS change, and custom failover scripts are not a service it provides.
Kolmisoft also advises against splitting the pair across sites at all. If the database link between the sites breaks, the two copies drift apart, and you can’t merge them later without losing calls and billing data. That is the rule in our article How big a system: concurrent calls, CPS and servers. For the same reason, Kolmisoft recommends keeping MOR’s Asterisk and database servers in one data center, since delay between networks causes problems of its own.
MOR does have one layout that runs in two locations: two servers with two separate IP addresses, rated up to 1,000 concurrent calls. Your customers and carriers spread calls across both addresses. That layout adds capacity, but it is not failover between sites. If the link between them drops, each server keeps taking calls and billing on its own, and you end up with two sets of balances that no longer match.
So MOR has no automatic failover between two data centers. The safe MOR setup is a redundant pair in one data center, with a copy of the database kept somewhere else.
How M4 runs across two data centers
M4, our Class 4 softswitch, has a published layout for two data centers. It uses four servers across the two sites:
- Each site has a SIP and media server with its own IP address, and both take calls at the same time.
- MySQL replication keeps the data in sync between the sites.
- Traffic is spread with DNS SRV records, which list both sites so that your customers’ equipment can send calls to either one. The switching happens in DNS and on the calling side, not inside M4.
- If the main database and core server in the first site fails, the backup in the second site takes over and the system keeps running. If one site’s SIP server fails, calls go to the other site.
This avoids the problem MOR has, because no IP address ever has to move between buildings. Each site keeps its own address, and DNS does the switching. The database link is still the weak point, though. If replication between the sites fails, you face the same risk as on MOR: two databases that disagree. Test that link before you rely on it, and make sure someone watches replication once you go live.
Kolmisoft can host this layout across two of its own data centers, or install it on servers you own. There is no published concurrent-call figure for this layout, so ask for one sized to your traffic instead of borrowing a number from a different layout.
What survives the switch
Failover protects new calls. Plan on losing the calls that were up on the failed server. Their audio and signalling ran through that machine, and nothing in these layouts hands a live call over to the spare. If a customer asks whether failover is seamless, the accurate answer is that new calls keep working and live calls on the failed server are lost.
Balances and CDRs survive only if replication copied them before the failure. A top-up or a CDR written just before the crash may not have reached the other side. On a two-site setup it can get worse: if the link breaks while both sites keep running, both sides can keep writing, and those changes can’t be merged cleanly afterwards.
So test it before you promise anything, in a maintenance window you choose:
- Note one customer’s balance and the newest CDR.
- Stop the main server. Check that the spare takes over within about 10 seconds and that a new call connects.
- Compare the balance and the CDRs on the spare with your note. Anything missing is data you would lose in a real failure.
- On a two-site M4 setup, cut the link between the sites and leave both running. Check that new calls still connect, and that the second site still acts as a backup instead of becoming a separate system.
When a second data center isn’t worth it
A second site means more servers in another building, plus a link that has to stay healthy. That only pays off if losing a data center for a few hours would cost you more. Work it out roughly: the calls you couldn’t carry during an outage, plus the disputes if balances went wrong, against the extra servers and the work of running replication between sites.
For many operators, the better choice is a redundant pair in one good data center, plus a live database copy in a second location. The pair covers the common failure, a dead server. The off-site copy means that even if the whole data center is lost, your data is not. The sizing article linked above shows how many servers that takes.
Other platforms handle this in different ways. Some keep a standby site that takes over when the main site can’t be reached, and still require both sites to act as one private network. Others spread calls across geographic zones using DNS, and note that moving between zones adds delay. Whatever you compare, ask the same two questions: what happens to calls in progress, and what happens to balances if the link breaks?
Tell us what needs to survive
Send us your two locations, your peak concurrent calls, your peak calls per second, and what has to keep working during an outage: new calls, balances, or calls in progress. We’ll tell you which layout fits, or say so if none does.
Which layout fits the two sites?
Contact us with the two locations, the peak calls, and what has to keep working.