Notes

Notes

Short technical notes and patterns straight from production.

  1. The Serverless Migration Decision: Cold-Start and Vendor Lock-in

    Before you move to FaaS: the real cost of cold-start latency, vendor lock-in risk, and the workloads where serverless actually pays off

  2. The BFF Pattern: A Separate API Layer for Mobile and Web

    Separate API layers for mobile and web: the hidden cost of bending one API to fit every client, and when a BFF is actually warranted

  3. Synchronous or Asynchronous? The Line Between HTTP and the Queue

    Should a job run inside the HTTP request or go to a queue? The decision line, drawn through response time, fault tolerance, and consistency

  4. Event-Driven Architecture: When It Saves You, When It Adds Complexity

    The price of loose coupling through events: balancing the flexibility it buys against the risk of making your system's flow impossible to trace

  5. Replaying a Dead-Letter Queue Without Making It Worse

    The DLQ filled up during an outage and you want it back. Naive replay re-poisons the queue or double-fires side effects. The safe shape: reset, dry-run, sandbox-first, select.

  6. Validating the Schema at the Edge of the Queue

    A message's data is an untyped contract the queue won't check. Validate it at the edge: producer-side before publish, consumer-side as a safety net, against a per-URN schema

  7. Idempotency: When the Same Message Arrives Twice

    At-least-once delivery means a handler will see the same message twice. The idempotency key, where it comes from, and the dedupe that survives a crash

  8. Namespace Isolation for a Shared Redis

    The pattern I use to avoid key collisions and TTL accidents when a single Redis instance is shared across several projects

  9. PostgreSQL in Production

    A PostgreSQL Backup Strategy with pgBackRest

    pg_dump alone is not a backup. A PITR-capable, compressed, verifiable backup architecture with pgBackRest

  10. Why Do Laravel Queues Slow Down in Production?

    Laravel queue workers are flawless locally and slow in production. The five most common reasons developers overlook

  11. Nginx + PHP-FPM Pool Separation

    The concrete benefits of defining a separate pool per application instead of a single PHP-FPM pool when running multiple PHP apps on one VPS

  12. PostgreSQL in Production

    Multiple DB Users with pgBouncer auth_query

    A practical setup for dynamic user authentication via `auth_query` instead of `userlist.txt` when running pgBouncer