architecture

  • Publisher confirms, or the message was never sent

    basic_publish returns as soon as the message is written to the socket. The broker may not have accepted it, may not have routed it anywhere, and may have…

  • A timeout is not a concurrency limit

    Setting a five-second timeout on a slow dependency feels like protection and is not: with twelve PHP-FPM workers and a dependency taking five seconds, twelve concurrent requests occupy…

  • 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…

  • A circuit breaker has three states and people implement two

    Closed and open are obvious: pass through, or fail fast. The third state is what makes it a breaker rather than a switch — half-open lets exactly one…

  • A saga is a workflow with compensation, not a transaction

    A distributed transaction is not available, so the pattern is: do each step, and if a later one fails, run compensating actions to undo the earlier ones. Compensation…

  • 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.

  • Alert on symptoms, dashboard the causes

    Alerting on every cause — disk, memory, queue depth, replica lag, a failed cron — produces an alert per cause and a channel nobody reads. Alerting on what…

  • A service that owns no data is a function

    A service extracted for organisational reasons but reading and writing another service’s tables has all the costs of a network hop and none of the independence. It cannot…

  • A must-use plugin loads before everything and cannot be disabled

    Code that must run regardless of what an administrator does in the plugins screen — a security header, a filter that fixes a broken upstream URL, an environment…

  • An event with a full payload is a distributed join waiting to happen

    A thin event carrying only an id forces every consumer to call back for the details, which is a synchronous dependency the event was meant to remove. A…