Redis Caching Patterns: TTL, Stampede, and Invalidation
Practical Redis caching patterns: cache-aside, write-through, TTL choices, stampede protection, and invalidation strategies that survive production.
442 posts · page 6 of 10
Practical Redis caching patterns: cache-aside, write-through, TTL choices, stampede protection, and invalidation strategies that survive production.
Build a real WebSocket server in Node.js: handshake, broadcasting, heartbeats, backpressure, and scaling beyond a single process.
Design C++ classes with constructors, destructors, member initializer lists, and the Rule of Three and Five to manage resources safely.
Tour the modern C++ features that pay back every day: auto, range-for, structured bindings, if-init, std::optional, and string_view.
Learn C++ pointers, the stack vs the heap, new and delete, nullptr, pointer arithmetic, and why modern C++ pushes you toward smart pointers.
Use unique_ptr, shared_ptr, and weak_ptr to model ownership in modern C++ without manual new and delete or memory leaks.
Pick the right C++ STL container for the job: vector, deque, list, map, set, unordered_map, and unordered_set with their complexity guarantees.
Learn C++ templates from scratch: function templates, class templates, type deduction, specialization, and how the compiler stamps out concrete code.
ArgoCD makes Git the source of truth for your Kubernetes clusters. Learn the GitOps pattern, the App-of-Apps model, and sync strategies that work.
Use the matrix strategy in GitHub Actions to test across Node versions, operating systems, and dependency sets without duplicating workflow files.
Set up NGINX as a reverse proxy for Node, Python, or container backends with the right headers, timeouts, and TLS configuration for production.
Learn the foundations of Terraform: writing HCL, configuring providers, managing state, and creating your first cloud resource the right way.
A practical guide to Docker networking: the default bridge, user-defined bridges, host networking, container DNS, and how port publishing actually works.
A practical guide to Go error handling: the error interface, sentinel values, custom types, wrapping with fmt.Errorf %w, and errors.Is and errors.As.
Learn Go concurrency from the ground up: launching goroutines, communicating via channels, using select, range, and building a worker pool pattern.
A practical tour of Go packages and modules: go mod init, imports, internal packages, semantic versioning, and the replace directive for local development.
A clear guide to Go structs and methods: literal forms, defining methods, choosing value vs pointer receivers, and using embedding for composition.
Pick the right Java collection by performance and semantics. ArrayList vs LinkedList, HashMap vs TreeMap, immutability, and iteration without surprises.
Use extends, super, and method overriding without painting yourself into a corner. When to inherit, when to compose, and how sealed types help.
Choose between interfaces and abstract classes with confidence. Default methods, sealed interfaces, functional interfaces, and concrete decision rules.
Transform collections with lambdas and the Stream API. Map, filter, reduce, collectors, parallel streams, and the pitfalls of lazy pipelines.
A practical guide to JavaScript closures, lexical scope, the classic loop bug, and the patterns that make closures genuinely useful in production code.
A modern guide to vanilla DOM manipulation: query selectors, creating and inserting nodes, event handling, delegation, and when a framework is actually worth it.
Build an accurate mental model of the JavaScript event loop, the call stack, web APIs, the task and microtask queues, and why setTimeout zero is not really zero.
A practical guide to the Fetch API: GET and POST requests, JSON, headers, error handling, AbortController, and the 4xx/5xx rejection gotcha that bites everyone.
Understand the JavaScript prototype chain, how Object.create works, what class syntax desugars to, and why this still matters in modern code.
Demystify the JavaScript this keyword with clear rules, arrow vs normal functions, bind/call/apply, class methods, and the bugs that catch every developer.
A practical guide to backtracking: the recursion template, pruning, classic problems with code, and complexity analysis for subsets and permutations.
Understand Bellman-Ford's relaxation loop, how it handles negative edges, detects negative cycles, and why it costs more than Dijkstra.
Learn Dijkstra's shortest path algorithm with a clean Python implementation, complexity analysis, and the priority queue intuition behind it.
Learn the divide-and-conquer pattern through merge sort and quick sort, recurrence relations, the Master theorem, and how to recognize the pattern.
Implement and understand the Fenwick tree, also called the binary indexed tree, for O(log n) prefix sums and point updates in just a few lines.
Build minimum spanning trees with Kruskal's union-find approach and Prim's priority queue approach, with side-by-side Python implementations.
A careful walkthrough of 3Sum using sort plus two pointers. We handle duplicate triplets cleanly and avoid the classic off-by-one traps.
Walk through Climbing Stairs from brute force recursion to bottom-up DP, with edge cases, complexity analysis, and an interview script.
The queue-with-size BFS pattern, why DFS still works, and how this template extends to zigzag and right-side view.
Why a hash map from original to copy is the entire idea, plus the BFS variant for stack-limited environments.
Walk through Coin Change with brute force recursion, memoization, and bottom-up DP. Includes complexity analysis and interview script.
Solve Combination Sum with a clean backtracking template. Pruning, duplicate avoidance, complexity discussion, and interview script.
Solve Container With Most Water with the two-pointer technique. We prove correctness and contrast it with the quadratic brute force.
Detect cycles and produce a valid course order using DFS-based topological sort. Includes BFS Kahn alternative and interview script.
Solve Daily Temperatures with a monotonic decreasing stack of indices. Includes brute force comparison, walkthrough, complexity, and interview tips.
Edit Distance fully unpacked — the three-operation recurrence, the 2D table, and the rolling-array space optimization that makes interviewers nod.
Solve the Group Anagrams problem cleanly with a hash map keyed by sorted strings or character counts. Includes complexity analysis and interview talking points.
Solve Generate Parentheses with counting-based backtracking. Clean invariant, walkthrough, complexity discussion, and interview tips.
Solve House Robber with the pick-or-skip DP recurrence, then optimize to O(1) space. Includes interview script and related variants.
Solve Invert Binary Tree with a four-line recursive swap and an iterative BFS alternative, including complexity and interview talking points.
The inorder traversal trick, the iterative early-exit version, and the follow-up that haunts FAANG interviews.