Proven Strategies for Operating at Scale
Silvia Botros, Jeremy Tinley, Foreword by Jeremy Cole

#MySQL
#data
#database
#full_stack
#InnoDB
#operating_system
#server
چگونه میتوان از تمام توان MySQL بهرهبرداری کرد؟
با مطالعه کتاب High Performance MySQL، با تکنیکهای پیشرفتهای آشنا میشوید که شما را از تعریف اهداف سطح سرویس (SLO) گرفته تا طراحی اسکیماها، ایندکسها و کوئریها، و همچنین بهینهسازی سرور، سیستمعامل و سختافزار، در مسیر رسیدن به حداکثر توان پلتفرمتان راهنمایی میکنند. این راهنما همچنین روشهای ایمن و عملی برای مقیاسپذیر کردن اپلیکیشنها از طریق تکثیر (Replication)، تعادل بار (Load Balancing)، دسترسپذیری بالا (High Availability) و بازیابی از خرابی (Failover) را به مدیران پایگاه داده آموزش میدهد.
این نسخه بازنگریشده، با توجه به پیشرفتهای اخیر در زمینه عملکرد InnoDB، میزبانی در فضای ابری و ابزارها و ویژگیهای جدید MySQL بهروز شده است و به شما کمک میکند یک پلتفرم رابطهای دادهای طراحی کنید که همراه با رشد کسبوکارتان، مقیاسپذیر باقی بماند. همچنین، شما با بهترین شیوههای امنیت پایگاه داده و درسهایی کاربردی در زمینه عملکرد و پایداری پایگاه داده آشنا خواهید شد.
این کتاب منبعی ضروری برای مدیران پایگاه داده، مهندسان DevOps و توسعهدهندگانی است که به دنبال عملکرد، مقیاسپذیری و امنیت حرفهای برای MySQL هستند—چه در فضای ابری، چه در محیطهای خود میزبان.
How can you realize MySQL's full power? With High Performance MySQL, you'll learn advanced techniques for everything from setting service-level objectives to designing schemas, indexes, and queries to tuning your server, operating system, and hardware to achieve your platform's full potential. This guide also teaches database administrators safe and practical ways to scale applications through replication, load balancing, high availability, and failover.
Updated to reflect recent advances in cloud- and self-hosted MySQL, InnoDB performance, and new features and tools, this revised edition helps you design a relational data platform that will scale with your business. You'll learn best practices for database security along with hard-earned lessons in both performance and database stability.
• Dive into MySQL's architecture, including key facts about its storage engines
• Learn how server configuration works with your hardware and deployment choices
• Make query performance part of your software delivery process
• Examine enhancements to MySQL's replication and high availability
• Compare different MySQL offerings in managed cloud environments
• Explore MySQL's full stack optimization from application-side configuration to server tuning
• Turn traditional database management tasks into automated processes
Table of Contents
Chapter 1. MySQL Architecture
Chapter 2. Monitoring in a Reliability Engineering World
Chapter 3. Performance Schema
Chapter 4. Operating System and Hardware Optimization
Chapter 5. Optimizing Server Settings
Chapter 6. Schema Design and Management
Chapter 7. Indexing for High Performance
Chapter 8. Query Performance Optimization
Chapter 9. Replication
Chapter 10. Backup and Recovery
Chapter 11. Scaling MySQL
Chapter 12. MySQL in the Cloud
Chapter 13. Compliance with MySQL
Appendix A. Upgrading MySQL
Appendix B. MySQL on Kubernetes
The official documentation maintained by Oracle gives you the knowledge necessary to install, configure, and interact with MySQL. This book serves as a companion to that documentation, helping you understand how best to leverage MySQL as a powerful data platform for your use case.
This edition also expands on the growing role of compliance and security as parts of operating a database footprint. New realities such as privacy laws and data sovereignty have changed how companies build their products, and that naturally introduces new complexities in how the technical architecture evolves.
Who This Book Is For
This book is first and foremost for engineers looking to grow their expertise in running MySQL. This edition assumes its audience is familiar with the basic principles of why you want to use a relational database management system (RDBMS). We also assume some experience with general system administration, networking, and operating systems.
We will offer you proven strategies for running MySQL at scale with a modern architecture and more up-to-date tooling and practices.
Ultimately, we hope that the knowledge you gain from this book of MySQL’s internals and scaling strategies will help you in scaling the data storage layer at your organization. And we hope that your newfound insight will help you to learn and practice a methodical approach to designing, maintaining, and troubleshooting an architecture that is built on MySQL.
What Is Different in This Edition
High Performance MySQL has been a part of the database engineering community for years, with past editions released in 2004, 2008, and 2012. In these previous editions, the goal was always to teach developers and administrators how to optimize MySQL for every drop of performance by focusing on deep internal design, explaining what various tuning settings mean, and arming the user with the knowledge to be effective in changing these settings. This edition maintains the same goal but with a different focus.
Since the third edition, the MySQL ecosystem has seen a lot of changes. Three new major versions have been released. The tooling landscape expanded significantly beyond Perl and Bash scripts and into full-fledged tooling solutions. Entirely new open source projects have been built that change how organizations manage scaling MySQL.
Even the traditional database administrator (DBA) role has evolved. There’s an old joke in the industry that says that DBA stands for “Don’t Bother Asking.” DBAs had a reputation for being speed bumps in the software development life cycle (SDLC), not explicitly because of any curmudgeonly attitude, but simply because databases weren’t evolving as fast as the rest of the SDLC around them.
With books like Database Reliability Engineering: Designing and Operating Resilient Database Systems by Laine Campbell and Charity Majors (O’Reilly), it has become the new reality that technical organizations look to database engineers more as enablers of business growth and less as the sole operators of all databases. Where once a DBA’s primary day-to-day involved schema design and query optimization, they now are responsible for teaching those skills to developers and managing systems that allow developers to deploy their own schema changes quickly and safely.
With these changes, the focus should no longer be on optimizing MySQL to get a few percentage points faster. We think that High Performance MySQL is now about giving people the information they need to make educated decisions about how to best use MySQL. This begins by understanding how MySQL is designed, which gives way to understanding what MySQL is and is not good at. Modern releases of MySQL offer reasonably sane defaults, and there’s very little tuning you need to do unless you’re experiencing a very specific scaling problem. Modern teams are now dealing with schema changes, compliance issues, and sharding. We want High Performance MySQL to be a comprehensive guide to how modern companies run MySQL at scale.
Silvia Botros is a Senior Principal Engineer at Twilio. During her time at SendGrid, she helped deploy and maintain various MySQL datastores that support the mail pipeline and other products that SendGrid offers and to drive MySQL designs from inception to production.
Jeremy Tinley is a Senior Staff Engineer at Etsy, with over 20 years of MySQL experience. Throughout his career, he has managed tens of thousands of MySQL instances with an eye towards availability, reliability, and operational efficiency.









