Database Specialty - Amazon Keyspaces Flashcards
1
Q
Amazon Keyspaces – Overview
A
- A scalable, highly available, and fully-managed database service
- Lets you run your Cassandra workloads on AWS
- Cassandra is an open-source, wide-column, NoSQL data store
- Is serverless, so you pay for what you use + autoscaling
- Supports thousands of requests per second with virtually unlimited throughput and storage
- Compatible with the CQL (Cassandra Query Language) API
- Security through IAM, VPC and KMS
- Data is encrypted by default, supports encryption at rest and in transit
- Supports continuous backups with PITR
- All writes replicated three times across multiple AZs for durability and availability
- Offers 99.99% availability SLA within Region with no scheduled downtime
- Monitoring through CloudWatch, DDL actions logged with CloudTrail
- Use cases: IoT device metadata / User profiles / Time-series data / Transactions data (e.g. ecommerce)
2
Q
CQL (Cassandra Query Language )
A
- You use CQL for interacting with Cassandra database
(and with Keyspaces) - To run CQL queries, you can use:
- CQL editor in the AWS Console
- cqlsh client (CQL shell)
- Cassandra client driver (programmatic access)
3
Q
Migrating from Cassandra to Keyspaces
A
- Export existing cluster data to CSV files
- Import using cqlsh COPY command
4
Q
Read and write consistency in Keyspaces
A
- Two read consistency modes:
- LOCAL_ONE consistency
- LOCAL_QUORUM consistency
- LOCAL_ONE optimizes for performance and availability by returning
the first returned value from any storage replica - LOCAL_QUORUM optimizes for data correctness by requiring at least
two replicas to return a value before it is returned to your application - All writes use LOCAL_QUORUM for durability
5
Q
Keyspaces pricing - On-demand mode
A
- Uses RRUs and WRUs (read/write request units)
- You pay for the actual reads and writes
- Use with unpredictable application traffic
- 1 RRU = one 4KB read with LOCAL_QUORUM consistency
- 1 RRU = two 4KB reads with LOCAL_ONE consistency
- 1 WRU = one1KB write with LOCAL_QUORUM consistency
6
Q
Keyspaces pricing - Provisioned mode
A
- Uses RCUs and WCUs (read/write capacity units)
- You specify the number of reads and writes per second
- Lets you optimize costs if you have predictable application traffic and can forecast capacity requirements in advance
- 1 RCU = one 4KB read with LOCAL_QUORUM consistency
- 1 RCU = two 4KB reads with LOCAL_ONE consistency
- 1 WCU = one1KB write with LOCAL_QUORUM consistency