售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Cassandra High Availability
Table of Contents
Cassandra High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Cassandra's Approach to High Availability
ACID
The monolithic architecture
The master-slave architecture
Sharding
Master failover
Cassandra's solution
Cassandra's architecture
Distributed hash table
Replication
Replication across data centers
Tunable consistency
The CAP theorem
Summary
2. Data Distribution
Hash table fundamentals
Distributing hash tables
Consistent hashing
The mechanics of consistent hashing
Token assignment
Manually assigned tokens
vnodes
How vnodes improve availability
Adding and removing nodes
Node rebuilding
Heterogeneous nodes
Partitioners
Hotspots
Effects of scaling out using ByteOrderedPartitioner
A time-series example
Summary
3. Replication
The replication factor
Replication strategies
SimpleStrategy
NetworkTopologyStrategy
Snitches
Maintaining the replication factor when a node fails
Consistency conflicts
Consistency levels
Repairing data
Balancing the replication factor with consistency
Summary
4. Data Centers
Use cases for multiple data centers
Live backup
Failover
Load balancing
Geographic distribution
Online analysis
Analysis using Hadoop
Analysis using Spark
Data center setup
RackInferringSnitch
PropertyFileSnitch
GossipingPropertyFileSnitch
Cloud snitches
Replication across data centers
Setting the replication factor
Consistency in a multiple data center environment
The anatomy of a replicated write
Achieving stronger consistency between data centers
Summary
5. Scaling Out
Choosing the right hardware configuration
Scaling out versus scaling up
Growing your cluster
Adding nodes without vnodes
Adding nodes with vnodes
How to scale out
Adding a data center
How to scale up
Upgrading in place
Scaling up using data center replication
Removing nodes
Removing nodes within a data center
Decommissioning a data center
Other data migration scenarios
Snitch changes
Summary
6. High Availability Features in the Native Java Client
Thrift versus the native protocol
Setting up the environment
Connecting to the cluster
Executing statements
Prepared statements
Batched statements
Caution with batches
Handling asynchronous requests
Running queries in parallel
Load balancing
Failing over to a remote data center
Downgrading the consistency level
Defining your own retry policy
Token awareness
Tying it all together
Falling back to QUORUM
Summary
7. Modeling for High Availability
How Cassandra stores data
Implications of a log-structured storage
Understanding compaction
Size-tiered compaction
Leveled compaction
Date-tiered compaction
CQL under the hood
Single primary key
Compound keys
Partition keys
Clustering columns
Composite partition keys
The importance of the storage model
Understanding queries
Query by key
Range queries
Denormalizing with collections
How collections are stored
Sets
Lists
Maps
Working with time-series data
Designing for immutability
Modeling sensor data
Queries
Time-based ordering
Using a sentinel value
Satisfying our queries
When time is all that matters
Working with geospatial data
Summary
8. Antipatterns
Multikey queries
Secondary indices
Secondary indices under the hood
Distributed joins
Deleting data
Garbage collection
Resurrecting the dead
Unexpected deletes
The problem with tombstones
Expiring columns
TTL antipatterns
When null does not mean empty
Cassandra is not a queue
Unbounded row growth
Summary
9. Failing Gracefully
Knowledge is power
Monitoring via Java Management Extensions
Using OpsCenter
Choosing a management toolset
Logging
Cassandra logs
Garbage collector logs
Monitoring node metrics
Thread pools
Column family statistics
Finding latency outliers
Communication metrics
When a node goes down
Marking a downed node
Handling a downed node
Handling slow nodes
Backing up data
Taking a snapshot
Incremental backups
Restoring from a snapshot
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