Multiple regions deployments, lower delays and top reliability

March 27, 20223 minute read
Kirill Zinov

When managing the multiple location database deployment, the architects are trying to achieve two main goals: protect the project’s data from local disasters and bring a better user experience to regional clients due to closer servers’ location to the users. Nowadays, the local laws have become a factor of concern for IT-companies business too.

Scaling the data at multiple geographic locations has both positive and negative background. First we'll have to touch on the unpleasant issue of data loss, because it is often much easier to take preventive measures rather than dealing with the consequences. Then we will try to brighten up this negative aspect with positive sides database clustering brings to the end-user.

Don’t keep everything in one place

Even a top-notch data center can suffer from things like fire, natural disasters, or local authorities, not to mention a single server rack located in the company's office.

In March 2021 one of the largest hosting providers lost their client’s data. OVHcloud's SBG2 data center in Strasbourg has been destroyed by a fire. Despite the fact that data center fires aren’t common, even top companies come across such incidents. In 2022, Google reported about an electric explosion on the facility of the data center in Council Bluffs, Iowa.

However, it is quite easy to avoid data loss in events that cannot always be predicted, much less prevented - just add some remote location for project data replication. A place where the data will survive even if the main facility is completely lost. It could be just a few blocks away from the main servers, if you run your business within one country.

If your clients live in multiple countries, the local laws of those countries may introduce additional risks to the project. Various data privacy laws already exist in more than 80 countries. This is a serious reason to have an up-to-date copy of all the data at a remote location.

Better user experience

In the modern world, we often see more and more projects that are gaining popularity among users from all over the world. And now it is not necessary to be a multinational company with lots of branches in different continents to get benefits from data clustering.

Having a geographically distributed cluster not only guards you from the sad problems described above, but also makes your customers happier by reducing the response time from the database and providing peak performance of the local segment.

YaXAHA Cluster, out of the box, is better suited for this than vanilla PostgreSQL or existing solutions for master-to-master or master to multiple slaves replication because the cluster nodes are equal and the cluster analyzes the dependencies of individual tables to prevent conflicts at the transaction level, not individual table rows.

By directing client requests to the closest segment of the cluster, your users will receive the result of the transaction execution much faster. It becomes possible thanks to the YaXAHA Cluster features and shorter network route.

To ensure high reliability, the node that first received the client's request will wait for the transaction propagation only at the minimum of other nodes specified in the settings, and will return the response to the client without waiting for full transaction duplication throughout the cluster. Full transaction duplication will be performed asynchronously and without any conflicts between individual transactions.

YaXAHA Cluster is designed and coded for easy scalability, the database architects can choose which databases and which exact tables in the databases need to be synchronized within the cluster, the rest of the objects will exist only locally on separate nodes of the cluster.

Kirill Zinov
CIO / Principal Software Engineer