Learn how to set up Redis Sentinel for high‑availability caching, covering prerequisites, anti‑patterns, detailed configuration of master, replicas and Sentinel nodes, firewall rules, monitoring, failover testing, troubleshooting, performance tuning, backup, rollback and best practices—all achievable within a 30‑minute deployment.
This article explains MySQL master‑slave replication, covering asynchronous, semi‑synchronous, and full synchronous modes, their mechanisms, advantages, disadvantages, and ideal use cases for high availability, read/write separation, and strong consistency in large‑scale systems.
High AvailabilityRead-Write Separationdatabase architecture
This comprehensive guide explains how to diagnose MySQL master‑slave replication lag, enable GTID mode, configure semi‑synchronous replication, optimize multi‑threaded replication, set up monitoring and alerting with Prometheus, and perform zero‑data‑loss failover using tools like Orchestrator and custom scripts.
This article explains why MySQL master‑slave replication can fall behind, outlines common causes of data inconsistency, and presents four comprehensive solutions—including architecture tweaks, multi‑threaded replication, configuration tuning, and Percona Toolkit verification—to achieve fast, stable, and accurate data synchronization.
This article explains how MySQL master‑slave replication works, covering the binlog mechanism, the three replication steps, and the three reliability modes—asynchronous, semi‑synchronous, and fully synchronous—while highlighting its impact on read throughput, backup, and disaster recovery.
This article explains MySQL master‑slave replication, covering its purpose for high availability, key features like real‑time disaster backup and read‑write separation, and the three essential steps—binlog recording on the master, I/O thread transfer to the relay log, and SQL thread replay on the slave.
Uber migrated its core database from PostgreSQL to MySQL because PostgreSQL suffered from index bloat, write amplification, high replication overhead, and limited MVCC support, prompting a detailed analysis of each issue, the improvements in newer PostgreSQL releases, and how MySQL’s architecture addresses these challenges.
This article outlines MySQL’s three primary replication architectures—async, semi‑sync, and full‑sync—detailing their mechanisms, typical topologies, performance trade‑offs, and suitable scenarios such as read‑heavy web services, high‑availability setups, and strict consistency requirements like financial transactions.
This guide explains how to configure Kafka producers with acks=all, enable idempotence, set appropriate retry and replication factors, and adjust broker flush intervals to achieve exactly‑once semantics and prevent message loss even during network glitches or broker failures.
This article explains MySQL replication architecture, detailing how binary logs are transferred, the roles of dump, I/O receiver, and SQL apply threads, the metadata tables they use, and key system variables for optimizing replication performance and durability.
This guide walks you through preparing the environment, choosing a data‑sync method, configuring both master and slave servers, verifying replication, troubleshooting common issues, and applying advanced settings to achieve a reliable, monitorable MySQL 5.7 master‑slave setup.
This article explains why version vectors are needed in multi‑leader and leaderless replication, describes their implementation and comparison rules, and presents practical conflict‑resolution strategies—including custom resolvers, last‑write‑wins, read‑repair, and request rejection—supported by Java pseudocode and diagrams.
This article explains Redis’s three clustering options—master‑slave replication, Sentinel high‑availability, and sharding—detailing their architectures, setup steps, synchronization mechanisms, advantages, drawbacks, and common interview questions, helping readers choose and implement the right solution for high‑performance, scalable data storage.
This tutorial walks through building a MySQL master‑slave cluster on Kubernetes using StatefulSets, covering local persistent volumes, storage classes, ConfigMaps, Secrets, Services for read‑write splitting, and step‑by‑step YAML manifests with verification commands to ensure proper replication and scaling.
This article provides a comprehensive overview of Redis, covering its core concepts, features, data types, caching patterns in Spring Boot, common cache pitfalls and solutions, performance reasons, eviction policies, persistence options, replication, and Sentinel high‑availability mechanisms.
This article explains the distinct yet collaborative roles of MySQL's Redo Log and Binlog, covering two‑phase commit, write‑ahead logging, flushing mechanisms, performance trade‑offs, and their use cases in crash recovery, replication, and point‑in‑time restoration.
Redis achieves million‑level concurrency by storing all data in memory, leveraging ultra‑fast read/write speeds, employing optimized data structures such as strings, hashes, lists, sets and sorted sets, using I/O multiplexing to handle many connections in a single thread, and scaling through master‑slave replication for high availability.
This guide walks through the reasons for MySQL master‑slave replication, explains its core mechanisms, details step‑by‑step environment planning, configuration, data initialization, replication setup, monitoring, failover with MHA, read‑write splitting using ProxySQL, performance tuning, troubleshooting, and best‑practice recommendations for enterprise‑grade high availability.
To prevent costly data loss during database failures, the XiaoHongShu team designed a resource‑efficient Binlog Server that doubles half‑sync replication speed to over 300 MB/s, enables automatic data recovery without manual intervention, and ensures RPO = 0 across fully deployed MySQL clusters.
This article explains Elasticsearch's core architecture including distributed sharding, near real-time search, inverted indexes, and key concepts like indices, documents, mappings, and replicas, along with typical use cases and the Elastic Stack ecosystem.
This article explains the differences between MySQL’s default REPEATABLE READ (RR) and READ COMMITTED (RC) isolation levels, why large internet firms switch to RC, the mechanics of master‑slave replication, the three binlog formats, and how gap locks affect consistency and performance.
This article explains Redis master‑slave replication, covering its purpose for backup, read/write separation, and high availability, and details the seven‑step full‑copy process and the six‑step incremental sync process with illustrative diagrams.
This article explains the roles of StarRocks FE and BE nodes, details the metadata stored in FE, describes the leader‑follower‑observer architecture, and shows how BDB JE replication, journal logs, and checkpoint mechanisms ensure metadata synchronization and durability even after node failures.
This article explains how the REPLACE INTO statement can cause mismatched AUTO_INCREMENT values between MySQL master and replica after a failover, leading to primary‑key conflicts, and provides reproduction steps, underlying mechanics, and practical mitigation strategies.
This article examines write conflicts in single-leader replication, comparing exclusive and shared data, exploring uniqueness constraints, async replication delays, and various conflict‑resolution techniques such as unique indexes, bitmap mapping, LWW ordering, and multi‑version control for collaborative editing.
This article provides a comprehensive overview of MySQL master‑slave replication, explaining its core mechanisms, the push‑pull hybrid model, replication modes (asynchronous, full‑sync, semi‑sync), binlog formats, and practical strategies to reduce replication lag caused by large transactions, server load, and network constraints.
An experienced DBA recounts a midnight MySQL replication disaster where slave lag exceeded 60 seconds, then dissects the root causes—binlog formats, semi‑synchronous replication, and GTID—offering detailed configurations, performance tweaks, monitoring scripts, and best‑practice recommendations to prevent and resolve such failures.
This article explains the challenges of implementing causal consistency, compares it with linear and sequential consistency, describes how order guarantees are enforced in leader‑based replication, introduces Lamport timestamps and total‑order broadcast, and outlines practical approaches for achieving causal consistency in distributed systems.
Learn how to reduce MySQL 8 master‑slave replication delay from seconds to sub‑second levels by tuning five key parameters and applying three layers of parallel binlog replication, with detailed configuration examples, performance test results, troubleshooting tips, and ready‑to‑use scripts.
This article examines why multi‑leader and leaderless replication models struggle to provide linear consistency, explores write‑conflict handling, quorum‑based NWR mechanisms, sloppy quorum and hinted‑handoff techniques, and summarizes the trade‑offs involved in achieving strong consistency across distributed data centers.
This comprehensive guide walks you through a real production incident and then details MySQL configuration tuning, memory and thread settings, InnoDB core parameters, index design, query optimization cases, slow‑query analysis, read‑write splitting, monitoring scripts, sharding strategies, fault diagnosis, backup and recovery best practices, and high‑availability deployment, providing actionable tips and code examples for robust database performance.
This article examines eventual and linear consistency in leader‑based replication, explains read‑your‑writes and shared‑data scenarios, discusses replication lag, failover trade‑offs, multi‑data‑center risks, and shows how consensus systems like ZooKeeper and etcd implement true linear consistency.
This article breaks down MySQL's three core log types—undo log, redo log, and binlog—explaining how they support transaction atomicity, durability, MVCC, crash‑safe recovery, write‑ahead logging, and replication, while also covering buffer pool behavior and flush policies.
This article explains Redis' deployment models, core components, and the event‑driven engine that powers command processing, detailing the flow from client connection through the reactor loop, command parsing, execution, and response delivery with code examples and diagrams.
Learn step‑by‑step how to troubleshoot MySQL master‑slave replication problems, from verifying component roles and executing the correct SHOW SLAVE STATUS command inside the MySQL client, to fixing missing command errors, checking IO/SQL threads, and restarting replication in Docker‑based environments.
This article provides a comprehensive, step‑by‑step tutorial on deploying a MySQL master‑slave replication architecture using Docker containers, covering prerequisite checks, container setup, configuration files, replication user creation, master‑slave linking, testing data sync, and troubleshooting common issues.
This comprehensive MySQL tutorial covers everything from core concepts and architecture to practical CRUD operations, advanced queries, indexing, transaction control, stored procedures, triggers, replication, performance tuning, backup strategies, and real-world use cases, providing a complete roadmap for developers and DBAs.
This guide explains the principles of MySQL master‑slave replication, shows how to configure and verify replication, provides Dockerfiles and docker‑compose files for MySQL and Redis clusters, and demonstrates testing each cluster step by step.
This article compiles the ten most common MySQL error scenarios—from connection limits and replication conflicts to installation failures, password resets, truncate side‑effects, configuration pitfalls, charset issues, binlog formats, timeout problems, and file‑handle limits—offering clear diagnostic steps and concrete commands to resolve each case.
This tutorial walks through preparing the Linux environment, installing MySQL 5.7, configuring master and slave servers, creating replication users, verifying synchronization, troubleshooting common issues, and applying advanced options such as GTID and semi‑synchronous replication, all with complete command examples.
This tutorial walks you through checking the OS architecture, preparing the environment, downloading and extracting the MySQL 5.7 ARM package, configuring my.cnf, setting up auto‑start and environment variables, initializing the server, securing the root account, and configuring master‑slave replication on Linux.
Understanding high‑availability architectures involves mastering replication and fail‑over, balancing RTO and RPO, and choosing among four patterns—Active‑Standby, Active‑Active, Cold Standby, and Hot Standby—each with distinct synchronization, load‑balancing, and cost considerations for reliable system design.
This guide walks you through preparing multiple virtual machines, configuring MySQL server IDs, setting up both classic and GTID‑based master‑slave replication, and managing the replication with essential commands, complete with code examples and architecture diagrams.
This article analyzes a MySQL master‑slave replication failure where the SQL thread stopped with error 1594, detailing log inspection, CRC checks, relay‑log corruption, root‑cause identification, and step‑by‑step remediation procedures for restoring replication.
This article explains Redis's three clustering solutions—master‑slave replication, Sentinel mode, and sharding—detailing their architectures, setup steps, synchronization mechanisms, advantages, drawbacks, split‑brain handling, and common interview questions for developers.
This article explains MySQL's replication mechanism, detailing master‑slave architecture, key threads, binlog formats (statement, row, mixed), common application scenarios such as backup, read/write splitting, and data migration, and highlights important considerations like network latency, consistency, delay, and security.
This article compiles the most frequently asked MySQL interview questions, covering fundamentals, storage engines, SQL optimization, indexing, transaction handling, replication, sharding, and performance troubleshooting to help readers master both theory and practical usage.
The article explains why the built‑in MySQL 5.7 Seconds_Behind_Master metric often misrepresents replication delay, analyzes its design flaws, and demonstrates how the Percona Toolkit's pt‑heartbeat tool can reliably measure master‑slave lag with real‑time precision.
This guide walks through setting up a MySQL master‑slave replication cluster on Kubernetes using a StatefulSet, local persistent volumes, delayed binding StorageClass, ConfigMap, Secret, and Services, then verifies replication and demonstrates horizontal scaling of slave nodes.
This article breaks down MySQL's three binlog formats—Statement, Row, and Mixed—detailing how each records changes, their advantages and drawbacks, and when to choose the most appropriate mode for reliable replication.
This article introduces the pt‑slave‑repair tool, explains the root causes of MySQL master‑slave replication errors 1032 and 1062, details its working principle, preparation steps, and provides concrete command‑line examples for automatically repairing these errors with minimal manual effort.
Redis 8.0-M03 adds an RDB channel replication feature that parallelizes RDB file transfer with write command streaming, reducing master node memory pressure and CPU load while improving full‑sync performance through a dedicated connection and configurable buffer limits.
This article explains the fundamentals of MySQL master‑slave replication, detailing how binlog‑based data syncing works and providing a complete Docker‑based deployment guide—including configuration files, user creation, replication commands, and troubleshooting tips for a one‑master‑two‑slave cluster.
This guide walks through building a three‑node lab, installing MariaDB, configuring master‑slave binary‑log replication, creating a test database, and then deploying MySQL‑Proxy on an application server to achieve transparent read/write splitting between the master and slave.
This article provides a comprehensive overview of MongoDB's configuration file, detailing system log options, process management, network settings, security parameters, storage engine configurations, slow query profiling, replication, sharding, and mongos-specific settings, with explanations of each option and recommended defaults.
This comprehensive guide walks you through MongoDB replica set fundamentals, member roles, architecture, and configuration commands, then dives into sharding concepts, cluster components, chunk management, shard key selection, deployment steps, balancing operations, and practical troubleshooting tips, all illustrated with clear code examples and diagrams.
This article examines the core challenges of distributed data systems—including consistency, availability, and partition tolerance—then details master‑slave replication mechanisms for MySQL and Redis, various replication modes and binlog formats, and explores data partitioning, sharding, and hot‑key mitigation techniques for scalable, high‑availability deployments.
A ClickHouse cluster showed wildly varying row counts when querying sharded tables, while local tables behaved correctly; the article analyses the root cause in the cluster and table configuration, explains why the inconsistency occurs, and provides a step‑by‑step fix by switching to replicated tables.
This article distills the key design patterns behind distributed systems—covering replication, partitioning, consensus, and fault‑tolerance—by presenting each pattern’s problem statement, concrete solution, trade‑offs, and technical considerations, all illustrated with real‑world examples from projects like Kafka and Cassandra.
This article reproduces a MySQL replication error triggered by an incorrect host entry in the mysql.user table, analyzes the version‑specific host field differences, and provides a step‑by‑step fix using the slave_type_conversions parameter and proper user‑renaming practices.
This article explains how to extend an existing MySQL master‑slave replication filter to include additional databases by using a low‑cost backup‑restore workflow, detailing two solution options, the chosen approach, and step‑by‑step commands for stopping replication, backing up, setting GTID points, restoring, and updating filter rules.
This article provides step-by-step Bash scripts for automating daily MySQL database backups, compressing tables, cleaning old archives, and configuring master‑master replication, including detailed commands for dumping databases, creating tar.gz packages, and setting up replication parameters on Linux servers.
This article explains Elasticsearch's distributed architecture, shard and replica model, the detailed write path—including buffer, transaction log, refresh and flush operations—and the read path with coordinating nodes, Lucene query execution, aggregation, caching, and performance optimizations.
This article explains why MySQL master‑slave replication can become delayed in high‑traffic order systems, describes the underlying binlog synchronization mechanism, and provides practical steps—including network upgrades, server tuning, transaction reduction, version updates, and slave count limits—to eliminate the lag.
This article explains how MySQL Router 8.2 enables automatic read/write splitting for InnoDB ReplicaSet deployments, showing configuration steps, code examples, and the benefits of directing reads to replicas and writes to the primary without modifying application code.
This article outlines MongoDB’s core features, its layered technical architecture—including storage, data model, query language, indexing, replication, sharding, and transactions—and explains the three cluster deployment modes with detailed roles and request flow for sharded clusters.
This article introduces the new Redis book "Redis Mastery", explains core Redis concepts such as SDS strings, RDB/AOF persistence, master‑slave replication and Sentinel high‑availability, and also announces a limited‑time discount and giveaway for community members.
This article explains Redis master‑slave replication, synchronization steps, handling of network partitions, and how Sentinel provides automatic failover through monitoring, leader election, and notification, offering strategies to reduce master load and ensure high availability.
This article introduces the Redis in‑memory database, highlights the new "Redis Mastery" book that blends theory with practical examples, and explains core concepts such as SDS string structures, RDB/AOF persistence, master‑slave replication, and Sentinel high‑availability mechanisms.
This guide walks through checking the OS architecture, preparing the environment, downloading the appropriate MySQL 5.7 packages for ARM, installing and configuring MySQL, setting up automatic startup and environment variables, initializing the server, securing the root account, and finally configuring master‑slave replication between two servers.
This article examines the replication and partitioning designs of Redis, Kafka, and Elasticsearch, drawing on concepts from Designing Data‑Intensive Applications to illustrate core distributed‑system principles, common challenges, and practical configuration options.
This guide walks you through preparing multiple virtual machines, configuring MySQL 8.0 server IDs, setting up both classic and GTID‑based master‑slave replication, and managing replication commands, providing clear code snippets and commands for a reliable MySQL clustering environment.
While MySQL 5.7 native DDL methods (copy, inplace rebuild, index build, metadata‑only) vary in speed, space use, lock impact, and binlog output, GH‑OST consistently offers the fastest execution, lowest lock blocking, real‑time replication, albeit at roughly double storage cost, making it ideal for risk‑averse online schema changes.
The article analyzes a MySQL 5.7 replication bug where, after consecutive crashes, the slave ends up with more GTIDs than the master because the last binlog’s GTIDs are not persisted, and demonstrates the problem using GDB debugging and step‑by‑step reproduction.
This article provides an in‑depth overview of MySQL fundamentals, covering join types, normalization, data types, index structures, locking mechanisms, transaction isolation, MVCC, replication, sharding, and practical performance‑tuning techniques for large‑scale databases.
This article examines whether a MySQL replica can safely omit setting sync_binlog=1, explains the underlying InnoDB and GTID mechanisms, presents an experiment reproducing power‑loss scenarios, and analyzes how different master_auto_position settings affect data consistency and GTID continuity during recovery.
This article provides a comprehensive overview of Apache Doris, explaining its frontend and backend nodes, storage structures such as tablets, rowsets, and segments, replication mechanisms, partitioning versus bucketing, indexing types, compaction processes, and high‑availability strategies through a detailed Q&A format.
This comprehensive guide explains Redis persistence mechanisms—including RDB snapshots, AOF write‑ahead logging, and their hybrid mode—covering their workflows, configuration options, replication processes, performance trade‑offs, and practical tips for reliable data durability.
The article analyzes a MySQL replication error where a MEMORY table is cleared after a master restart, explains why the binlog records only a statement despite row format, and provides step‑by‑step troubleshooting and remediation measures to ensure data consistency.
This article investigates why a MySQL replication slave stops when a GRANT statement fails after directly updating the mysql.user table, explains the implicit privilege reload mechanism, demonstrates the issue with a reproducible test, and concludes that GRANT is not an atomic operation.
This article provides a comprehensive, hands‑on tutorial for planning, installing, configuring, and verifying a PostgreSQL master‑slave (streaming replication) setup on two Linux nodes, including user creation, remote connection settings, data export/import, and troubleshooting tips.
This article provides a comprehensive step‑by‑step guide to setting up MongoDB replica sets and sharded clusters, explaining the architecture, member roles, configuration files, initialization commands, and operational procedures for ensuring data redundancy, high availability, and horizontal scaling.
This article provides a comprehensive walkthrough of MongoDB's configuration file, detailing system log options, process management, network parameters, security settings, storage engine configurations, slow query profiling, replication, sharding, and mongos parameters, along with explanations of each option and recommended defaults.
This article walks through Redis's architectural journey—from a lone instance to a high‑availability, high‑performance cluster—covering persistence (RDB, AOF, hybrid), master‑slave replication, Sentinel automatic failover, sharding strategies, and the modern Redis Cluster design.
This article walks you through Redis’s architectural journey—from a simple single‑node setup, through persistence mechanisms, master‑slave replication, Sentinel‑driven automatic failover, and finally sharding with Redis Cluster—explaining each component’s purpose, trade‑offs, and how they collectively boost performance and reliability.
This article explains why read‑heavy internet services use MySQL master‑slave replication for read/write separation, describes the asynchronous replication process, discusses latency side‑effects, and offers practical strategies such as data redundancy, caching, and direct master queries to mitigate delays.
The article examines why distributed systems inevitably face data‑consistency challenges and breaks down three common service‑architecture patterns—master‑slave, master‑master, and leaderless—detailing their replication mechanisms, advantages, drawbacks, and practical solutions such as synchronous, semi‑synchronous, asynchronous replication, quorum handling, node‑failure recovery, and conflict resolution strategies.
This comprehensive tutorial walks you through MongoDB replica set concepts, member roles, primary election, configuration commands, as well as sharding fundamentals, shard key selection, cluster deployment, balancer management, and practical code examples for building a production‑grade database cluster.
This article provides a comprehensive introduction to Redis, covering its core features, supported data types, common caching use cases in Spring Boot, typical cache‑related problems such as consistency, avalanche, penetration and breakdown, as well as performance reasons, eviction policies, persistence mechanisms, master‑slave replication, and Sentinel high‑availability architecture.
This article explains what MySQL binlog is, how it enables master‑slave replication, and explores practical business applications such as data heterogeneity, cache synchronization, and task distribution, while highlighting performance considerations and the benefits of using binlog‑based middleware.
This article explores Apache Kafka’s core storage architecture, explaining how sequential append‑only writes, sparse indexing, segmented log files, and a leader‑based replication mechanism together enable high‑throughput, reliable, and scalable event streaming for massive data workloads.
This article investigates a MySQL 8.0.27 replica that repeatedly hangs during show replica status, analyzes worker thread states, InnoDB status, checkpoint and I/O load, identifies an oversized Redo Log usage as the root cause, and provides configuration and upgrade suggestions to resolve the issue.
The article compares master‑slave, master‑master, and leaderless distributed architectures, explaining how synchronous, semi‑synchronous, and asynchronous replication affect consistency, latency and scalability, and showing that each pattern trades write throughput, conflict‑resolution complexity, and availability against strong data correctness.
This tutorial walks you through installing MongoDB on three CentOS 7.9 servers, configuring a replica set with a master and two slaves, creating admin and test users, securing communication with key files, and verifying failover by stopping the primary node, all illustrated with commands and screenshots.
This article provides a comprehensive overview of Redis, covering its core concepts, deployment architectures—including single instance, high‑availability, Sentinel, and cluster setups—its replication mechanisms, gossip protocol, and the various persistence options such as RDB, AOF, and fork‑based snapshots.
This article explains MySQL master‑slave replication, covering its three modes (asynchronous, semi‑synchronous, and fully synchronous), the underlying binary‑log mechanism, key replication threads, configuration steps, and includes a promotional notice for an upcoming live career‑development session.
This article explains MySQL 8.3’s new ability to tag GTIDs, describes the original and extended GTID formats, demonstrates how to enable and use tagged GTIDs with mysql-shell, and shows how tagged and non-tagged transactions appear in replication logs.
This article explains Redis high‑availability through master‑slave replication, covering the architecture, read‑write separation benefits, the three‑stage initial sync process, incremental synchronization, and practical considerations for scaling and fault tolerance in production environments.