3. 13.5 Billion year ago was nothing !
For backup and Point In Time recovery the
BINARY LOGS
was born
4. Early after the replication was born in MySQL 3.23.
Replicas track binlog files position and get notified for new events !
IO Thread for copying events
SQL thread for applying events
BINARY LOGS ARE CROSS ENGINES
AND STATEMENT BASED
5. But the story get more complex
GOTCHA WITH BINARY LOGS
DON’T SCALE FOR WRITES
# FSYNC IS LIMITED ON DISK
Workaround was not to sync bin logs making repli
CRASH UNSAFE
MariaDB Fixed it in 5.5 with
TC + GROUP COMMIT
6. WRITE PERFORMANCE IS BACK
REPLICAS CRASH SAFE in 10.0
According to Facebook first implementation of google patch for group commit
7. But the story get more complex
NOW LEADER IS TO FAST REPLICAS CAN’T CATCH
DON’T SCALE FOR WRITES
Need Parallel Replication
Workaround was using Tungsten replicator, Galera Group replication , implement
prefetch events on slaves
MariaDB Fixed it in 10.0 and improved it 10.1 with
In order parallel replication and Optimistic Commit
8. WRITE PERF IS BACK ON REPLICAS
According to Booking slave group commits enable to go faster vs the workload x4
http://www.slideshare.net/JeanFranoisGagn/mysql-parallel-replication-inventory-usecase-and-limitations
9. In the last microsecond of evolution !
REPLICATION
BECOME CRASH SAFE AND REPLICAS CAN CATCH
BINARY LOGS
STILL NO GOOD FOR REPLICAS ELECTION
10. But the story get more complex
Replicas track position in files and not unique TX ID
Need GTID
Workaround: pseudo GTID, parse diff like MHA, TUNGSTEN or BINLOG server
MariaDB 10.0 Fixed it without gotcha
Domain ID - Server ID - Transaction seq #
No downtime implementation
11. But the story get more complex
TRX on Leader not guaranteed to be on any replicas
Fixing can be seen as regression ?
Workaround: Galera , NDB cluster, MongoDB
MariaDB 10.1 Not fixing only with Galera but improved Semi-Sync
Google patches for parallel Semi-Sync with group commit
12. In the last nanosecond of evolution !
MariaDB was feature ready for LEADER
ELECTION and so was born
Replication-Manager