architecture

  • Ubiquitous language is a naming rule with teeth

    The idea is usually explained as “use the same words as the business”, which sounds like a style preference. The version with consequences is that a word meaning…

  • Compose file version 3, and what swarm changed

    v3 exists to be deployable to a scheduler, and that removes things a single-host file relied on. What went, why it had to, and what replaces it.

  • Retry only what is safe to retry

    A retry policy applied at the HTTP client level retries everything, including the POST that succeeded and whose response was lost. The safety of a retry is a…

  • Designing an API two mobile clients can live with

    Two apps, two release cycles, and neither can be forced to update. What is additive, what is not, and the decisions that have to be made before the…

  • A cache stampede on a single hot key

    A cached value expiring under load means every request that arrives in the next few hundred milliseconds recomputes it simultaneously — so the moment of highest cost is…

  • A queue is not a database and will not keep your history

    A message is delivered, acknowledged and gone. Treating the queue as a record of what happened means the record disappears as it is processed, and there is nothing…

  • Centralised logging that answers a question

    Four servers, eleven log files, and an incident reconstructed from three of them. Shipping first and parsing second, structured events, and the correlation id that makes it useful.

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