Merge 2 Flashcards
Where is data in DynamoDB stored?
SSD Storage
Where is DynamoDB spread?
across 3 geographically distinct data centers (not AZs)
Default consistency model for DynamoDB
Eventual Consistent Reads. Strongly consistent reads is the other
Eventual Consistent Reads
Consistency across all copies of data is usually reached within 1 second. repeating a read after a short time should return the updated data (best read performance)
Strongly Consistent Reads
returns the result that reflects all writes that received a successful response prior to the read
If low latency is important
pick Eventual consistent reads. Otherwise, pick strongly consistent reads
DynamoDB pricing
Provisioned throughput capacity, storage
How expensive is DynamoDB?
Expensive for writes, cheap for reads
Use case for DynamoDB
If DB is read-heavy, scalabilty and good performance are important, SQL is not necessary
default read and write capacity units when creating a DynamoDB table
5, 5
can you purchase reserved capacity?
Yes, 1 or 3-year terms
Item
Row
Important metrics to know
Read capacity Units, Write capacity units (both provisioned/consumed)
Is RedShift fully managed?
Yes
RedShift configuration
Single node (160 GB), multi-node
Multi node consists of
Leader node, compute node
Leader node
manages client connections and receives queries
Compute node
store data and perform queries and computations. up to 128 compute nodes
Does RedShift organize data by rows or columns?
Columns, so improved performance
Redshift is fast because
Massively Parallel processing, advanced compression
RedShift pricing
compute node hours,backup, data transfer w/in a VPC
RedShift security
encrypted in transit (SSL), encrypted at rest (AES-256), redshift takes care of key management by default
Redshift availability
1 AZ, can restore snapshots to new AZs in case of outage
Elasticache can be used for
improving application performance/latency/throughput for many read-heavy apps by storing critical pieces of data in memory for low-latency access (social networking, gaming, media sharing, Q/A portals)
Memcached
memory object caching system
Redis
open source in-memory key-value store that support data structures such as sorted sets and lists.
Elasticache supports
Master/slave replication, multi-AZ
If a database is under a lot of stress, which service would you use?
Elasticache if read heavy and not prone to frequently changing
Redshift if reason for stress is OLAP
What is Aurora?
MySQL-compatible, relational database engine that combines the speed and availability of high-end commercial databases with the simplicity and cost-effectiveness of open-source databases
Performance, Price: Aurora vs MySQL
Aurora: 5x better, 1/10 cheaper
Aurora scaling
start with 10 GB, scales in 10 GB increments to 64 Tb
Compute resources scaling
up to 32 vCPUs and 244 Gb memory
How many copies of Aurora data?
2 per AZ, minimum of 3 AZs, so minimum of 6
How many copies can be lost w/o affecting availability?
2 - write, 3 - read
Aurora is self-healing, what is meant by that?
data blocks and disks are continuously scanned for errors and repaired automatically
2 Aurora replicas
Aurora replicas (15), MySQL Read replicas (5)
Aurora Replica vs MySQL read replica
which has failover?
Aurora read replica has failover, MySql read replica doesn’t
Failover logic
tier 0 is highest
What is SQS?
web service that allows you to access a message queue that can be used to store messages while waiting for a computer to process them.distributed queue system that enables web services apps to quickly and reliably queue messages that one component in the app generates to be consumed by another component
What is a queue?
temporary repository for messages that are awaiting processing