没有合适的资源?快使用搜索试试~ 我知道了~
首页探索MySQL 8.0.11及以上高可用性:InnoDB Cluster详解
"《Introducing InnoDB Cluster: Learning the MySQL High Availability Stack》是一本由Charles Bell编著的专业书籍,专为那些希望提升MySQL数据库高可用性的用户设计。该书针对的是MySQL 8.0.11及更高版本中的新功能——InnoDB Cluster。InnoDB Cluster是MySQL高可用性架构的重要组成部分,它结合了数据冗余存储(通过MySQL Group Replication)、连接路由(MySQL Router)以及简化设置和配置的工具(MySQL Shell)。 书中详尽阐述了这些组件如何协同工作,确保在主数据库服务器出现故障时,数据依然能够保持可用。作者以易于理解的方式讲解了如何搭建测试环境、规划生产部署,并提供了实际操作的步骤和案例,让读者能逐步了解如何实现一个典型的MySQL高可用性解决方案。本书适用于社区版MySQL用户,特别是那些寻求在面对故障时具备冗余保护的用户。 本书特色在于其实践导向,适合系统管理员、DBA和开发人员参考,帮助他们在应对高可用性挑战时,更好地理解和利用InnoDB Cluster这一强大工具。版权信息表明,所有内容受法律保护,未经许可不得复制或以任何形式传播。书中还可能包含一些商标名、标志和图像,仅用于编辑目的,尊重商标所有权。"
资源详情
资源推荐
xx
How toUse This Book
This book is designed to guide you through learning more about high availability and
MySQL InnoDB Cluster, discovering the power of X AdminAPI, and seeing how to
migrate existing and build new high-availability applications.
If you are new to MySQL and InnoDB Cluster, you should spend time going through
the first four chapters, including installing MySQL on your own system and learning how
to use MySQL Shell.
The next several chapters are designed to give you more information about the
components that make up InnoDB Cluster. I consider these required reading for anyone
who has not used MySQL Replication or Group Replication.
Once you are familiar with InnoDB Cluster and its components from reading the first
five chapters, you can work through Chapter 6 to learn the basics of setting up InnoDB
Cluster in a sandbox (on a single local machine). Chapter 7 covers MySQL Router, which
is especially important for those who want to build high-availability applications.
Chapters 8 and 9 present a complete solution that demonstrates how to build a
product InnoDB Cluster and a short, bare-bones, high-availability application in Python
and Flask that you can run on your systems to experiment with writing applications
for InnoDB Cluster. Perhaps what makes Chapter 8 especially interesting is that it
demonstrates how to run MySQL on the Raspberry Pi to form an InnoDB Cluster
running on five Raspberry Pi computers.
Planners may find Chapter 10 especially helpful in planning an upgrade to MySQL 8
and adapting InnoDB Clusters to your infrastructure.
Downloading theCode
The code for the examples shown in this book is available on the Apress web site,
www.apress.com/9781484238844. You can find a link on the book’s information page on
the Source Code/Downloads tab. This tab is in the Related Titles section of the page.
Contacting theAuthor
If have any questions or comments—or even spot a mistake you think I should know
about—you can contact me at drcharlesbell@gmail.com.
InTroduCTIon
1
© Charles Bell 2018
C. Bell, Introducing InnoDB Cluster, https://doi.org/10.1007/978-1-4842-3885-1_1
CHAPTER 1
Introduction toHigh
Availability
Database administrators and systems architects who manage infrastructures understand
the need for building in redundancy while keeping maintenance chores to a minimum.
One of the tools used to achieve this is a class of features that make the server or service
available as much as possible. We call this high availability.
High availability is not only a key factor in establishing robust, always ready
infrastructures, but also a quality of robust, enterprise-grade database systems. Oracle
has continued to develop and improve the high-availability features in MySQL.Indeed,
these features have matured to include detailed management and configuration, status
reporting, and even automatic failover of the primary server to ensure that your data is
available even if the primary goes down. Best of all, Oracle has included these features in
the community edition of MySQL so the whole world can use them.
MySQL high availability through the new InnoDB Cluster feature is a collection of
components built on the long-term stability of MySQL Replication. The components
include modifications to the server and new components such as Group Replication,
a router for routing your connections, and MySQL Shell for simplified setup and
configuration. Together, these components form a new paradigm in MySQL high
availability.
In this chapter, you will discover what high availability is and how to achieve high
availability by using the first building block of the MySQL high-availability portfolio
of features. You will also see a brief tutorial on how to use MySQL Replication.
Understanding how to achieve high availability in MySQL by using features available
before InnoDB Cluster will help clarify how InnoDB Cluster improves upon these
features.
Let’s begin with a brief tutorial on high availability.
2
MYSQL—WHAT DOES IT MEAN?
The name MySQL is a combination of a proper name and an acronym. SQL stands for
Structured Query Language. The My part isn’t the possessive form—it is a name. In this case,
My is the name of the founder’s daughter. As for pronunciation, MySQL experts pronounce it
“My-S-Q-L” and not “my sequel.”
What Is High Availability?
High availability is easiest to understand if you consider it loosely synonymous with
reliability—making the solution as accessible as possible and tolerant to failures either
planned or unplanned for an agreed-upon period. That is, it’s how much users can
expect the system to be operational. The more reliable the system, and thus the longer it
is operational, equates to a higher level of availability.
High availability can be accomplished in many ways, resulting in different levels
of availability. The levels can be expressed as goals to achieving some higher state of
reliability. Essentially, you use techniques and tools to boost reliability and make it
possible for the solution to keep running and the data to be available as long as possible
(also called uptime). Uptime is represented as a ratio or percentage of the amount of
time the solution is operational.
You can achieve high availability by practicing the following engineering principles:
• Eliminate single points of failure: Design your solution so that there
are as few components as possible that, if they fail, render the
solution unusable.
• Add recovery through redundancy: Design your solution to permit
multiple, active redundant mechanisms to allow rapid recovery from
failures.
• Implement fault tolerance: Design your solution to actively detect
failures and automatically recover by switching to a redundant or
alternative mechanism.
CHAPTER 1 INTRODUCTION TOHIGH AVAILABILITY
3
These principles are building blocks, or steps to take, to reach higher levels of reliability
and thus high availability. Even if you do not need to achieve maximum high availability
(whereby the solution is up nearly all the time), by implementing these principles, you will
make your solution more reliable at the least, which is a good goal to achieve.
Now that you understand the goals or requirements that high availability can solve,
let’s discuss some of the options for implementing high availability in your MySQL
solutions. The following sections discuss four options for implementing goals of high
availability. By implementing all of these, you will achieve a level of high availability.
How much you achieve depends on not only how you implement these options but also
how well you meet your goals for reliability.
RELIABILITY VS.HIGH AVAILABILITY: WHAT IS THE DIFFERENCE?
Reliability is a measure of how operational a solution is over time, which covers one of the
major goals for high availability. Indeed, you could say that the ultimate level of reliability—the
solution is always operational—is the definition of high availability. To make your solution a
high-availability solution, you should focus on improving reliability.
Recovery
The easiest implementation of reliability you can achieve is the ability to recover from
failures. This could be a failure in a component, application server, database server,
or any other part of the solution. Recovery, therefore, is how to get the solution back to
operation in as little time and with as little cost as possible.
However, it may not be possible to recover from all types of failure. For example,
if one or more of your servers suffers a catastrophic disk failure, recovery may require
replacing the hardware and loss of data during the outage. For other types of failure,
recovery options may permit a faster method of returning to operation. Furthermore,
some components are more important and must be recoverable, so your efforts should
be to protect those more important components, the database being chief among them.
For instance, if your data becomes corrupt or is lost because of hardware failure, you
need to have a way to recover that data with as little loss as possible. One way to achieve
that is by keeping frequent backup copies of the data that can later be restored to recover
the data from loss.
CHAPTER 1 INTRODUCTION TOHIGH AVAILABILITY
4
Many tomes have been written about various strategies for backing up and restoring
your data. Rather than attempt to explain every nuance, technique, and best practice,
I refer you to the many texts available. For this book and the solutions available for
MySQL, it is sufficient to understand that there are two types of backup methods—
logical and physical—each with its own merits.
Logical Backup
A logical backup makes a copy of the data by traversing the data, making copies of
the data row by row, and typically translating the data from its binary form to SQL
statements. The advantage of a logical backup is that the data is human readable and
can even be used to make alterations or corrections to the data prior to restoring it. The
downside is that logical backups tend to be slow for larger amounts of data and can take
more space to store than the actual data (depending on data types, number of indexes,
and so on).
Physical Backup
A physical backup makes a binary copy of the data from the disk storage layer. The
backup is typically application specific; you must use the same application that made
the backup to restore it. The advantage is that the backup is much faster and smaller in
size. Plus, applications that perform physical backups have advanced features such as
incremental backups (only the data that has changed since the last backup) and other
advanced features. For small solutions, a logical backup may be more than sufficient, but
as your solution (your data) grows, you will need to use a physical backup solution.
Redundancy
One of the more challenging implementations of reliability is redundancy—having two
or more components serving the same role in the system. A goal for redundancy may be
simply having a component in place in case you need to replace the primary one. This
could be a hot standby: the component actively participates in parallel with the primary,
and your system automatically switches to the redundant component when a failure is
detected. The most common target for redundancy is the database server. MySQL excels
in this area with several features. One of the oldest redundancy features available in
MySQL is called replication.
CHAPTER 1 INTRODUCTION TOHIGH AVAILABILITY
剩余472页未读,继续阅读
tlforest
- 粉丝: 27
- 资源: 198
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 共轴极紫外投影光刻物镜设计研究
- 基于GIS的通信管线管理系统构建与音视频编解码技术应用
- 单站被动目标跟踪算法:空频域信息下的深度研究与进展
- 构建通信企业工程项目的项目管理成熟度模型:理论与应用
- 基于控制理论的主动队列管理算法与稳定性分析
- 谷歌文件系统下的实用网络编码技术在分布式存储中的应用
- CMOS图像传感器快门特性与运动物体测量研究
- 深孔采矿研究:3D数据库在采场损失与稳定性控制中的应用
- 《洛神赋图》图像研究:明清以来的艺术价值与历史意义
- 故宫藏《洛神赋图》图像研究:明清艺术价值与审美的飞跃
- 分布式视频编码:无反馈通道算法与复杂运动场景优化
- 混沌信号的研究:产生、处理与通信系统应用
- 基于累加器的DSP数据通路内建自测试技术研究
- 跨国媒体对南亚农村社会的影响:以斯里兰卡案例的社会学分析
- 散单元法与CFD结合模拟气力输送研究
- 基于粒化机理的粗糙特征选择算法:海量数据高效处理研究
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功