SRE Cloud Native Ops Reliability Engineering
In-depth guides on SRE and cloud-native operations — Linux administration, monitoring, container orchestration, CI/CD, and automation practices.

38,412 Orders Corrupted by a Correction Script: 5 Defense Layers and 7 Traps in Production Data Repair

Overview It was 0:47 a.m. and a reconciliation alert woke me up on the living room couch. Not the “some box is burning CPU” kind of alert — this was a number out of the payment reconciliation job: 37,904 orders whose status disagreed with their payment records for the day. Two hours later we knew the whole story. At 22:10 someone ran a “status correction” script. The script had passed review....

November 17, 2026 · 34 mins · 7035 words · Xu Baojin

Local Plan Says No Changes, CI Wants to Rebuild 37 Resources: 5 Gates for Pinning Terraform Dependency Versions

Overview On a Thursday afternoon in the second half of last year, I was doing something deeply boring at my desk: renaming a variable in an old module. It used to be name, which is too vague; name_prefix says what it means. Three lines of HCL. I ran terraform plan locally three times and got No changes. Your infrastructure matches the configuration. every single time. I opened the PR, merged it, and the CI plan job failed....

November 13, 2026 · 28 mins · 5817 words · Xu Baojin

Four Egress IPs Caved Under 20K Long-Lived Connections: Diagnosing SNAT Port Exhaustion and 5 Production Decisions for Cloud Egress Governance

Overview At 01:47 the payment channel’s callbacks started failing. Not a full outage — intermittent: seven or eight out of ten succeeded, the remaining two or three timed out on connect. Egress QPS on the application was flat, node CPU, memory and bandwidth were all normal, ss on the hosts showed only a few hundred TIME_WAIT sockets, and ephemeral port usage was sparse. The on-call engineer’s first instinct was that the counterparty’s endpoint was flapping....

November 10, 2026 · 39 mins · 8247 words · ABao

63% of Red Builds Were False Alarms: 6 Engineering Decisions for Detecting, Quarantining, and Governing Flaky Tests in CI

Overview At 2 AM, the main branch of an e-commerce platform went red again. The on-call developer’s reaction was well-practiced: open the pipeline, glance at the failing test case name, skip the logs, and post “just rerun it” in the chat. Ten minutes later: green. Merge continues. This is not an isolated case. Whenever I review CI health for clients, I run into the same phenomenon almost every time: a team’s first reaction to a red build is not “what broke?...

November 6, 2026 · 38 mins · 7915 words · Xu Baojin

Cloud Disk Attach Stuck for 30 Minutes: 6 Engineering Decisions for K8s CSI Storage, from Ghost VolumeAttachments to Self-Healing

Overview It was 2:40 AM when the on-call phone rang. A StatefulSet running the order database was doing a rolling update, and two of its three replicas were stuck in ContainerCreating for twenty minutes straight. kubectl describe pod gave only a vague FailedMount, kubectl get events was spamming FailedAttachVolume, and nobody could say which step it was stuck on. I have run into this failure more than once. And the interesting part is that, every time, the root cause was almost never “the storage broke” — the disk was fine, and the cloud console happily showed the volume as healthy....

November 3, 2026 · 37 mins · 7783 words · Xu Baojin

One Error Log Pinged Me 400 Times: Two-Tier Log Alerting That Tells 'It Happened' Apart From 'It Is Happening'

Overview At 1:12 a.m. on a night in August, my phone started buzzing and would not stop. Checkout was broken on an e-commerce platform. A downstream connection pool behind the payment gateway had been saturated, the checkout service retried in a tight loop, and the logs filled up with PAYMENT_GATEWAY_TIMEOUT. The on-call engineer found the root cause within seven minutes, reset the pool ceiling and the retry count, and traffic was back to normal by 1:59 a....

October 30, 2026 · 42 mins · 8765 words · Xu Baojin

Waiting on Three Approvals to Fight a Fire at 3 AM: 6 Engineering Decisions for Production Break-Glass Access and Audit Trails

Overview At 3:17 AM, my phone rang during a shift at an e-commerce platform. Payment success rate had dropped from 99.7% to 89%, and the order pipeline was starting to back up. The on-call engineer quickly pinned down the root cause: during the previous canary rollout, a single network ACL rule had been deleted by mistake, so payment callback traffic could no longer reach the backend cluster. The fix itself was trivial — add the rule back, or revert that config commit....

October 27, 2026 · 39 mins · 8298 words · Xu Baojin

3 Untracked Resources at 2 AM: 6 Engineering Decisions for Terraform Drift Detection and Remediation

Overview At 2 AM on a Wednesday, my on-call phone buzzed during a shift at a mobility platform. The alert channel lit up with a Prometheus notification — the production ALB (Application Load Balancer) showed abnormal traffic distribution. One backend ECS instance had its weight suddenly set to 0, even though the machine was alive and healthy. Investigation revealed: someone had manually modified the ALB listener rule through the cloud console the previous day, setting one ECS instance’s weight from 50 to 0....

October 23, 2026 · 32 mins · 6706 words · Xu Baojin

40% of a 350K Monthly Bill Was Idle: 6 Production Decisions from Tag Attribution to Cost-as-Code in FinOps

Overview At the end of the month, a CTO stared at a 350K RMB cloud bill and asked: “Where did all this money go?” Nobody could answer. 120 ECS instances, 3 K8s clusters, 50+ SLBs, scattered across two cloud accounts (Alibaba Cloud and Tencent Cloud). Finance only saw the aggregate bill. The engineering team only knew the instances they had created themselves. There was no unified view. Worse, after a full inventory, more than 40% of resources were running at under 30% utilization — idle ECS instances humming along, over-provisioned CPUs wasting cycles, Pods spinning empty during off-peak hours, and SLBs with no backend still billing by the hour....

October 20, 2026 · 24 mins · 4991 words · Xu Baojin

Database Connection Pool Blew Up Mid-Traffic-Shift: 6 Production-Grade Decisions for Blue-Green and Canary Deployment with Traffic Governance

Overview 2 AM. A ride-hailing platform’s payment service does a blue-green switch. The on-call engineer runs kubectl rollout to flip the Service selector, shifting traffic from blue to green. Everything looks fine — Pods are Ready, health checks pass, response latency looks normal. Three minutes later, the DBA chat explodes. Database connections spike from 200 to 1,200, the connection pool is maxed out, and five downstream services all time out. Root cause: the green environment’s app version updated the ORM framework, and the default pool size jumped from 20 to 100....

October 17, 2026 · 23 mins · 4898 words · Xu Baojin