Tagged articles
Sharding-JDBC
37 articles · Page 1 of 1
This comprehensive guide covers MySQL read-write separation from fundamentals to production implementation, including master-slave replication principles, replication lag causes and three enterprise-grade solutions, one-master-multi-slave architecture patterns, MHA automatic failover, Sharding-JDBC middleware configuration, and five critical production pitfalls to avoid.
Database ArchitectureHigh AvailabilityMHA
0 likes · 10 min read

This article explains what MySQL sharding and partitioning are, when they are necessary, outlines four splitting patterns, details four sharding key strategies, shows a production‑ready Sharding-JDBC configuration, and discusses five common distributed challenges with practical solutions.
MySQLShardingSharding-JDBC
0 likes · 10 min read

This article shares real-world experience implementing database sharding with Sharding-JDBC for an e-commerce platform, covering sharding key selection, distributed ID generation, cross-database join avoidance, pagination fixes, zero-downtime migration, and shard skew remediation.
PaginationSharding-JDBCcross-database join
0 likes · 14 min read

When a single database table grows to millions of rows, query performance and storage become bottlenecks, and this article explains why sharding is needed, introduces Sharding-JDBC as a lightweight solution, and walks through the complete setup, configuration, code implementation, testing, and advanced concepts such as sharding strategies, key generation, binding tables, and broadcast tables for SpringBoot projects.
Horizontal PartitioningMyBatisMySQL
0 likes · 33 min read

The article recounts a real‑world case where a massive device table (over 500 million rows) suffered from sharding and Elasticsearch integration issues, describes a pagination bug caused by Sharding‑JDBC, and presents a comprehensive set of hardware, software, and SQL optimization techniques—including MySQL configuration examples—to improve performance.
ElasticsearchMySQLPagination
0 likes · 13 min read

This article walks through a complete sharding implementation that splits a user table across four MySQL databases and sixteen tables, discusses challenges such as distributed IDs, transactions, data migration and pagination, and provides full Spring Boot, Sharding‑JDBC, Elasticsearch and Redis configurations with code examples.
ElasticsearchMySQLPagination
0 likes · 10 min read

This article provides a comprehensive, step‑by‑step tutorial on using Apache ShardingSphere and Sharding‑JDBC to implement horizontal, vertical, and broadcast sharding, covering core concepts, sharding strategies, configuration examples, and practical code snippets for real‑world database partitioning.
Broadcast TableHorizontal PartitioningSharding-JDBC
0 likes · 22 min read

The article dissects Sharding‑JDBC’s five core engines—parsing, routing, rewriting, execution, and merging—highlights production pain points, and details custom extensions such as skipping sharding for specific tables, forcing master routing, runtime configuration refresh, batch‑update handling, sharding‑condition deduplication, full‑route validation, and a simplified component wrapper to ease integration and improve performance.
Database MiddlewareExecution EngineRouting Engine
0 likes · 55 min read


政采云技术Nov 7, 2023 · Databases
This article investigates why Sharding-JDBC takes over half of the application startup time to load metadata, explains the role of the max.connections.size.per.query setting, demonstrates how adjusting it speeds up startup, and discusses the trade‑offs and potential dead‑lock risks of increasing the value.
Database ConfigurationPerformance TuningSharding-JDBC
0 likes · 7 min read

This article examines the high connection‑count problem of Sharding-JDBC in JD Logistics, explains sharding concepts, compares four mitigation strategies, and presents a custom table‑partitioning algorithm with configuration changes that dramatically lowers MySQL instance connections while maintaining performance.
Connection PoolingCustom Sharding AlgorithmMySQL
0 likes · 16 min read

This article examines how JD Logistics tackled MySQL connection limits by redesigning its sharding strategy using ShardingSphere's Sharding-JDBC, detailing the background, concepts of database and table sharding, analysis of bottlenecks, and step‑by‑step refactoring to reduce connections and improve scalability.
MySQLSharding-JDBCShardingSphere
0 likes · 16 min read

Facing a MySQL transaction table exceeding 50 million rows and growing rapidly, a finance team redesigned the schema using sharding‑jdbc, chose transaction time as the shard key, tackled multi‑data‑source transactions and cross‑shard pagination, and executed a phased migration to ensure stability and performance.
Large TablesMySQLSharding-JDBC
0 likes · 11 min read


