Databases (DynamoDb, RDS) Flashcards
What type of DB is Dynamo Db
No SQL db
What are key features of Dynamo DB
DNAMO
- Distributed across multiple servers
- NoSQL (semi structured / unstructured data)
- Adapts provisioning (on demand or provisioned capacity)
- Managed Service (hardware, config, scaling, backup etc)
- Out of the box encryption (in transit and at rest)
What are key value pairs in Dynamo DB
data structure used to store and retrieve data
What is a sort key in Dynamo Db
organizes and orders items within the partition of a table (like a label / category)
Which has better performance scanning or querying Dynamo db
Query has better performance than scanning
Querying can be efficient with partition key and sort key
Scanning should be avoided because it is slow and more expensive
When would you use provisioned Dynamo DB vs on demand Dynamo DB
Provisioned is for predictable workloads with known read and write patterns
On demand capacity is for flexible, pay as you go pricing without the need to forecast usage
How do we provision and pay for a Dynamo Db table?
- Provisioned Dynamo DB table
- Expect 1 read per second can scale up or down by 2 - On demand Dynamo DB table
- spins up, answers request and turns off
Describe a real life use case for Dynamo DB
Netflix uses DynamoDB to manage customer meta data, preferences and session info because of its scalability, low latency, and high availability
- Ability to handle massive volumes of data is well-suited to the dynamic and high demand of Netflix
- Flexible data storage and retrieval of various types of customer data enables personalization and customization of user experiences.
What is RDS
Is the service that RUNS the database engine ie., oracle, sql
RDS is the database admin
What is Aurora?
Aurora is a db engine that can be managed with RDS
It is cloud native
Why would you want a Aurora Single Master
If you have a simple app that doesn’t need complex data distribution or multiple masters
It has ONE ‘master’ database that handles all read and write requests
It’s like a central librarian managing all books and can make changes to them
Why would you want Aurora Multi Master
If you have a globally distributed or highly responsive app
You will have multiple ‘masters’ capable of reading and writing at the same time
It’s like having multiple librarians who can check out and update books independently
Why do you need Aurora Multiple Read Replicas
create copies of your database for reading data, making ur app faster because you serve customers in different locations
Why would you need Aurora Serverless
- pay as you go
- auto scales based on demand
ideal for unpredictable apps
Where does elasticache fit in the architecture?
Elasticache sits between apps and dbs
ie., ec2 elasticache rds
It is a managed service you can used with caching engines such as REDIS or MEMCACHED
Name the 2 main types of keys used in Dynamo DB
Partition Key (Hash Key)
Sort Key (Range Key)
Elasticache is a managed service that you can use with which 2 caching engines..
REDIS
MEMCACHED
What does RDS stand for?
Relational Database Service