A Definitive Guide to Apache ShardingSphere: Transform any DBMS into a distributed database with sharding, scaling, encryption features, and more
- Length: 466 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-07-22
- ISBN-10: 1803239425
- ISBN-13: 9781803239422
- Sales Rank: #4691233 (See Top 100 Books)
Become well versed with all of ShardingSphere’s features for every data management need with this comprehensive guide put together by ShardingSphere’s founder and core contributors
Key Features
- Understand the core concepts and efficiently set up Apache ShardingSphere
- Enhance existing databases with sharding, elastic scaling, encryption, governance features, and more
- Import and customize the ecosystem’s core features for various application scenarios
Book Description
Apache ShardingSphere is a new open source ecosystem for distributed data infrastructures based on pluggability and cloud-native principles that helps enhance your database.
This book begins with a quick overview of the main challenges faced by database management systems (DBMSs) in production environments, followed by a brief introduction to the software’s kernel concept. After that, using real-world examples of distributed database solutions, elastic scaling, DistSQL, synthetic monitoring, database gateways, and SQL authority and user authentication, you’ll fully understand ShardingSphere’s architectural components, how they’re configured and can be plugged into your existing infrastructure, and how to manage your data and applications. You’ll also explore ShardingSphere-JDBC and ShardingSphere-Proxy, the ecosystem’s clients, and how they can work either concurrently or independently to address your needs. You’ll then learn how to customize the plugin platform to define personalized user strategies and manage multiple configurations seamlessly. Finally, the book enables you to get up and running with functional and performance tests for all scenarios.
By the end of this book, you’ll be able to build and deploy a customized version of ShardingSphere, addressing the key pain points encountered in your data management infrastructure.
What you will learn
- Assemble a custom solution using the software’s pluggable architecture
- Discover how to use Database Plus features effectively
- Understand the difference between ShardingSphere-JDBC and ShardingSphere-Proxy
- Get to grips with ShardingSphere’s pluggability mechanism
- Explore mainstream test models for databases and distributed databases
- Perform migrations from an on-premise database to a cloud-based database
- Reconfigure your data infrastructure and eliminate switching costs
Who this book is for
This book is for database administrators working with distributed database solutions who are looking to explore the capabilities of Apache ShardingSphere. DBAs looking for more capable, flexible, and cost-effective alternatives to the solutions they’re currently utilizing will also find this book helpful. To get started with this book, a basic understanding of, or even an interest in, databases, relational databases, SQL languages, cloud computing, and data management in general is needed.
A Definitive Guide to Apache ShardingSphere Contributors About the authors About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Conventions used Get in touch Share Your Thoughts Section 1: Introducing Apache ShardingSphere Chapter 1: The Evolution of DBMSs, DBAs, and the Role of Apache ShardingSphere The evolution of DBMSs Industry pain points The new industry needs are creating new opportunities for DBMSs The evolving role of the DBAs Overwhelming traffic load increase Microservice architecture for frontend services Cloud-native disrupts delivery and stale deployment practices The opportunities and future directions for DBMSs Database safety SQL, NoSQL, and NewSQL New architecture Embracing a transparent sharding middleware Database-as-a-Service AI database management platform Database migration Understanding Apache ShardingSphere Connect Enhance Pluggable Summary Chapter 2: Architectural Overview of Apache ShardingSphere What is a distributed database architecture? The SQL-based load-balancing layer Sidecar improves performance and availability Database Mesh innovates the cloud-native database development path Apache ShardingSphere and Database Mesh Solving database pain points with Database Plus An architecture inspired by the Database Plus concept Feature architecture Introduction to the feature layer Deployment architecture Plugin platform Microkernel ecosystem Simple Push Down Engine SQL Federation Engine Summary Section 2: Apache ShardingSphere Architecture, Installation, and Configuration Chapter 3: Key Features and Use Cases – Your Distributed Database Essentials Distributed database solutions Understanding data sharding Understanding vertical sharding Understanding horizontal sharding Data sharding key points Why you need sharding Understanding SQL optimization SQL optimization definition Overview and characteristics of distributed transactions Distributed transactions ShardingSphere's support for transactions Transaction modes comparison An introduction to elastic scaling Mastering elastic scaling The workflow to implement elastic scaling Elastic scaling key points How to leverage this technology to solve real-world issues Read/write splitting Read/write splitting definition Key points regarding the read/write splitting function How it works Application scenarios Summary Chapter 4: Key Features and Use Cases – Focusing on Performance and Security Understanding High Availability Database HA ShardingSphere HA Application scenarios Introducing data encryption and decryption What are data encryption and decryption? Key components Workflow Application scenarios User authentication Authentication of DBMS versus distributed database User ID storage Mechanism Workflow Configuration SQL Authority Defining SQL Authority Mechanism Planned development Application scenarios Database and app online tracing How it works A total synthetic monitoring solution Database gateway Understanding the database gateway Distributed SQL Introduction to DistSQL Application scenarios Additional notes for DistSQL Implications for ShardingSphere Understanding cluster mode Cluster mode definition Kernel concepts Compatibility with other ShardingSphere features Cluster management Computing nodes Storage nodes Observability Clarifying the concept of observability Applying observability to your system Mechanisms Application scenarios Summary Chapter 5: Exploring ShardingSphere Adaptors Technical requirements Differences between ShardingSphere-JDBC and ShardingSphere-Proxy ShardingSphere-JDBC The ShardingSphere-JDBC development mechanism Deployment and user quick start guide ShardingSphere-Proxy The ShardingSphere-Proxy development mechanism Applicability and target users of ShardingSphere-Proxy Deployment and user quick start guide Downloading from the official website Architecture introduction Applicability and target users Deployment and user quick start guide Summary Chapter 6: ShardingSphere-Proxy Installation and Startup Technical requirements Installing with the binary package Installing with Docker Introduction to Distributed SQL Configuration – sharding DistSQL – the SQL syntax YAML Configuration – read/write splitting YAML Configuration – encryption DistSQL YAML configuration items Configuration – shadow database DistSQL YAML Configuration – mode Configuration – scaling DistSQL for job management YAML – configuration items Configuration – multiple features, server properties DistSQL YAML Mixed – encryption + read/write splitting + cluster Configuration – server Authority Transaction Props configuration Summary Chapter 7: ShardingSphere-JDBC Installation and Start-Up Technical requirements Setup and configuration Introducing the preliminary requirements Introducing the configuration method Sharding configurations Java configuration items YAML configuration items Spring Boot configuration items SpringNameSpace configuration items Understanding read/write splitting configuration Java configuration items YAML configuration items Spring Boot configuration items SpringNameSpace configuration items Understanding data encryption configuration Java configuration items YAML configuration items Spring Boot configuration items SpringNameSpace configuration items Configuring a shadow database Java configuration items YAML configuration items A Spring Boot example SpringNameSpace configuration items Configuring ShardingSphere's modes Java configuration items YAML configuration items Spring Boot configuration items A SpringNameSpace example Props configuration for JDBC Java configuration items YAML configuration items Spring Boot configuration items SpringNameSpace configuration items Configuration – miscellaneous Sharding, read/write splitting, and cluster configuration items Configuring sharding, encryption, and cluster mode Summary Section 3: Apache ShardingSphere Real-World Examples, Performance, and Scenario Tests Chapter 8: Apache ShardingSphere Advanced Usage – Database Plus and Plugin Platform Technical requirements Introducing Database Plus ShardingSphere's pursuit of Database Plus Connect – building upper-level standards for databases Enhance – database computing enhancement engine Pluggable – building a database-oriented functional ecosystem Plugin platform introduction and SPI The pluggable architecture of Apache ShardingSphere Extensible algorithms and interfaces User-defined functions and strategies – SQL parser, sharding, read/write splitting, distributed transactions Customizing your SQL parser Customizing the data sharding feature Read/write splitting Distributed transactions User-defined functions and strategies – encryption, SQL authority, user authentication, shadow DB, distributed governance Data encryption User authentication SQL authority Shadow DB Distributed governance Scaling ShardingSphere-Proxy – tuning properties and user scenarios Properties introduction Extensible algorithms Summary Chapter 9: Baseline and Performance Test System Introduction Technical requirements Baseline Benchmarking tools BenchmarkSQL A good-to-know alternative benchmarking tool Databases ShardingSphere Performance testing Test preparation Summary Chapter 10: Testing Frequently Encountered Application Scenarios Technical requirements Testing distributed database scenarios Preparing to test your distributed system Deployment and configuration How to run your testing on a distributed system Analyzing a ShardingSphere-Proxy data display – the sharding feature Scenario-based testing for database security Preparing to test your database security Deployment and configuration How to run your testing on database security Report analysis Synthetic monitoring Preparing to test synthetic monitoring Deployment and configuration How to run your testing on synthetic monitoring Report analysis Database gateway Preparation to test the database gateway Deployment and configuration How to run your testing on a database gateway Report analysis Summary Chapter 11: Exploring the Best Use Cases for ShardingSphere Technical requirements Recommended distributed database solution Two clients to choose from Your DBMS Sharding strategy Distributed transaction HA and the read/write splitting strategy Elastic scaling Distributed governance Recommended database security solution Implementing ShardingSphere for database security Two clients to choose from Applying a data security solution to your DBMS Data encryption/data masking Data migration with encryption Authentication SQL authority/privilege checking Recommended synthetic monitoring solution Flow gateway Application performance monitoring and Cyborg Agent Database shield Recommended database gateway solution Overview and architecture Database management Read/write splitting Summary Chapter 12: Applying Theory to Practical Real-World Examples Technical requirements Distributed database solution Case 1 – ShardingSphere-Proxy + ShardingSphere-JDBC + PostgreSQL + distributed transaction + cluster mode + the MOD sharding algorithm Case 2 – ShardingSphere-Proxy + MySQL + read/write splitting + cluster mode + HA + RANGE sharding algorithm + scaling Database security Case 3 – ShardingSphere-Proxy + ShardingSphere-JDBC + PostgreSQL + data encryption Case 4 – ShardingSphere-Proxy + MySQL + data masking + authentication + checking privileges Synthetic monitoring Case 5 – Synthetic monitoring The deployment architecture Database gateway The deployment architecture The example configuration The recommended cloud/on-premises server Start and test it! Summary Appendix: and the Evolution of the Apache ShardingSphere Open Source Community How to leverage the documentation to find answers to your questions Example project introduction How to use the example project section Scenarios and examples Source code, license, and version shardingsphere-kernel shardingsphere-infra shardingsphere-jdbc shardingsphere-db-protocol shardingsphere-proxy shardingsphere-mode shardingsphere-features License introduction Version introduction Open source community Open source contribution Website and documentation Websites Channels Concluding note Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: A Definitive Guide to Apache ShardingSphere: Transform any DBMS into a distributed database with sharding, scaling, encryption features, and more
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.