政采云技术Nov 15, 2022 · Databases
This article introduces Sharding-JDBC and ShardingSphere, explains their history, core architecture, vertical and horizontal sharding concepts, sharding rule configuration, SQL parsing and rewriting, routing and result merging, and provides a quick‑start guide with Maven dependencies and Spring Boot configuration for Java applications.
JavaSQLSharding-JDBC
0 likes · 12 min read

This comprehensive tutorial walks through the evolution of Sharding-JDBC into ShardingSphere, explains core concepts like sharding, data nodes, and algorithms, demonstrates MySQL master‑slave setup with Docker, and provides step‑by‑step code examples for implementing read‑write separation, horizontal and vertical sharding, and distributed primary keys.
MySQL replicationSharding-JDBCSpring Boot
0 likes · 39 min read

This article explains why high‑traffic systems need database sharding, compares table‑level and database‑level partitioning methods, presents concrete MySQL table‑creation scripts and Java service code, and discusses the advantages, drawbacks, and common middleware solutions such as Sharding‑JDBC and Mycat.
Horizontal ScalingMySQLMycat
0 likes · 12 min read

This article explains the XA specification, demonstrates MySQL XA commands, and shows how Sharding-JDBC integrates XA transactions using Atomikos, including required dependencies, configuration, annotations, and testing steps, while also providing practical code examples and deployment tips.
AtomikosMySQLSharding-JDBC
0 likes · 8 min read

This article explains why the @Transactional annotation can roll back data when Sharding-JDBC performs cross‑database inserts, outlines the scenarios it truly supports, and details the internal rollback mechanism that distinguishes local from distributed transactions.
@TransactionalJavaSharding-JDBC
0 likes · 8 min read

This article explains why the @Transactional annotation in Sharding-JDBC can roll back across multiple databases in some scenarios, clarifies the cases it truly supports, details the internal rollback implementation, and outlines the situations where local transactions cannot guarantee distributed consistency.
JavaLocal TransactionSharding-JDBC
0 likes · 8 min read

This tutorial explains why read/write splitting is useful, shows step‑by‑step how to build a MySQL master‑slave cluster with Docker, configure the master and slave instances, and then use Sharding‑JDBC to transparently route writes to the master and reads to the slave.
DockerMasterSlaveMySQL
0 likes · 10 min read

This article explains how Sharding-JDBC can perform data masking at the persistence layer, detailing key concepts, configuration of data sources, encryptors, and tables, demonstrating practical examples with built‑in MD5 and AES encryptors, and showing how to implement custom encryptors and query‑assisted encryption for enhanced security.
Custom EncryptorDatabase SecuritySharding-JDBC
0 likes · 20 min read

This article provides a comprehensive guide to Sharding-JDBC, covering the challenges of database sharding such as distributed transactions, cross‑node joins, pagination, global key collisions, and demonstrates practical configuration and code examples for vertical and horizontal partitioning using Spring Boot.
Horizontal PartitioningSharding-JDBCSpring Boot
0 likes · 18 min read

This article explains what database sharding (horizontal and vertical partitioning) is, why it is needed, the implementation strategies, and compares two popular solutions—Mycat middleware and Sharding-JDBC—highlighting their advantages, drawbacks, and typical use cases.
Horizontal PartitioningMycatSharding
0 likes · 10 min read

This article provides a step‑by‑step tutorial on configuring MySQL master‑slave replication using Docker, explains redo log and binlog mechanisms, and demonstrates how to implement Sharding‑JDBC read/write splitting and database sharding with Spring Boot, including code examples and configuration details.
DockerMySQLReplication
0 likes · 22 min read

This article introduces Sharding-JDBC (now ShardingSphere), explains core sharding concepts such as shards, data nodes, logical and physical tables, sharding keys, algorithms and strategies, shows how it extends JDBC, and provides a step‑by‑step Spring Boot + MyBatis‑Plus example for building a sharded database application.
MyBatis PlusSharding-JDBCShardingSphere
0 likes · 30 min read

