Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql cluster for dummies

So what's the idea behind a cluster?

  1. You have multiple machines with the same copy of the DB where you spread the read/write? Is this correct?

  2. How does this idea work? When I make a select query the cluster analyzes which server has less read/writes and points my query to that server?

  3. When you should start using a cluster, I know this is a tricky question, but mabe someone can give me an example like, 1 million visits and a 100 million rows DB.

like image 475
Uffo Avatar asked Aug 02 '13 08:08

Uffo


1 Answers

1) Correct. Every data node does not hold a full copy of the cluster data, but every single bit of data is stored on at least two nodes.

2) Essentially correct. MySQL Cluster supports distributed transactions.

3) When vertical scaling is not possible anymore, and replication becomes impractical :)


As promised, some recommended readings:

  • Setting Up Multi-Master Circular Replication with MySQL (simple tutorial)
  • Circular Replication in MySQL (higher-level warnings about conflicts)

  • MySQL Cluster Multi-Computer How-To (step-by-step tutorial, it assumes multiple physical machines, but you can run your test with all processes running on the same machine by following these instructions)

  • The MySQL Performance Blog is a reference in this field

like image 109
RandomSeed Avatar answered Nov 06 '22 14:11

RandomSeed