Key-Value Stores (Redis, DynamoDB) Flashcards
Key-value model explained Redis data structures: strings, lists, sets, hashes, sorted sets Expiry and TTL in Redis Pub/Sub, pipelines, and Lua scripting Redis persistence: RDB, AOF DynamoDB basics: partitions, partition keys, sort keys DynamoDB read/write throughput and autoscaling Consistency models in DynamoDB (eventual vs strong consistency) (47 cards)
What is the key-value model in NoSQL?
The key-value model stores data as a collection of key-value pairs, where each key is unique and maps directly to a value.
What is Redis?
Redis is an in-memory key-value data store known for its high performance and support for various data structures.
What data structures does Redis support?
Redis supports strings, lists, sets, sorted sets, and hashes.
What is a Redis string?
A Redis string is the most basic data type and can hold any binary data up to 512MB, including text and serialized objects.
What is a Redis list?
A Redis list is a collection of ordered values that allows push and pop operations from both ends (like a linked list).
What is a Redis set?
A Redis set is an unordered collection of unique values, useful for membership tests and set operations.
What is a Redis hash?
A Redis hash is a map of string fields and string values, ideal for representing objects.
What is a Redis sorted set?
A sorted set in Redis is similar to a set but each element has a score used to order the elements.
What is expiry in Redis?
Expiry refers to setting a time-to-live (TTL) on a key, after which the key is automatically deleted.
What is TTL in Redis?
TTL (Time To Live) is the remaining time before a key expires and is automatically removed from Redis.
What is Redis Pub/Sub?
Redis Pub/Sub allows message broadcasting between publishers and subscribers using channels.
What is Redis pipelining?
Redis pipelining allows sending multiple commands to the server without waiting for individual responses, improving performance.
What is Lua scripting in Redis?
Lua scripting enables executing complex operations atomically on the Redis server using the embedded Lua interpreter.
What are RDB snapshots in Redis?
RDB (Redis Database) snapshots are point-in-time snapshots of your dataset saved to disk at specified intervals.
What is AOF in Redis?
AOF (Append Only File) logs every write operation received by the server for durability and recovery.
What is DynamoDB?
DynamoDB is a fully managed NoSQL key-value and document database service provided by AWS.
What is a partition in DynamoDB?
A partition is a unit of data storage and performance in DynamoDB, determined by partition keys.
What is a partition key in DynamoDB?
The partition key is a primary key attribute that determines the partition where data is stored.
What is a sort key in DynamoDB?
A sort key is used with a partition key to form a composite primary key, allowing multiple items in the same partition.
What is read/write throughput in DynamoDB?
Read/write throughput refers to the number of reads and writes per second, which can be provisioned or automatically scaled.
What is autoscaling in DynamoDB?
Autoscaling automatically adjusts read and write capacity based on demand to maintain performance and cost-efficiency.
What is eventual consistency in DynamoDB?
Eventual consistency means reads might not reflect the latest write immediately but will do so eventually.
What is strong consistency in DynamoDB?
Strong consistency guarantees that a read reflects the most recent write for that item.
What are key-value stores?
Key-value stores are NoSQL databases that use a simple key-value method to store data, enabling fast lookups and inserts.