This article explains how to use Spring Boot to quickly integrate ShardingSphere for database sharding, covering the background of massive data storage challenges, the advantages of ShardingSphere, step‑by‑step project setup, configuration of data sources and sharding strategies, and a complete test example.
Inline Sharding StrategyMyBatisSharding-JDBC
0 likes · 13 min read

This article introduces Sharding-JDBC, explaining its basic usage, core concepts, sharding strategies, SQL processing workflow, configuration examples, and code snippets, while emphasizing the importance of understanding its underlying principles for effective database horizontal partitioning in Java applications.
Horizontal PartitioningJavaSQL routing
0 likes · 70 min read

This article explains the concept of read‑write splitting for databases, compares client‑side and proxy implementations, discusses data lag and forced routing techniques, and provides code examples and custom load‑balancing algorithms using Sharding‑JDBC and Spring.
Master‑SlaveSharding-JDBCSpring
0 likes · 9 min read

This article provides a step‑by‑step tutorial on using Sharding-JDBC with Spring Boot to implement horizontal database and table sharding across multiple MySQL instances, including project setup, Maven dependencies, entity and controller code, sharding configuration, and testing via Postman.
MySQLSharding-JDBCSpring Boot
0 likes · 12 min read

This article explains the data‑delay problem inherent in asynchronous MySQL master‑slave replication, demonstrates how Sharding‑JDBC provides read‑write splitting and forced‑master routing via HintManager, and offers configuration and code examples as well as alternative async‑query strategies for real‑time consistency.
Data ConsistencyHintManagerJava
0 likes · 8 min read

This article demonstrates how to set up Sharding-JDBC in a Spring Boot project, covering project structure, Maven configuration, entity, controller, service, mapper code, database DDL for multiple shards, sharding rules in application.properties, and API testing with Postman.
JavaMySQLORM
0 likes · 14 min read

This article reviews the background, side effects, sharding strategies, and key considerations of database partitioning, illustrating challenges such as merge‑sort pagination, deep‑paging performance, hash‑based routing, and integration issues with Sharding‑JDBC, while offering practical solutions and best‑practice recommendations.
Deep PagingHash RoutingMerge Sort Pagination
0 likes · 15 min read

This article reviews mainstream Java database connection pools—including C3P0, DBCP, Tomcat JDBC, BoneCP, Druid, and HikariCP—compares their features and performance, explores an even faster Scala async pool, discusses future middleware trends, and examines Sharding-JDBC's evolution toward a Database Mesh architecture.
Database Connection PoolDruidHikariCP
0 likes · 11 min read

This article explains the motivations, scenarios, architecture, core components, performance characteristics, and future roadmap of Sharding-JDBC, a lightweight Java framework that enables transparent database sharding and scaling for high‑volume, high‑concurrency applications.
JDBCSharding-JDBCdatabase sharding
0 likes · 16 min read

This article explains why relational database middleware is essential for scaling internet‑level workloads, describes the principles of horizontal sharding and distributed primary‑key generation, and provides a comprehensive overview of Sharding‑JDBC’s architecture, core modules, performance benchmarks, and future roadmap.
Database MiddlewareJavaSQL
0 likes · 18 min read

This article explains the core functions of relational‑database middleware, dives into Sharding-JDBC’s architecture, performance characteristics, and implementation details such as sharding rules, SQL parsing, routing, rewrite, execution, result merging, and distributed primary‑key generation, and outlines its future roadmap.
Database MiddlewareJavaSQL routing
0 likes · 21 min read

This article explains the principles, architecture, and performance of Sharding-JDBC, covering sharding scenarios, rule configuration, JDBC rewriting, SQL parsing and routing, result merging, and future roadmap, while comparing it with other open‑source sharding solutions.
Horizontal PartitioningJDBCSharding-JDBC
0 likes · 16 min read

Sharding-JDBC is a client‑side Java framework that provides transparent horizontal sharding for relational databases, offering flexible sharding strategies, SQL parsing and rewriting, multi‑threaded execution, result merging, and high performance while requiring no additional deployment or proxy layers.
JDBCJavaSharding-JDBC
0 likes · 14 min read
