async

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

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

  • async and await are native now

    Every current browser and Node 8 ship async functions, which means the transform is no longer the reason for a build step — although the build step is…

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

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

  • Await several promises without failing on the first

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

  • Read replicas, and the queries that must not use them

    Reads moved to a replica and checkout started showing empty carts. Read-after-write, sticky connections, and measuring the lag rather than assuming it.

  • Redis 4.0 UNLINK frees in the background

    Redis is single-threaded, so DEL on a structure with a million members blocks every other client for as long as freeing it takes — which is milliseconds for…