Tips tagged with "Advanced"

Browse all tips tagged with Advanced.
shape
shape
shape
shape
shape
shape
shape
shape

DevOps Hard

Consistent Hashing: Distributing Load Without a Full Reshuffle

How consistent hashing distributes keys across nodes so adding or removing a node only reshuffles a small fraction of the keyspace, with a virtual-node implementation in PHP and Python.

PHP 8.4 Python 3.12
Diagram Try the challenge
3 min read · 144 Read tip
PHP Medium

LRU Cache: Design an O(1) Cache with a Doubly Linked List and Hash Map

How to design an LRU cache that supports get and put in O(1) time using a hash map paired with a doubly linked list, with a working PHP implementation and a hands-on coding challenge.

PHP 8.4
Diagram Try the challenge
4 min read · 122 Read tip
Laravel Medium

Idempotency Keys: Preventing Duplicate Payments in Distributed Systems

Why idempotency keys matter in payment APIs, how to implement them safely with a database-backed store, and common pitfalls like race conditions and key collisions.

PHP 8.4
Diagram
4 min read · 215 Read tip
Database Hard

Database Deadlocks: Detection, Diagnosis, and Prevention

How relational databases detect deadlocks with wait-for graphs, why they happen, and concrete techniques to prevent them in high-concurrency systems.

Postgresql 13+
Diagram
5 min read · 235 Read tip
DevOps Medium

Docker Multi-Stage Builds for Smaller Images

Reduce your Docker image size dramatically using multi-stage builds.

Docker 20.10+
Diagram
2 min read · 2,253 Read tip
Laravel Medium

Laravel Query Optimization with Eager Loading

Learn how to optimize database queries in Laravel by using eager loading to prevent N+1 query problems.

Laravel 11.x PHP 8.2+
Diagram
2 min read · 1,731 Read tip