How does database clustering work?

I have a question for DBA: if I scale from one web server / database server setup to two web server settings and two database servers using a load balancer in front of web servers to evenly route incoming requests ... how such solutions work like MySQL Cluster, so changes made on one database server are immediately known to others (otherwise users redirected to another database server will not see data or outdated data) or at least so that another web -server knows that o is he reading "dirty data" and he has to try again in X seconds to get updated data?

Thanks.

+4
source share
3 answers

In clustering Windows servers (different from high-performance clustering), there is a common external storage array. The active node receives ownership / storage management, and when this node fails, the storage “fails” to the previously passive node (which is now the active node). There are also various schemes that provide independent storage on each node, as well as on shared storage. However, this requires the application to have sufficient intelligence to know that it is clustered, and keep two sets of repositories in sync.

+2
source

TWO ways to do it. Active / active or active / passive. Active / Passive most common Data is stored in synchronization on a passive node. The cluster is a useful configuration, since the active node goes down, the passive one switches immediately, therefore, there are no downtimes. Clustering continuously synchronizes 2 nodes in a cluster.

I work with an SQL server, but I think that the basic premise of clustering for mySQL is the same - there is no (or no noticeable) downtime for a hardware failure.

EDIT: In addition, clustering software handles synchronization. You do not need to worry. You look at the cluster nodes as a virtual directory, which behaves like a single server in windows.

here is a document explaining this

http://www.sql-server-performance.com/articles/clustering/clustering_intro_p1.aspx

+3
source

Clustering is also related to the fact that the number of nodes handles the workload, sometimes called active / active clusters, that is, all nodes share the workload and are active. This is usually handled by special software such as Oracle RAC ( RAC @Wikipedia ) for the Oracle RDBMS database. RAC allows Oracle to scale to very large workloads.

0
source

Source: https://habr.com/ru/post/1286332/


All Articles