R
R
RSalo2019-05-12 22:50:57
Google
RSalo, 2019-05-12 22:50:57

Google's databases?

Hello. I am very interested in the question of how much they weigh and how quickly does Google make its backups during the next update of the service (s)? After all, they have almost no downtime at all during updates. Even if they take a snapshot of the database, roll on it all sorts of inserts / updates / triggers, then apparently it takes quite a long time and if there is some kind of fail and you need to rollback, then all data after the snapshot is considered lost, which is unacceptable for google. Maybe they have some kind of magicians and sorcerers working there? =)
I would like to do this too, but I can’t figure out how to do something.
There were other thoughts like this:

master(m1)<->master(m2)->slave(s2)->slave(s3)
m1 - we use the main m2 as a reserve. In s2, we roll out all the changes for updating and hang up the necessary triggers to update new fields, if our database structure suddenly changes. s3 - a backup copy of s2, which is then promoted and cleaned of any garbage (extra fields, types, etc., if the database structure has changed) and is used as the main database during the update. But there is still the question that data is lost due to the lag of writing to slaves and the asynchrony of writing + 4 extra bases appear.
I've already broken my head, tormented with this question, can anyone give advice on a fresh mind, so that everything is without data loss and with minimal downtime? =)
PS seems to have come up with a way out. It is necessary to lock the table for writing to the database and on the back / front to think over a solution that would not allow the user to take actions to write / update anything, until all the slaves catch up with the master and the slave promotion and switching to him, as the main base. But that's just the solution. With a large database and a sufficiently large number of records per second, it is not known how long the slaves will catch up with the master...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Shumov, 2019-05-12
@RSalo

How naive you are. It doesn't work that way at all. On such scales, other rules

A
Alexander, 2019-05-12
@AleksandrB

At them there like RAID is used. Data is written to multiple discs simultaneously.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question