EST. 2026 — Notes from real server work SYSADMIN · SECURITY · AI · DIRECTADMIN Issue 01
THE SYSADMIN ALMANAC
Home / Tags / Architecture
Architecture

#Architecture

5 articles
Workflow
Always Claim the State Before Sending Anything Out
Linux

Always Claim the State Before Sending Anything Out

A "read the state, then send" guard looks safe until a worker gets killed after sending but before writing to the database, and a retry sends the same thing to the customer twice. This article covers the full set of duplicate prevention measures I use, from atomic claims to retry_after and failed() handlers that must never overwrite a successful state.

#laravel#php#queue#worker
11 min read·6 Oct
One Codebase, Two Roles: Hosted Web, Worker at Home
Linux

One Codebase, Two Roles: Hosted Web, Worker at Home

The whole system used to run on one machine behind a home internet connection. When that machine went down, the team could not use anything. I split it into two roles using the same codebase — the web runs on an always-on host, while heavy work stays on the home machine, which pulls jobs itself, with an atomic job-claim table and an 18-step cutover plan with a rollback path.

#laravel#php#queue#worker
12 min read·6 Oct
Moving Computation from PHP to the Browser: 12 Seconds to 12 ms
Linux

Moving Computation from PHP to the Browser: 12 Seconds to 12 ms

A single page ran tens of thousands of subqueries and took 12 seconds to load. I fixed it by precomputing a summary table, sending a single 107 KB dataset, and moving the formulas to the browser, bringing computation down to 12 milliseconds, with a parity test that requires JS results to match PHP on every row.

#performance#php#javascript#laravel
9 min read·29 Aug
Laravel Queues on Shared Hosting — Don't Share Redis with Cache
Linux

Laravel Queues on Shared Hosting — Don't Share Redis with Cache

If you're enabling queues for Laravel on shared hosting and planning to separate the queue from cache with different REDIS_DB numbers, that won't help. maxmemory and eviction apply to the whole instance, not individual DBs. This article explains why I chose the database driver instead, with complete systemd units to replace Supervisor.

#laravel#redis#queue#systemd
10 min read·17 Aug
Factory to Cloud Behind NAT: Push Snapshots and a Command Queue
Network

Factory to Cloud Behind NAT: Push Snapshots and a Command Queue

The production machine sits in a LAN behind NAT with no public IP, but the owner wants to view data on a cloud website and make edits from a phone that reach the internal machine — possible without opening ports or setting up a VPN, using push snapshots + an edit command queue + idempotent acks

#automation#networking#nat#api
10 min read·9 Aug