Storage
58 bites tagged Storage — interview questions with model answers, and 60-second explainers.
Choosing the Right Client-Side Storage
Client-side storage turns the browser into a mini-database for faster loads and offline access. It's used for remembering user preferences or caching assets.
IndexedDB Object Stores: Your Browser's NoSQL Table
An IndexedDB Object Store is like a NoSQL table in your browser, holding JavaScript objects by key. Use it for offline data like to-do lists or cached API responses. The main footgun: you can only create stores during a database version upgrade.
IndexedDB: A NoSQL Database in Your Browser
Think of IndexedDB as a NoSQL database in the browser, built for large structured data that localStorage can't handle. It's ideal for offline apps or caching large assets. The footgun: browsers can evict your data, so it's not permanent storage.
Web Storage API: Browser Key-Value Stores
Web Storage provides simple browser key-value stores: `localStorage` and `sessionStorage`. Use `localStorage` for data that persists across sessions, like user settings, and `sessionStorage` for data tied to a single tab.
React Native Secure Storage: Using Keychain and Keystore
Use the device's native vault (Keychain/Keystore) to store secrets, not plaintext in AsyncStorage. It's for securely persisting small data like API tokens or private keys. The footgun is treating it like a general database; it's slow and for secrets only.
Data Storage Tiering: Pay Only for the Access You Need
Treat data like items in a house: hot, frequently used data on the counter; cool, less-used data in the pantry. Cloud providers use this to price storage, letting you move old logs to cheaper tiers.
Data Lake vs. Data Warehouse: Raw vs. Refined Data
A data lake is a vast pool of raw data; a data warehouse is a library of refined data ready for analysis. Lakes store everything for future ML or data science; warehouses power BI reporting on clean metrics.
CSI Volume Cloning: `cp` for Kubernetes Volumes
Think of volume cloning as `cp` for your Kubernetes data. It creates a new, independent volume pre-populated with data from an existing one, offloading the copy operation to your storage provider.
Kubernetes Volume Snapshots: A Save Point for Data
A Volume Snapshot is a point-in-time copy of your persistent data in Kubernetes, like a game save. Use it to back up a database before an upgrade or clone a prod environment. The footgun: it's not a true backup; a storage failure can lose both.
Container Storage Interface (CSI): The Universal Adapter for K8s Storage
CSI is a universal adapter for storage in Kubernetes, letting any storage system speak a common language. This allows providers to create plugins for their systems without touching core Kubernetes code.
Dynamic Volume Provisioning: Storage on Demand
Dynamic Volume Provisioning lets you request storage by its type (e.g., "fast-ssd") instead of pre-provisioning a disk. Kubernetes automatically creates a matching volume. This is standard for stateful apps.
Kubernetes StorageClass: A Menu for Your Data
A StorageClass is an admin-defined 'menu' of storage options, abstracting the provider. Developers request storage by name (e.g., 'fast-ssd') via a PersistentVolumeClaim, and Kubernetes dynamically provisions it.
PersistentVolumeClaim: How Pods Request Storage
A PersistentVolumeClaim (PVC) is a request for storage, like a claim check for a storage locker. Pods use it to mount durable storage for databases or file uploads. The footgun: a PVC is just a request; a matching PersistentVolume must exist to fulfill it.
Union File Systems: Docker's Layered Magic
A Union File System stacks read-only layers and adds a writable one on top, like transparent overlays. This lets containers share base images, saving disk space, while isolating changes via copy-on-write. The footgun is performance on write-heavy apps.
Heap File Organization: Fast Writes, Slow Reads
Heap file organization is like tossing records into a box in no particular order. It's great for bulk-loading data quickly, but searching requires a full table scan. The footgun is using it for frequently queried tables, which kills performance.
Database Pages: The Building Blocks of Your Data
A database page is the fundamental 8KB block for all storage. The database engine reads and writes entire pages, not single rows, for user data, indexes, and metadata. The key footgun: the physical order of rows on a page is not guaranteed.
Row vs. Columnar Storage: Organizing Data for Speed
Row stores group data by record, like a phone book entry. Column stores group by attribute, like separate lists for all names. Use row stores for transactions (OLTP), but for analytics (OLAP), they force you to read unneeded data from disk.
Storage Engine: The Database's Filing System
A database's storage engine is its specialized filing system, handling how data is physically written to and read from disk. Different engines optimize for different tasks, from fast writes to complex queries.
Automate Storage Costs with Lifecycle Policies
Object storage lifecycle policies are automated rules that move or delete data as it ages to save money. They're ideal for logs or backups, transitioning them to cheaper "cold" storage over time.
Storage Gateway: Your On-Prem to Cloud Translator
A storage gateway is a translator, letting your on-prem applications talk to cloud storage without learning its native API language. It presents cloud storage as a local file share or block device, enabling hybrid cloud backups and data tiering.
Presigned URLs: Temporary Access to Private Files
A presigned URL is a temporary, authenticated link to a private cloud storage object, bundling credentials into the URL. Use it to let users upload or download private files directly, bypassing your server. The URL is a bearer token, so set short expirations.
Object Versioning: A Safety Net for Cloud Files
Object Versioning treats every file change as a new version, not a replacement. It's used in cloud storage to recover from accidental overwrites or deletions. The footgun: you pay for all versions, so costs can multiply without cleanup policies.
Encryption at Rest: Securing Your Data When It's Not Moving
Encryption at rest is like locking your data in a safe when it's not moving. It protects raw files on disk if storage is stolen, a default on platforms like Google Cloud. The footgun: it doesn't stop a compromised app with valid keys from reading.
Cross-Region Replication (CRR): Geographic Data Copying
Cross-Region Replication automatically copies data to another geographic region, like a live backup. Use it for disaster recovery, lower latency for global users, or compliance. The footgun: it only copies *new* objects, not what's already in the bucket.
Get Storage bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.