monitoring

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

  • Show the systemd units that failed to start

  • systemctl status shows the last log lines for free

    Under Upstart, finding out why a service failed to start meant knowing which log file it wrote to. systemctl status prints the exit code and the last ten…

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

  • A deployment pipeline that runs the tests first

    Deploying by rsync on a Friday afternoon, and what replaced it: lint, test, build, stage, promote — with a rollback that is the same mechanism rather than a…

  • Ship the logs before you need them

    The instinct is to set up log aggregation when there is a problem to investigate. By then the interesting logs have rotated away, and the incident is reconstructed…

  • Container logs go to stdout, and that is the contract

    A containerised application writing to /var/log/app.log has written to a filesystem that disappears with the container, and nothing outside can see it. The convention is that a container…

  • Docker for Mac replaced the virtual machine

    The shared-folder problem that nearly killed this last year is gone. What changes in the compose file, what the new file sharing costs, and where Linux and Mac…