没有合适的资源?快使用搜索试试~ 我知道了~
首页Cassandra 3.x高可用实战指南:实现零宕机应用设计
Cassandra 3.x高可用实战指南:实现零宕机应用设计
需积分: 9 88 下载量 121 浏览量
更新于2024-07-20
收藏 6.78MB PDF 举报
"Cassandra.3.x.High.Availability.2nd.Edition" 是一本专注于介绍Apache Cassandra 3.x版本中高可用性设计和实践的专业指南。该书由经验丰富的作者Robbie Strickland撰写,他在Cassandra项目中拥有多年的经验,并且是该项目的积极推动者。本书旨在帮助读者理解Cassandra如何通过其独特的架构实现100%的高可用性,同时保持高性能。 在阅读过程中,读者将学习如何利用Cassandra的数据分布、复制机制以及可调一致性模型来平衡一致性、可用性和性能。章节涵盖了多个核心主题,包括数据中心的部署策略,如何实现零停机扩容,以及利用原生Java客户端的高可用性特性。此外,书中还讨论了数据建模的最佳实践,以确保系统在面对大规模数据和地理分布时仍能保持良好的扩展性和可用性。 作者强调避免常见的设计陷阱,即"反模式",并教导读者在系统出现故障时如何优雅地处理,确保即使在最不利的情况下也能保持系统的正常运行。这本书不仅适合开发人员,也对系统管理员和架构师极具价值,因为它提供了实际操作中的指导,帮助他们构建能够承受大量节点和海量数据的高可用性应用程序。 作为一本权威的参考书籍,"Cassandra.3.x.High.Availability.2nd.Edition"提供了全面的理论知识和实践经验,无论你是初次接触Cassandra还是已经在项目中运用它,都能从中获得宝贵的见解和提升。通过深入浅出的方式,作者带领读者探索Cassandra的世界,确保读者能够充分利用这个分布式数据库系统,实现真正的高可用性和业务连续性。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/9643753/bg10.jpg)
Preface
[ 4 ]
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book-what you liked or disliked. Reader feedback is important for us as it helps us develop
titles that you will really get the most out of. To send us general feedback, simply e-
mail feedback@packtpub.com, and mention the book's title in the subject of your message. If
there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.
Downloading the example code
You can download the example code files for this book from your account at h t t p : / / w w w . p
a c k t p u b . c o m. If you purchased this book elsewhere, you can visit h t t p : / / w w w . p a c k t p u b . c
o m / s u p p o r t and register to have the files e-mailed directly to you.
You can download the code files by following these steps:
Log in or register to our website using your e-mail address and password.1.
Hover the mouse pointer on the SUPPORT tab at the top.2.
Click on Code Downloads & Errata.3.
Enter the name of the book in the Search box.4.
Select the book for which you're looking to download the code files.5.
Choose from the drop-down menu where you purchased this book from.6.
Click on Code Download.7.
Once the file is downloaded, please make sure that you unzip or extract the folder using the
latest version of:
WinRAR / 7-Zip for Windows
Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux
![](https://csdnimg.cn/release/download_crawler_static/9643753/bg11.jpg)
Preface
[ 5 ]
The code bundle for the book is also hosted on GitHub at h t t p s : / / g i t h u b . c o m / P a c k t P u b l
i s h i n g / C a s s a n d r a - 3 x - H i g h - A v a i l a b i l i t y - S e c o n d - E d i t i o n. We also have other code
bundles from our rich catalog of books and videos available at h t t p s : / / g i t h u b . c o m / P a c k t
P u b l i s h i n g /. Check them out!
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-
we would be grateful if you could report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you find any
errata, please report them by visiting h t t p : / / w w w . p a c k t p u b . c o m / s u b m i t - e r r a t a, selecting
your book, clicking on the Errata Submission Form link, and entering the details of your
errata. Once your errata are verified, your submission will be accepted and the errata will
be uploaded to our website or added to any list of existing errata under the Errata section of
that title.
To view the previously submitted errata, go to h t t p s : / / w w w . p a c k t p u b . c o m / b o o k s / c o n t e n
t / s u p p o r t and enter the name of the book in the search field. The required information will
appear under the Errata section.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At
Packt, we take the protection of our copyright and licenses very seriously. If you come
across any illegal copies of our works in any form on the Internet, please provide us with
the location address or website name immediately so that we can pursue a remedy.
Please contact us at copyright@packtpub.com with a link to the suspected pirated
material.
We appreciate your help in protecting our authors and our ability to bring you valuable
content.
Questions
If you have a problem with any aspect of this book, you can contact us
at questions@packtpub.com, and we will do our best to address the problem.
![](https://csdnimg.cn/release/download_crawler_static/9643753/bg12.jpg)
1
Cassandra's Approach to High
Availability
What does it mean for a data store to be highly available? When designing or configuring a
system for high availability, architects typically hope to offer some guarantee of uptime
even in the presence of failure. Historically, it has been sufficient for the vast majority of
systems to be available for less than 100 percent of the time, with some attempting to
achieve the five nines, or 99.999, percent uptime.
The exact definition of high availability depends on the requirements of the application.
This concept has gained increasing significance in the context of web applications, real-time
systems, and other use cases that cannot afford any downtime. Database systems must not
only guarantee system uptime, the ability to fulfill requests, but also ensure that the data
itself remains available.
Traditionally, it has been difficult to make databases highly available, especially the
relational database systems that have dominated the scene for the last couple of decades.
These systems are most often designed to run on a single large machine, making it
challenging to scale out to multiple machines.
Let's examine some of the reasons why many popular database systems have difficulty
being deployed in high availability configurations, as this will allow us to have a greater
understanding of the improvements that Cassandra offers. Exploring these reasons can help
us to put aside previous assumptions that simply don't translate to the Cassandra model.
![](https://csdnimg.cn/release/download_crawler_static/9643753/bg13.jpg)
Cassandra's Approach to High Availability
[ 7 ]
Therefore, in this chapter, we'll cover the following topics:
The Atomicity Consistency Isolation Durability (ACID) properties
Monolithic architecture
Master-slave architecture, covering sharding and leader election
Cassandra's approach to achieving high availability
Introducing the ACID properties
One of the most significant obstacles that prevents traditional databases from achieving
high availability is that they attempt to strongly guarantee the ACID properties:
Atomicity: This guarantees that database updates associated with a transaction
occur in an all-or-nothing manner. If some part of the transaction fails, the state of
the database remains unchanged.
Consistency: This assures that the integrity of data will be preserved across all
instances of that data. Changes to a value in one location will definitely be
reflected in all other locations.
Isolation: This attempts to ensure that concurrent transactions that manipulate
the same data do so in a controlled manner, essentially isolating in-process
changes from other clients. Most traditional relational database systems provide
various levels of isolation with different guarantees at each level.
Durability: This ensures that all writes are preserved in nonvolatile storage, most
commonly on disk.
Database designers most commonly achieve these properties via write masters, locks,
elaborate storage area networks, and the like-all of which tend to sacrifice availability. As a
result, achieving some semblance of high availability frequently involves bolt-on
components, log shipping, leader election, sharding, and other such strategies that attempt
to preserve the original design.
Monolithic simplicity
The simplest design approach to guarantee ACID properties is to implement a monolithic
architecture where all functions reside on a single machine. Since no coordination among
nodes is required, the task of enforcing all the system rules is relatively straightforward.
![](https://csdnimg.cn/release/download_crawler_static/9643753/bg14.jpg)
Cassandra's Approach to High Availability
[ 8 ]
Increasing availability in such architectures typically involves hardware layer
improvements, such as RAID arrays, multiple network interfaces, and hot-swappable
drives. However, the fact remains that even the most robust database server acts as a single
point of failure. This means that if the server fails, the application becomes unavailable. This
architecture can be illustrated with the following diagram:
A common means of increasing capacity to handle requests on a monolithic architecture is
to move the storage layer to a shared component such as a storage area network (SAN) or
network attached storage (NAS). Such devices are usually quite robust, with large numbers
of disks and high-speed network interfaces. This approach is shown in a modification of the
previous diagram, which depicts two database servers using a single NAS.
剩余187页未读,继续阅读
![epub](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/e66324aa22894c0997bffffafc974f36_ramissue.jpg!1)
ramissue
- 粉丝: 354
- 资源: 1487
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 多模态联合稀疏表示在视频目标跟踪中的应用
- Kubernetes资源管控与Gardener开源软件实践解析
- MPI集群监控与负载平衡策略
- 自动化PHP安全漏洞检测:静态代码分析与数据流方法
- 青苔数据CEO程永:技术生态与阿里云开放创新
- 制造业转型: HyperX引领企业上云策略
- 赵维五分享:航空工业电子采购上云实战与运维策略
- 单片机控制的LED点阵显示屏设计及其实现
- 驻云科技李俊涛:AI驱动的云上服务新趋势与挑战
- 6LoWPAN物联网边界路由器:设计与实现
- 猩便利工程师仲小玉:Terraform云资源管理最佳实践与团队协作
- 类差分度改进的互信息特征选择提升文本分类性能
- VERITAS与阿里云合作的混合云转型与数据保护方案
- 云制造中的生产线仿真模型设计与虚拟化研究
- 汪洋在PostgresChina2018分享:高可用 PostgreSQL 工具与架构设计
- 2018 PostgresChina大会:阿里云时空引擎Ganos在PostgreSQL中的创新应用与多模型存储
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)