queues

  • A topic exchange is a routing decision you can change later

    Publishing directly to a queue name binds the producer to the consumer topology, so adding a second consumer means changing the publisher. A topic exchange puts a routing…

  • An event-driven seam between two services

    The synchronous call between two services was the reason both were down. Publishing an event decouples their availability — and makes eventual consistency a business decision.

  • Queue retry_after and the job that runs twice

    The queue worker’s –timeout and the connection’s retry_after are two different clocks, and getting their order wrong is the most common cause of a job silently running twice.…

  • Laravel 5.5 and the packages that install themselves

    The first release where installing a package is one command. Auto-discovery removes two config edits per package, and hides the fact that they happened.

  • The DEL that blocked the server, and UNLINK

    A 400ms pause on every request, once an hour, caused by a cache cleanup nobody thought of as expensive. Redis is single-threaded, and freeing memory is work.

  • The cron event that schedules itself twice

    wp_schedule_event() does not check whether the hook is already scheduled, so calling it on init — which is where it usually ends up — adds another entry on…

  • Queues, workers and the jobs that fail twice

    The email that arrived four times and the charge that arrived twice. What makes a job safe to run again, and keeping workers alive without them serving stale…

  • Extracting a service without a rewrite

    The reporting code had one caller and a six-hour test run. Finding the seam, dealing with the shared schema honestly, and routing traffic gradually rather than switching.

  • Redis beyond caching: locks, counters and rate limits

    The cache server was already there doing one job out of four. A lock that expires, a release that checks it still owns the lock, and a sliding-window…

  • The dead letter queue is where you look first

    A message that fails repeatedly either blocks the queue behind it or is discarded, and both are worse than setting it aside. A dead letter queue is the…