Skip to content
View abd-ulbasit's full-sized avatar

Block or report abd-ulbasit

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
abd-ulbasit/README.md

Abdul Basit Sajid

Backend and infrastructure engineer, working remotely with a UK team since 2023. I work on capacity, latency and the deployment path: what a system costs to run, why it is slow, and how it ships without going down. Go, Python, Kubernetes, Postgres.

Four times the number was not what it looked like.

A copy-on-write system copied 5 GiB

Branching a 5 GiB Postgres database in pgoverlay took 61.9 s and left a writable layer the size of the entire dataset. On a system whose whole premise is that branches share one base and store only their own changes, that is not slowness. That is the copy-on-write not happening.

The branch's own log said redo done ... elapsed: 0.00 s, so the minute went somewhere before WAL replay. Before recovery, Postgres fsyncs every file in the data directory, and it opens each one O_RDWR, because not every platform allows fsync() on a read-only descriptor. It writes nothing. But OverlayFS copies a file up on the open, not on the write, so the durability pass copied the whole dataset before a single query ran. After the fix: 1.89 s and 33.1 MiB.

p50 of five runs on a Colima VM (4 vCPU, kernel 6.8, overlay2 on ext4) hosted on an M1 Pro, June 2026. The benchmarks doc still publishes the pre-fix table, and says why the two sets of numbers are not comparable.

The hazard was documented one layer below where it bit me

In goqueue, Log.ReadFrom took a read lock and then called an exported method that took the same lock again. Go's RWMutex is not reentrant, and a pending writer blocks new readers, so the second acquisition deadlocks against a writer that is itself waiting on the first.

I had written the warning myself, one layer down:

// Note: We need to unlock before calling ReadFrom (it locks again)

Knowing a hazard and finding every instance of it are separate jobs. There was a second one in the quota manager.

A metric that reads as broken and is correct

sluice exports sluice_pool_hits_total, and on the L4 path it is always zero. Making it move means not forwarding the client's FIN to the backend. I tried that. A client that half-closed received an empty response, and because the abandoned socket went back into the pool still owing a reply, the next client could be served the previous client's response body.

Both were reproduced, the change was reverted, and the README explains the zero instead. An idle counter is cheaper than a protocol-visible correctness bug.

Eight milliseconds on the GPU, 2,400 Python calls around it

A real-time inference service took 2.8 s per request while GPU utilisation sat between 0 and 13% under normal load, reaching 83% only at 150 concurrent users. Inference itself was 8 ms per model, and around each of those 8 ms were roughly 2,400 Python function calls. A bigger GPU makes the 8 ms smaller and does nothing at all to the rest, which is why buying hardware had not helped: the ceiling was a single Python process, not the accelerator. Fixing the fan-out is what made four GPUs usable in the first place. Proved to 500 concurrent under load test, on four L40Ses.


Some of this is still wrong. I do not know which part yet.

basit.engineer · pgoverlay · goqueue · steward · sluice · forgepoint · Kubernetes guide

Pinned Loading

  1. steward steward Public

    Kubernetes operator (kubebuilder v4). A 20-line Application CRD provisions Postgres, Redis and RabbitMQ, injects credentials into the workload, and reports configuration drift by comparing spec gen…

    Go

  2. forgepoint forgepoint Public

    ML-lifecycle platform: 11 Go microservices on Kubernetes over gRPC and NATS JetStream, each implementing one distributed-systems pattern to production depth — saga compensation, CQRS, event sourcin…

    Go

  3. sluice sluice Public

    L4/L7 proxy and API gateway in Go. Weighted round-robin and least-connections balancing, token-bucket rate limiting, and a three-state circuit breaker with active health checks. No dependencies in …

    Go 1

  4. goqueue goqueue Public

    Distributed message queue combining Kafka's durability + SQS's simplicity + features neither has

    Go 2

  5. bookstore-kubernetes-guide bookstore-kubernetes-guide Public

    A standalone, hands-on Kubernetes guide that takes you from zero to production by progressively building, deploying, scaling, securing, observing, and operating one realistic microservices applicat…

    HCL