DataBurst Data Engineering Wiki - Roadmap Step-by-Step: https://wiki.databurst.tech/docs/roadmap/ - Introduction: https://wiki.databurst.tech/docs/roadmap/introduction/ - Programming Language: https://wiki.databurst.tech/docs/roadmap/programming-language/ - Python: https://wiki.databurst.tech/docs/roadmap/programming-language/python/ - Java: https://wiki.databurst.tech/docs/roadmap/programming-language/java/ - Scala: https://wiki.databurst.tech/docs/roadmap/programming-language/scala/ - Go: https://wiki.databurst.tech/docs/roadmap/programming-language/go/ - Rust: https://wiki.databurst.tech/docs/roadmap/programming-language/rust/ - Operating System: https://wiki.databurst.tech/docs/roadmap/operating-system/ - Windows: https://wiki.databurst.tech/docs/roadmap/operating-system/windows/ - Linux: https://wiki.databurst.tech/docs/roadmap/operating-system/linux/ - Networking: https://wiki.databurst.tech/docs/roadmap/networking/ - Protocols: https://wiki.databurst.tech/docs/roadmap/networking/protocols/ - TCP/IP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/tcp/ - DNS: https://wiki.databurst.tech/docs/roadmap/networking/protocols/dns/ - HTTP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/http/ - HTTPS: https://wiki.databurst.tech/docs/roadmap/networking/protocols/https/ - SSH: https://wiki.databurst.tech/docs/roadmap/networking/protocols/ssh/ - UDP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/udp/ - Concepts: https://wiki.databurst.tech/docs/roadmap/networking/concepts/ - IP addressing: https://wiki.databurst.tech/docs/roadmap/networking/concepts/ip-addressing/ - DHCP: https://wiki.databurst.tech/docs/roadmap/networking/concepts/dhcp/ - Firewalls: https://wiki.databurst.tech/docs/roadmap/networking/concepts/firewalls/ - VPN: https://wiki.databurst.tech/docs/roadmap/networking/concepts/vpn/ - General Software Engineering Skills: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/ - OAuth: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/oauth/ - JWT: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/jwt/ - GraphQL: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/graphql/ - REST: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/rest/ - gRPC: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/grpc/ - Caching: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/caching/ - Web Frameworks and API Development: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/ - Python: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/python/ - Go: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/go/ - Java: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/java/ - Version Control System: https://wiki.databurst.tech/docs/roadmap/version-control-system/ - git: https://wiki.databurst.tech/docs/roadmap/version-control-system/git/ - Version Control System Hosting: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/ - Github: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/github/ - Gitlab: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/gitlab/ - BitBucket: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/bitbucket/ - Distributed Systems Concepts: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/ - CAP: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/cap/ - PACELC: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/pacelc/ - Sharding: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/sharding/ - Clock: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/clock/ - ACID: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/acid/ - Replication: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/replication/ - Distributed Transactions: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/transaction/ - Indexing: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/indexing/ - Batch and Stream Processing: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/batch-and-stream-processing/ - Consistency vs Eventual Consistency: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/consistency-vs-eventual-consistency/ - Normalization or Denormalization: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/normalization-or-denormalization/ - SQL Fundamentals: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/ - Basic SQL: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/basic-sql/ - Advanced SQL: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/advanced-sql/ - Databases: https://wiki.databurst.tech/docs/roadmap/databases/ - Relational: https://wiki.databurst.tech/docs/roadmap/databases/relational/ - NoSQL: https://wiki.databurst.tech/docs/roadmap/databases/nosql/ - Columnar: https://wiki.databurst.tech/docs/roadmap/databases/nosql/columnar/ - Document Based: https://wiki.databurst.tech/docs/roadmap/databases/nosql/document-based/ - Key-Value: https://wiki.databurst.tech/docs/roadmap/databases/nosql/key-value/ - Time Series: https://wiki.databurst.tech/docs/roadmap/databases/nosql/time-series/ - Vector: https://wiki.databurst.tech/docs/roadmap/databases/nosql/vector/ - Graph: https://wiki.databurst.tech/docs/roadmap/databases/nosql/graph/ - NewSQL: https://wiki.databurst.tech/docs/roadmap/databases/nosql/newsql/ - Data Modeling: https://wiki.databurst.tech/docs/roadmap/data-modeling/ - Star Schema (Ralph Kimball): https://wiki.databurst.tech/docs/roadmap/data-modeling/star-schema/ - Snowflake: https://wiki.databurst.tech/docs/roadmap/data-modeling/snowflake/ - Data Vault: https://wiki.databurst.tech/docs/roadmap/data-modeling/data-vault/ - Data Management Architecture: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/ - Relational Data Warehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/relational-data-warehouse/ - Data Lake: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-lake/ - Modern Data Warehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/modern-data-warehouse/ - Data Fabric: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-fabric/ - Data Mart: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-mart/ - Data Lakehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-lakehouse/ - Data Mesh: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-mesh/ - Data Integration: https://wiki.databurst.tech/docs/roadmap/data-integration/ - ETL: https://wiki.databurst.tech/docs/roadmap/data-integration/etl/ - ELT: https://wiki.databurst.tech/docs/roadmap/data-integration/elt/ - CDC: https://wiki.databurst.tech/docs/roadmap/data-integration/cdc/ - Reverse ETL: https://wiki.databurst.tech/docs/roadmap/data-integration/reverse-etl/ - Storage: https://wiki.databurst.tech/docs/roadmap/storage/ - Block Storage: https://wiki.databurst.tech/docs/roadmap/storage/block-storage/ - Object Storage: https://wiki.databurst.tech/docs/roadmap/storage/object-storage/ - File Formats and Serialization: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/ - File Formats: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/ - CSV: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/csv/ - JSON: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/json/ - Parquet: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/parquet/ - XML: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/xml/ - Serialization: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/ - Avro: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/avro/ - Protocol Buffers: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/protobuf/ - Query Engine: https://wiki.databurst.tech/docs/roadmap/query-engine/ - Apache Hive: https://wiki.databurst.tech/docs/roadmap/query-engine/hive/ - SparkSQL: https://wiki.databurst.tech/docs/roadmap/query-engine/sparksql/ - Trino: https://wiki.databurst.tech/docs/roadmap/query-engine/trino/ - Presto: https://wiki.databurst.tech/docs/roadmap/query-engine/presto/ - Data Architecture: https://wiki.databurst.tech/docs/roadmap/data-architecture/ - Kappa: https://wiki.databurst.tech/docs/roadmap/data-architecture/kappa/ - Lambda: https://wiki.databurst.tech/docs/roadmap/data-architecture/lambda/ - Data Processing: https://wiki.databurst.tech/docs/roadmap/data-processing/ - Pipeline Orchestration: https://wiki.databurst.tech/docs/roadmap/pipeline-orchestration/ - Messaging and Streaming Platform: https://wiki.databurst.tech/docs/roadmap/messaging-and-streaming-platform/ - Data Governance: https://wiki.databurst.tech/docs/roadmap/data-governance/ - Data Quality: https://wiki.databurst.tech/docs/roadmap/data-governance/data-quality/ - Data Visualization: https://wiki.databurst.tech/docs/roadmap/data-visualization/ - Containerization: https://wiki.databurst.tech/docs/roadmap/containerization/ - Docker: https://wiki.databurst.tech/docs/roadmap/containerization/docker/ - Podman: https://wiki.databurst.tech/docs/roadmap/containerization/podman/ - containerd: https://wiki.databurst.tech/docs/roadmap/containerization/containerd/ - Container Orchestration: https://wiki.databurst.tech/docs/roadmap/container-orchestration/ - Kubernetes: https://wiki.databurst.tech/docs/roadmap/container-orchestration/kubernetes/ - Docker Swarm: https://wiki.databurst.tech/docs/roadmap/container-orchestration/docker-swarm/ - Apache Mesos: https://wiki.databurst.tech/docs/roadmap/container-orchestration/apache-mesos/ - CI/CD: https://wiki.databurst.tech/docs/roadmap/cicd/ - DataOps: https://wiki.databurst.tech/docs/roadmap/cicd/dataops/ - Infrastructure as Code: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/ - Configuration Management: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/configuration-management/ - Infrastructure Provisioning: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/infrastructure-provisioning/ - Observability: https://wiki.databurst.tech/docs/roadmap/observability/ - Logging: https://wiki.databurst.tech/docs/roadmap/observability/logging/ - Monitoring: https://wiki.databurst.tech/docs/roadmap/observability/monitoring/ - Tracing: https://wiki.databurst.tech/docs/roadmap/observability/tracing/ - Glossary: https://wiki.databurst.tech/docs/roadmap/glossary/
$ redis-cli info stats | grep keyspace
# Caching A **cache** is a small, fast store that keeps copies of data that is expensive to fetch or compute, so the next request can be answered from the copy. A Redis lookup takes well under a millisecond; the database query it replaces might take 10 ms, and an external API call 300 ms. Caches appear at every layer: CPU caches, the OS page cache, a database's buffer pool, an in-process dictionary, Redis, a CDN at the edge, and your browser. The price is that a cache can be **stale**: the copy may no longer match the source. Every caching decision is a trade between speed and freshness. ## Cache-aside, step by step **Cache-aside** (lazy loading) is the most common pattern: the application checks the cache, and on a miss loads from the database and fills the cache itself. {{< fig kicker="$ redis-cli monitor" title="Cache-aside: miss, fill, hit, eviction" >}} APP orders-api CACHE Redis · 3 keys max DATABASE PostgreSQL GET user:42 nil (miss) SELECT * FROM users WHERE id=42 row (~8 ms) SET user:42 EX 300 GET user:42 hit (~0.3 ms) SET user:99 (cache is full) LRU evicts user:42 GET user:42 nil (miss again) SELECT ... id=42
NO.STEPFROMTOTYPEINFO
101appcacheMISSGET user:42 → (nil)
202appdbQUERYSELECT * FROM users WHERE id = 42 · 8 ms
302appcacheSETSET user:42 '{…}' EX 300
403appcacheHITGET user:42 → '{"id":42,"name":"sam"}' · 0.3 ms
504cachecacheEVICTmaxmemory reached · allkeys-lru drops user:42
605appcacheMISSGET user:42 → (nil) · back to the database
  1. The app owns the logic: it talks to both the cache and the database. The cache starts empty and holds at most 3 keys.
  2. A request for user 42 checks the cache first. Nothing there: a cache miss.
  3. The app reads the row from the database, then writes it into the cache with a TTL of 300 seconds.
  4. The next request for user 42 is a cache hit: served from memory, about 25 times faster, and the database is not touched.
  5. Other users have since been read and the cache is full. Writing user 99 forces an eviction: the least recently used key, now user:42, is dropped.
  6. The next read of user 42 is a miss again and goes to the database. Hit ratio depends on cache size, TTL and access pattern.
{{< /fig >}} ```python def get_user(user_id): key = f"user:{user_id}" if (hit := redis.get(key)) is not None: return json.loads(hit) row = db.fetch_one("SELECT * FROM users WHERE id = %s", user_id) redis.set(key, json.dumps(row), ex=300) # TTL bounds staleness return row def update_user(user_id, fields): db.execute("UPDATE users SET ... WHERE id = %s", user_id) redis.delete(f"user:{user_id}") # invalidate, don't update ``` ## Write strategies | Strategy | On write | Pros | Cons | |---|---|---|---| | **Cache-aside** + delete | Write DB, delete the key | Simple, cache holds only what is read | First read after a write is a miss | | **Write-through** | Write cache and DB together | Reads are always warm | Writes slower; caches data nobody reads | | **Write-behind** | Write cache, flush to DB later | Very fast writes | Data loss if the cache dies before flushing | | **Read-through** | Cache library loads from DB itself | App code stays simple | Needs a cache that knows your data source | ## Eviction policies When memory is full, the cache must drop something: - **LRU** (least recently used): the usual default. Redis's `allkeys-lru` approximates it by sampling. - **LFU** (least frequently used): better when a few keys are hot for a long time. - **TTL-based**: keys expire after a fixed time, whether memory is full or not. ## Where caching shows up in data engineering - **Query result caches** in Snowflake and BigQuery return repeated identical queries without re-running them, at no compute cost. - **Dashboard caches** in Superset or Metabase stop BI tools from re-running the same expensive query every page load. - **Spark `cache()` / `persist()`** keeps a DataFrame in memory when several actions reuse it. - **Lookup caches** in stream processing hold dimension tables (user → country) next to a Flink job instead of querying a database per event. - **HTTP caching** with `Cache-Control` and `ETag` (see [HTTP]({{< relref "/docs/roadmap/networking/protocols/http" >}})) saves API quota in ingestion jobs. ## Common mistakes - **Cache stampede.** A hot key expires and 1,000 requests miss at once and hammer the database. Fix with a lock or "single flight" per key, early refresh, or random jitter on TTLs. - **No TTL.** Without expiry, a missed invalidation leaves wrong data forever. - **Updating the cache on write instead of deleting.** Two concurrent writers can leave the older value in the cache. Delete, and let the next read reload. - **Caching errors or empty results without a short TTL**, so one bad response is served for an hour. - **Treating the cache as the source of truth.** It can be flushed or evicted at any moment. Everything must still work, slower, with an empty cache. ## Tools in 2026 - **Redis** (back to an open-source AGPL option since Redis 8) and **Valkey**, the Linux Foundation fork created in 2024, offered as a managed service by AWS, Google Cloud and others. Both speak the same protocol. - **Memcached**: simple, multi-threaded, strings only. - **In-process**: Python `functools.lru_cache` / `cachetools`, Java Caffeine, Go `ristretto`. - **CDNs**: Cloudflare, Fastly, CloudFront cache HTTP responses at the edge. ## Learning Resources - *Designing Data-Intensive Applications* (2nd ed.), Martin Kleppmann: derived data and cache consistency - [AWS: Caching best practices](https://aws.amazon.com/caching/best-practices/) - [Scaling Memcache at Facebook](https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/nishtala): NSDI 2013 paper on leases, stampedes and invalidation - [Redis documentation: eviction policies](https://redis.io/docs/latest/develop/reference/eviction/) - [MDN: HTTP caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) - [Even Faster Web Sites](https://www.oreilly.com/library/view/even-faster-web/9780596803087/): Steve Souders, browser-side caching See also: [REST]({{< relref "../rest" >}}).