This comprehensive guide covers everything from MongoDB's core concepts, data model, and architecture to practical commands for creating databases, collections, indexes, sharding, replication, aggregation, and troubleshooting, providing clear answers to over fifty frequently asked questions.
Facebook detailed its multi‑year journey from MySQL 5.6 to 8.0, explaining why it stayed on 5.6 for MyRocks development, the massive patch‑porting effort, replica‑set migration steps, adoption of row‑based replication, extensive automation testing, and the performance and compatibility issues uncovered along the way.
This article provides a comprehensive overview of MongoDB, covering its definition, document‑oriented storage, key features, differences from relational databases, sharding and replication mechanisms, common commands, data types, indexing, aggregation, and practical usage scenarios for modern applications.
This article explains why MySQL chooses B+ trees for its indexes, covers the left‑most prefix rule for composite indexes, offers practical index‑design tips, discusses MyBatis caching, master‑slave replication, and sharding strategies for large‑scale databases.
This article explains Kafka's high‑availability mechanisms—including multi‑replica design, ISR synchronization, and the impact of the request.required.acks setting—while diagnosing why a single‑replica __consumer_offset topic can cause the entire consumer group to stop when a broker fails.
An in‑depth look at Kafka’s multi‑replica architecture, ISR mechanism, and ack settings reveals why a single broker failure—especially of the __consumer_offset topic—can halt consumer reads, and how proper replication factors and configuration can ensure true high‑availability.
This article introduces a curated list of open‑source MySQL operational tools—including online DDL changers, backup and restore utilities, load‑testing frameworks, flashback solutions, slow‑query analyzers, replication consistency checkers, audit platforms, and graphical clients—explaining their principles, usage scenarios, and visual references.
This article provides a comprehensive overview of distributed system fundamentals, covering concepts such as nodes, replicas, consistency models, data distribution strategies, lease and quorum mechanisms, two‑phase commit, MVCC, Paxos, and the CAP theorem, while discussing their practical engineering trade‑offs and failure handling.
This article explains Kafka's high‑availability mechanisms, covering multi‑replica design, ISR synchronization, leader election, acknowledgment settings, and the hidden risk of the __consumer_offset topic's single‑replica configuration that can cause an entire cluster to become unavailable when one broker fails.
This article provides a comprehensive overview of distributed system fundamentals, covering system models, replicas, performance and availability metrics, data distribution strategies, replica protocols such as lease, quorum, two‑phase commit, MVCC, Paxos, and the CAP theorem, with practical engineering considerations.
This article explains the basic principles of MySQL master‑slave architecture, the role of read‑only replicas, loop‑replication problems, master‑slave delay measurement, various failover strategies, parallel replication mechanisms across MySQL versions and MariaDB, GTID usage, and read‑write splitting techniques, providing practical commands and diagrams for each concept.
Redis achieves its remarkable speed through a combination of in‑memory data storage, optimized data structures like SDS, ziplist, quicklist and skiplist, a single‑threaded command model, efficient I/O multiplexing, and sophisticated persistence, replication, Sentinel and Cluster mechanisms that together ensure high performance and reliability.
This guide explains how to safely recover MySQL data using full backups, incremental binlog recovery, point‑in‑time restores, single‑table extraction, and methods to skip erroneous SQL statements via GTID or delayed replication, complete with practical command examples.
This article explains why Kafka is used, its buffering, decoupling, redundancy and robustness benefits, details the ack reliability levels, storage design, replica synchronization, ISR handling, consumer partition assignment strategies, transaction support, exactly‑once semantics, and why read‑write separation is not provided.
This article explains Kafka's high‑availability architecture, including multi‑replica design, ISR synchronization, leader election, acks configuration, and how misconfigured __consumer_offset replication can cause consumer outages, offering practical steps to ensure reliable message delivery.
This article explains Redis master‑slave replication, detailing the replication principles, full‑sync steps, essential configuration file settings, commands to establish replication, verification methods, and a practical test showing data synchronization between master and slave instances.
Redis is an open‑source, in‑memory key‑value store that uses a compact memory model with SDS strings, offers RDB snapshots and AOF logging for persistence, supports master‑replica replication with full and partial sync, and provides high‑availability Sentinel and scalable sharding Cluster architectures.
This article explains Kafka's high‑availability mechanisms, covering multi‑replica design, ISR synchronization, leader election, the impact of the request.required.acks setting, and how the default __consumer_offset topic can become a single point of failure, with concrete steps to fix it.
This article provides a comprehensive overview of ClickHouse, covering its columnar OLAP architecture, key features such as data compression, vectorized processing, distributed query handling, and SQL support, followed by detailed step‑by‑step instructions for deploying a multi‑node ClickHouse cluster with MergeTree and ReplicatedMergeTree engines, configuration files, and Java MyBatis integration.
This article provides a comprehensive, hands‑on guide to building a MySQL master‑slave cluster with GTID replication and configuring MHA for automatic failover, covering environment preparation, password‑less SSH, MySQL settings, MHA installation, custom scripts, testing, and the key advantages of the solution.
This article examines the limitations of Redis master‑slave replication, such as manual failover and single‑node bottlenecks, and provides an in‑depth exploration of Redis Sentinel’s architecture, configuration parameters, detection mechanisms, automatic failover process, and best‑practice recommendations for achieving high availability.
This article explains how Redis read/write separation introduces a read‑only replica role, compares star and chain replication architectures, and outlines the transparent compatibility, high availability, and performance benefits that help users reduce costs while handling read‑heavy workloads.
High AvailabilityRead-Write Separationdatabase architecture
This article uses a fictional bank scenario to illustrate how database architectures evolve from a single MySQL instance through caching, master‑slave replication, vertical splitting, horizontal sharding, clustering, and finally the adoption of NoSQL and search engines to handle growing traffic and data complexity.
This article explains how a company extended native Redis to support bidirectional synchronization across multiple data‑center sites, addressing issues such as lack of master‑master replication, data loops, idempotency, write conflicts, and providing a custom rLog design for efficient breakpoint‑resume and performance.
This article explains how Redis read‑write separation works, compares star and chain replication architectures, and highlights the benefits of transparent compatibility, high availability, and high performance for read‑heavy, write‑light workloads.
This guide presents a detailed MySQL inspection checklist covering operating‑system metrics, critical MySQL parameters, status queries, replication health, high‑availability components, and useful SQL scripts, enabling DBAs to efficiently monitor performance, detect issues, and maintain reliable database services.
This article explains Kafka’s high‑availability design, including multi‑replica redundancy, ISR synchronization, leader election, and the critical role of the __consumer_offset internal topic, showing why a single broker failure can render the whole cluster unusable and how to configure replication factors and ack settings to prevent it.
This article explains common database high‑availability designs—including master‑slave, master‑master, and automatic failover architectures—their topologies, advantages, disadvantages, and practical considerations such as replication lag, manual intervention, and data consistency challenges.
This article provides a comprehensive analysis of Redis Cluster, covering node and slot assignment, command execution, resharding, redirection, failover, gossip messaging, and communication overhead, while explaining why clustering is needed, how it works, and how to deploy and manage it effectively.
This article explains Redis's single‑threaded event loop, the impact of adding CPU cores, compares Redis with Memcached, discusses persistence suitability, synchronization methods, security concerns, request ordering, operation complexity, latency, and defines what constitutes a big key.
This article explains Redis Sentinel's role in providing high availability for Redis by detailing its architecture, monitoring, leader election, automatic failover process, configuration of master‑slave instances and sentinel nodes, and how clients can subscribe to sentinel events.
This article provides a comprehensive overview of distributed system fundamentals, covering node models, replica concepts, various consistency levels, data distribution strategies, lease-based caching, quorum mechanisms, two‑phase commit, MVCC, Paxos consensus, and the CAP theorem, illustrating each with practical examples and diagrams.
This article explains Kafka's role as a decoupling message buffer, describes topics, partitions, replication, consumer groups, controller coordination with Zookeeper, and performance optimizations such as sequential writes, zero‑copy, log segmentation, and its reactor‑style network design.
This tutorial walks through creating a MySQL master‑slave replication cluster on Kubernetes using a StatefulSet, local persistent volumes, custom StorageClass, ConfigMap, Secret, and Services, showing how to initialize, scale, and verify data synchronization across pods.
The article explains how asynchronous replication and split‑brain situations can cause data loss in Redis clusters, and describes configuration parameters and client‑side techniques to minimize such loss while maintaining high availability.
This article explains MySQL master‑slave replication, covering replication modes, use cases, required configurations, underlying mechanisms, common issues, and solutions such as semi‑synchronous and parallel replication, along with practical configuration examples and monitoring commands.
This article provides a comprehensive, diagram‑driven explanation of Kafka’s architecture, covering producers, consumers, topics, partitions, replication, Zookeeper coordination, controller election, state machines, and the NIO‑based network model, helping readers understand the design philosophy and practical configuration implications.
This article reveals the most common Redis pitfalls—including unexpected key expiration, command‑induced blocking, data‑persistence hazards, and replication inconsistencies—explains why they happen, and provides concrete steps, code snippets and configuration tips to prevent performance degradation or data loss.
This article explains the causes of partial resynchronization failures, master‑slave data inconsistency, latency, dirty data, and data‑safety risks in Redis replication, and provides concrete configuration commands and mitigation strategies to ensure reliable data consistency.
This article analyzes how MySQL slave crashes can cause inconsistencies between master info and relay log positions during sync_master_info and sync_relay_log_info processes, presents case studies of duplicated events, explains the impact of different storage repositories (FILE vs TABLE), and recommends configuration settings to achieve server‑crash‑safe replication.
This article demonstrates how to build a MySQL master‑slave replication cluster on Kubernetes by leveraging StatefulSet for stateful pod management, local persistent volumes for storage, and a series of YAML manifests and commands to configure storage classes, PVs, ConfigMaps, Secrets, Services, and the StatefulSet itself, while also showing how to verify replication and scale the replica set.
This article explains how Redis Sentinel provides high‑availability for Redis by continuously monitoring master and replica nodes, detecting failures through subjective and objective down states, electing a new master via quorum‑based voting, and notifying clients of the failover using Pub/Sub events.
Discover three effective strategies for mastering a technology, illustrated with MySQL replication, and learn how the new book 'Deep Understanding of MySQL Master‑Slave Principles' combines code analysis, comparative study, and expert insight to guide readers through GTID, binary‑log events, and high‑availability architectures.
This article explains how Redis master‑slave replication operates, covering the underlying mechanisms such as update propagation, partial and full resynchronization, the characteristics and limitations of replication, common single‑node issues, and step‑by‑step instructions for configuring and executing replication commands.
A Kafka broker outage can halt consumer consumption despite remaining brokers, due to replication settings, ISR mechanics, and the internal __consumer_offsets topic’s default replication factor, which this article explains and resolves with practical configuration steps.
This article explains why a low Redis memory fragmentation ratio is not necessarily caused by swap usage, demonstrates experiments with disabled swap and varying repl‑backlog‑size, and concludes that large replication buffers and small data sets can naturally produce ratios far below 1, which is normal.
This article explains the principles, architecture models, and concrete implementations of high‑availability for MySQL and PostgreSQL, covering data‑sync modules, HA management, unified access, and cloud‑native considerations with detailed examples and best‑practice recommendations.
This article explains why growing MySQL workloads require moving from a single instance to a clustered architecture, details the mechanics of master‑slave replication, asynchronous, semi‑synchronous and group replication, and evaluates various high‑availability solutions and read‑write splitting techniques.
This guide explains the architecture of GlusterFS, compares its volume types, walks through setting up a multi‑node cluster, configuring NFS‑Ganesha for NFSv4 access, and shows how to mount the storage from clients using both GlusterFS and NFS protocols.
The article experimentally evaluates three ways of creating replication users—only on the master, separately on master and slave with CREATE statements, and separately with GRANT statements—to show how each method affects MySQL 5.7 master‑slave replication, error handling, and compatibility with GTID and MySQL 8.0.
This comprehensive guide explains MongoDB cluster components, common use cases, monitoring commands, basic operational tasks, data migration procedures, troubleshooting of production issues, and optimization recommendations to achieve high performance and scalability.
This article summarizes a real‑world MySQL database migration project, detailing pre‑migration preparation, backup and import commands, replication setup—including multi‑source replication for merging databases—and post‑migration verification steps, while sharing practical tips and pitfalls.
This article provides a comprehensive guide to Redis high‑availability through master‑slave replication, covering the underlying architecture, step‑by‑step setup, full and partial synchronization processes, buffer management, practical pitfalls, and how the mechanism fits into broader Redis HA solutions.
This article explains how to diagnose and resolve MySQL slave replication failures that occur when XtraBackup’s --kill-long-queries-timeout and --kill-long-query-type options interrupt long‑running queries, detailing steps such as checking performance_schema, reviewing error logs, restarting replication, and adjusting backup parameters.
This tutorial demonstrates how to create a MySQL master‑slave replication cluster on Kubernetes using a StatefulSet, local persistent volumes, ConfigMaps, Secrets, and Services, covering storage class configuration, pod initialization, data cloning, replication setup, verification, and horizontal scaling.
This article describes how the Didi HBase team tackled HBase’s weak availability and GC‑induced latency spikes by introducing a replication‑based client multi‑path read mechanism, configuring hedged reads, and adopting the Z Garbage Collector, and presents the resulting performance improvements and remaining challenges.
This article explains why, in MySQL row‑based replication, a master table having an extra column does not disrupt replication to a slave table lacking that column, provided column order, placement, and default values meet specific conditions, and demonstrates the behavior with a MySQL 5.7.25 test.
This article explains the root causes of MySQL master‑slave replication lag—including random replay, high master concurrency, and lock waits—and presents practical solutions such as parallel replication, reducing master load, and reading from the master to ensure data consistency.
This article provides a comprehensive overview of distributed system fundamentals, covering core concepts such as nodes, replicas, consistency models, data distribution strategies, lease and quorum mechanisms, two‑phase commit, MVCC, Paxos, and the CAP theorem, along with practical considerations for designing robust, scalable services.
This article explains how CouchDB achieves eventual consistency through the CAP theorem, multi‑version concurrency control, incremental replication, and document validation, illustrating the trade‑offs between consistency, availability, and partition tolerance in distributed database systems.
This article provides a comprehensive overview of Red Hat Ceph’s distributed object‑storage architecture, covering storage pools, authentication, placement groups, the CRUSH algorithm, replication, erasure coding, internal operations, high‑availability mechanisms, client interfaces, and encryption, illustrated with diagrams and practical details.
This article provides a comprehensive overview of distributed system fundamentals, covering system models, replica concepts, consistency levels, performance metrics, data distribution strategies, basic replica protocols, lease mechanisms, quorum, logging, MVCC, Paxos, and the CAP theorem.
This article demonstrates how to back up and restore Redis data using semi‑persistent RDB snapshots, full‑persistent AOF logging, and master‑slave replication, including command‑line examples for setting keys, checking replication status, saving snapshots, promoting a slave to master, and verifying data integrity.
This article explains how MySQL InnoDB generates AUTO_INCREMENT values, compares the full‑table locking mechanism before version 5.1 with the lightweight mutex introduced in 5.1, and describes the further improvements in 8.0 that rely on row‑based replication and lock‑mode settings.
The article reviews MySQL 8.0.23's maintenance release, detailing new features such as invisible columns, query attributes, security enhancements, InnoDB auto‑extend size, replication terminology changes, X protocol improvements, and various deprecations, providing code examples and links to official documentation.
This article explains Redis replication in depth, covering the step‑by‑step replication process, data synchronization mechanisms, full and partial sync workflows, heartbeat design, and asynchronous replication, while highlighting key commands, offsets, and performance considerations.
This guide explains MySQL GTID concepts, how to enable GTID-based replication, configure the server, create replication users, initialize a slave, and verify replication using command-line examples and configuration steps, including transaction commit and rollback testing.
This article explains Redis's replication mechanism in detail, covering the step-by-step copy process, data synchronization via PSYNC, full and partial synchronization workflows, heartbeat management, and asynchronous replication, while highlighting key commands, offsets, run IDs, and performance considerations.
This article explains MySQL's built‑in replication mechanism, covering its purpose, supported replication formats, step‑by‑step master‑slave configuration, common topologies, troubleshooting techniques, and practical SQL commands for setting up and maintaining reliable data distribution and high availability.
This article provides a step‑by‑step tutorial on configuring MySQL master‑slave replication, covering the underlying principles, master and slave configuration files, user creation, data backup, log synchronization, and verification with example commands and code snippets.
This tutorial walks through installing MySQL 8.0 on two servers, enabling binary logging, creating a replication user, configuring master and slave settings, handling common errors, and verifying that master‑slave synchronization works correctly.
This guide walks through the concepts, volume types, environment setup, cluster creation, and client mounting steps required to build a highly available GlusterFS distributed replicated storage system integrated with NFS‑Ganesha on Linux servers.
This article analyzes a MySQL master‑slave setup where a delayed replica experiences growing replication lag due to deadlocks caused by REPLACE INTO statements, examines the lock behavior, reproduces the issue in a test environment, and proposes configuration and coding mitigations.
The article explains Kafka's high‑availability architecture, covering multi‑replica redundancy, ISR mechanisms, producer acknowledgment settings, and a real‑world case where a broker crash halted consumption due to the __consumer_offsets topic's replication factor, then offers concrete remediation steps.
This article examines a Kafka outage scenario in a fintech company, explains Kafka’s multi-replica redundancy design, leader‑follower architecture, ISR mechanism, and how misconfiguration of the __consumer_offset topic can cause cluster-wide consumer failures, and provides solutions to ensure true high availability.
This article explains Kafka's multi-replica architecture, the role of leader and follower replicas, ISR mechanism, ack settings, and how misconfiguration of the __consumer_offsets topic can cause a full cluster outage, offering practical steps to restore high availability.
To overcome HBase’s weak availability and GC‑induced latency spikes, the DiDi team introduced a replication‑based client multi‑read (hedged‑read) mechanism and migrated to the Z Garbage Collector, which together dramatically cut maximum and 99.9th‑percentile latencies while keeping services online during region disruptions.
The article investigates why MySQL replication reports the error “heartbeat is not compatible with local info” when large transactions exceed the 4 GB limit of the binlog's next_position field, reproduces the issue with a controlled experiment, analyzes packet structures, and proposes practical mitigation strategies.
This comprehensive guide covers the factors that impact MySQL server performance, strategies for handling large tables and transactions, hardware and OS tuning, storage‑engine selection, replication modes, high‑availability architectures, indexing techniques, and practical SQL query‑optimization methods.
This article shares a comprehensive overview of TiDB Data Migration (DM), covering its architecture, configuration, online DDL support, common pitfalls such as duplicate‑key errors, large‑scale import tuning, version limits, and cleanup recommendations to help DBAs efficiently migrate MySQL/MariaDB workloads to TiDB.
This article explains Pika’s native distributed cluster architecture, detailing its deployment structure, data distribution with tables and slots, request processing flow, both non‑consistent and Raft‑based log replication, and the enhanced metadata management that enables scalable, high‑availability storage beyond single‑node Redis limitations.
This article explains the mechanisms of Redis master‑slave data synchronization—including full and partial resynchronization—details the internal workings of Redis clustering, slot assignment, automatic node detection, and failover recovery, and provides practical insights for building reliable Redis deployments.
This article outlines MySQL Group Replication’s key features, fault-detection mechanism, limitations, required environment, and step-by-step deployment scripts, providing a practical guide for setting up a high-availability MySQL cluster on CentOS using the provided shell scripts and configuration files.
The article explains the background, architecture, data distribution, processing flow, replication mechanisms, and management features of Pika's native distributed cluster, detailing how Etcd, LVS, and RocksDB are used to achieve scalable, persistent Redis-compatible storage with table isolation and flexible slot replication.
This article examines how differences between Galera GTID and MySQL GTID caused replication interruptions during a Percona XtraDB Cluster (PXC) split at Qunar, details the migration procedure, reproduces the problem with step‑by‑step commands, explains GTID concepts, and proposes operational improvements to avoid data inconsistency.
This article provides a comprehensive overview of database high‑availability techniques—including DB2 HADR, HACMP clustering, SQL and Q replication, storage‑layer disaster recovery, and DPF considerations—explaining their features, suitable scenarios, and how they can be combined to achieve robust end‑to‑end resilience.
This article narrates how Redis, personified as a character, synchronizes data between master and slave nodes through command propagation, adopts improved sync strategies, and uses Sentinel's INFO and PING checks to detect failures and automatically trigger failover, illustrating a practical high‑availability cache service.
The article explains why a single Kafka broker failure can render the whole cluster unavailable, detailing Kafka's multi‑replica architecture, ISR mechanism, leader election, producer acknowledgment settings, and the special handling required for the __consumer_offset topic.
This comprehensive cheat sheet gathers over eighty practical T‑SQL statements covering instance properties, configuration, system views, lock monitoring, backup progress, replication, Always On, FILESTREAM, job management, index maintenance, and security, providing DBAs with ready‑to‑run commands for everyday SQL Server administration and troubleshooting.
This article explains MySQL master‑slave replication by covering SBR, RBR, and MBR concepts, step‑by‑step configuration of master and slave servers, binlog format settings, the underlying replication protocol, key SQL commands, and troubleshooting tips, all illustrated with real code snippets and diagrams.
MySQL 8.0.22 introduces prepared‑statement improvements, a new SHOW PROCESSLIST implementation via Performance Schema, UTC timestamp handling, read‑only schemas, error‑log access through Performance Schema, user‑management enhancements, optimizer push‑down, replication auto‑failover, Router scalability upgrades, and several deprecations and removals.
The MySQL Clone Plugin, added in 8.0.17, enables fast local or remote cloning of InnoDB data by installing the plugin, issuing CLONE commands, monitoring progress via performance_schema tables, and using the resulting GTID or binlog coordinates to build replicas, while observing limitations such as DDL restrictions and single‑instance operation, and offering advantages over XtraBackup through an extra page‑copy stage and simplified GTID handling.
This comprehensive guide explains what Redis is, its data structures and features, demonstrates how to use Redis as a cache in Spring Boot applications, discusses cache eviction policies, persistence mechanisms, replication, Sentinel high‑availability, and performance characteristics while also covering common interview questions such as cache snowball, penetration and breakdown.
This article explains how Redis Sentinel provides automatic failover and high availability by using master‑slave replication, multiple Sentinel nodes, consensus‑based leader election, and client notification mechanisms to ensure continuous service despite node failures.
This article explains what MySQL master‑slave replication is, outlines its benefits, details the underlying mechanisms and event types, and provides a comprehensive, command‑line tutorial for configuring both master and slave servers, complete with code snippets and illustrative diagrams.