<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rufus Kehinde on Medium]]></title>
        <description><![CDATA[Stories by Rufus Kehinde on Medium]]></description>
        <link>https://medium.com/@dtechwizard?source=rss-612ae3cffe2d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Rufus Kehinde on Medium</title>
            <link>https://medium.com/@dtechwizard?source=rss-612ae3cffe2d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 14:41:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dtechwizard/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Incident Response and Blameless Postmortems: Who Is In Charge When It Breaks?]]></title>
            <link>https://dtechwizard.medium.com/incident-response-and-blameless-postmortems-who-is-in-charge-when-it-breaks-49cfa4d6e6ac?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/49cfa4d6e6ac</guid>
            <category><![CDATA[postmortem]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[sre]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 00:03:37 GMT</pubDate>
            <atom:updated>2026-11-26T00:03:37.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZgiNz59xeMfm7zjNIcxUw.jpeg" /></figure><p>Picture a hospital emergency room. When a serious case arrives, nobody shouts, and everybody grabs the patient. One person leads, others hold clear jobs, and everything goes on the chart. Now picture a production outage at 2 a.m.: five engineers in a chat, three changing things at once, nobody updating customers. This post is about making the second scene look like the first.</p><p>What goes wrong without structure</p><p>Google’s SRE chapter on managing incidents walks through an unmanaged incident and names the failure modes: tunnel vision, where the on-call engineer is so absorbed in the fix that nobody thinks about the bigger picture; poor communication, where nobody knows what coworkers are doing; and freelancing, where an engineer makes uncoordinated production changes that make a bad situation far worse <a href="https://sre.google/sre-book/incident-response/">[S1]</a>.<br>These failures are not about skill. They happen to good engineers because under stress everyone does the interesting thing, which is debugging, and nobody does the boring essential thing, which is coordination.</p><p>Four roles, not a big process<br>The same chapter lists four roles. Incident command holds the high-level state and assigns responsibilities. Operations is the group applying changes, and the chapter says it should be the only group modifying the system during an incident. Communications is the public face of the response, sending periodic updates. Planning supports operations with longer-term items, such as filing bugs and tracking system changes so they can be reverted later <a href="https://sre.google/sre-book/incident-response/">[S1]</a>.</p><p>For a small team one person can hold two hats, but I would still name them aloud in the incident channel: “I’m commander, you’re ops.” Naming is what stops two people fixing the same thing in opposite directions.</p><p>Declare early, and keep one living document<br>Google’s advice is that it is better to declare an incident early. It offers simple tests: do you need a second team, is the outage visible to customers, or is the problem still unsolved after an hour of concentrated analysis <a href="https://sre.google/sre-book/incident-response/">[S1]</a>. The commander’s most important job, according to the chapter, is a living incident document that may be messy but must be functional <a href="https://sre.google/sre-book/incident-response/">[S1]</a>. It becomes the raw material for the postmortem and a handoff note if the commander changes.</p><p>On handoffs, the chapter says the post of incident commander must be clearly handed off, with the new commander confirming before the old one leaves <a href="https://sre.google/sre-book/incident-response/">[S1]</a>. Tired people forget this, so write it into the checklist.</p><p>The postmortem is where you actually get better<br>Google’s postmortem chapter states the goals: ensure the incident is documented and that effective preventive actions are put in place to reduce the likelihood or impact of recurrence. A blameless postmortem focuses on contributing causes without indicting any individual or team, and the chapter’s line that you cannot “fix” people but you can fix systems and processes is worth putting on a wall <a href="https://sre.google/sre-book/postmortem-culture/">[S2]</a>.</p><p>It also says to define triggers in advance. Its examples: user-visible downtime or degradation beyond a threshold, data loss of any kind, on-call intervention such as a rollback, a long resolution time, and a monitoring failure, which usually means someone found the problem by hand <a href="https://sre.google/sre-book/postmortem-culture/">[S2]</a>. That last trigger connects to our previous post <a href="https://medium.com/@dtechwizard/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e">here</a> on observability, because the incident that nobody’s alert caught is the most valuable one to study.</p><p>The culture point is the hard one. The chapter says leaders should make writing effective postmortems a rewarded and celebrated practice, and warns that an atmosphere of blame leads to issues being swept under the rug <a href="https://sre.google/sre-book/postmortem-culture/">[S2]</a>. My judgment: if your best engineers stop writing postmortems, count that as an incident in itself.</p><p>Where the rest of the series helps<br>Rollbacks and feature flags from our previous post <a href="https://medium.com/@dtechwizard/why-the-safest-teams-separate-putting-code-on-servers-from-showing-it-to-users-deploying-is-not-30d2df4cf3dc">here</a> on safe deployments are your quickest mitigations. Load shedding from our previous post <a href="https://medium.com/@dtechwizard/rate-limiting-and-load-shedding-protect-the-many-from-the-few-b53484329899">here</a> and the retry rules from our previous post <a href="https://medium.com/@dtechwizard/retries-timeouts-and-circuit-breakers-how-good-intentions-take-systems-down-5abe76d4f4c2">here</a> are what you reach for when an overload is feeding itself. For data loss, a previous post <a href="https://medium.com/@dtechwizard/backups-are-not-disaster-recovery-rpo-rto-and-the-restore-you-have-never-tested-cef42f977a2c">here</a> on backups and disaster recovery is the playbook. None of it helps if people do not know who decides.</p><p>Security section<br>NIST’s SP 800–61 Rev. 3, published in April 2025, aims to help organisations incorporate incident response recommendations into their cybersecurity risk management as described by the Cybersecurity Framework 2.0, and it replaces Rev. 2 <a href="https://csrc.nist.gov/pubs/sp/800/61/r3/final">[S3]</a>.</p><p>My judgment on the practical side: incident documents often hold customer data, credentials, and internal architecture, so restrict who can read them and sanitise them before sharing a postmortem widely. For a suspected security incident, involve your security, legal, and compliance people early, since notification duties depend on your jurisdiction and contracts, and I have not verified any specific rule here.</p><p>The tradeoffs, honestly<br>- Roles and documents feel heavy for a five-minute blip. Scale the ceremony to the size of the problem.<br>- Blameless does not mean consequence-free for ignoring a known risk. That is my judgment: the system gets fixed, and repeated neglect is still a management issue.<br>- Action items that never get done turn postmortems into theatre. Give each one an owner, which is my practice and not a quote from the chapter.<br>- Too many postmortems cause fatigue. Use the triggers to decide.</p><p>A checklist you can use this week<br>1. If production broke now, who is the incident commander?<br>2. Does the team know the four roles, even if one person holds two?<br>3. Is there a rule for when to declare an incident?<br>4. Is there a template for the living incident document?<br>5. Do postmortems have written triggers and owners for action items?</p><p>Sources<br>[S1] Google, Site Reliability Engineering, Chapter 14, Managing Incidents. <a href="https://sre.google/sre-book/incident-response/">https://sre.google/sre-book/incident-response/</a><br>[S2] Google, Site Reliability Engineering, Chapter 15, Postmortem Culture: Learning from Failure. <a href="https://sre.google/sre-book/postmortem-culture/">https://sre.google/sre-book/postmortem-culture/</a> <br>[S3] NIST, SP 800–61 Rev. 3, Incident Response Recommendations and Considerations for Cybersecurity Risk Management. <a href="https://csrc.nist.gov/pubs/sp/800/61/r3/final">https://csrc.nist.gov/pubs/sp/800/61/r3/final</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49cfa4d6e6ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load Testing: Find the Breaking Point Before Your Customers Do]]></title>
            <link>https://dtechwizard.medium.com/load-testing-find-the-breaking-point-before-your-customers-do-93cd9a3b5d6b?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/93cd9a3b5d6b</guid>
            <category><![CDATA[load-testing]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[capacity-planning]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 23:12:50 GMT</pubDate>
            <atom:updated>2026-11-24T23:12:50.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8V1oWRbfTuaZ89OJZVgF0A.jpeg" /></figure><p>Nobody opens a new bridge on the strength of the engineer’s confidence. Heavy trucks cross it first, a little at a time, while instruments watch what bends. If the bridge will fail, you want it to fail with sandbags on it. Software deserves the same respect, yet many launches are planned from a guess such as “we should handle ten thousand users”.</p><p>What a load test is for<br>AWS’s Well-Architected guidance states the desired outcome as knowing which component fails first under load and at what level of demand it fails. It describes a load test as driving representative traffic at a workload until something breaks, which reveals where capacity runs out and which metric warns you first, and says that without this evidence you discover your limits during a real peak <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>.<br>The useful output of a load test is not a number like “12,000 users”. It is a sentence like “the database connection pool saturates first, and p99 latency warns us ninety seconds earlier”. That sentence tells you what to fix and what to alert on, and it ties directly to a previous post <a href="https://medium.com/@dtechwizard/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e">here</a> on observability.</p><p>The vocabulary of tests<br>The k6 documentation names several test types <a href="https://grafana.com/docs/k6/latest/testing-guides/test-types/">[S2]</a>:<br>- Smoke: validate that the script works and the system performs adequately under minimal load.<br>- Average-load: assess performance under expected normal conditions.<br>- Stress: assess performance at the limits, when load exceeds the expected average.<br>- Soak: assess reliability and performance over extended periods.<br>- Spike: validate behaviour and survival under sudden, short, massive increases in activity.<br>- Breakpoint: gradually increase load to identify the capacity limits.</p><p>The same page recommends starting with a smoke test, then progressing to higher loads and longer durations, and advises simple load patterns that avoid “rollercoaster” series of repeated rises and falls <a href="https://grafana.com/docs/k6/latest/testing-guides/test-types/">[S2]</a>. It also warns against thinking in absolutes, since no single test type eliminates all risk <a href="https://grafana.com/docs/k6/latest/testing-guides/test-types/">[S2]</a>. My practice is to run them in that order, and to treat a spike test as the rehearsal for the campaign day your marketing team is already planning.</p><p>Make the result believable<br>AWS lists anti-patterns that I see as the usual reasons a green load test misleads. Testing an environment that does not match production configuration. Testing components in isolation and never the workload as a whole. Using a narrow set of requests instead of a representative mix. Stopping at a small margin above expected load. Testing once at project start and never again as demand grows <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>.</p><p>The same guidance is specific about why. A test against an environment that differs in instance types, configuration, or scale measures a system you do not run, and a shared database or downstream dependency may saturate before the component under test does <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>. It also says to sample the request mix across several time windows, because real traffic shifts through the day <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>. If your staging database is a tenth the size of production, which a previous post <a href="https://medium.com/@dtechwizard/the-cabinet-of-index-cards-that-makes-a-database-fast-and-slow-79434e53666b">here</a> on indexes and a previous post <a href="https://medium.com/@dtechwizard/your-database-will-tell-you-exactly-why-it-is-slow-most-people-never-ask-2b383db8da70">here</a> on query plans showed can change a plan entirely, your results are fiction.</p><p>Keep pushing past the first sign of trouble<br>AWS’s advice is to continue past expected peak until a component fails, then keep increasing load after the first degradation to see whether throughput falls gradually or collapses. It adds a diagnostic I find valuable: throughput that falls toward zero while compute sits idle often indicates a retry feedback loop <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>. That is the retry storm from a previous post <a href="https://medium.com/@dtechwizard/retries-timeouts-and-circuit-breakers-how-good-intentions-take-systems-down-5abe76d4f4c2">here</a> on timeouts and retries, caught in a test instead of an incident. The guidance also says to record which component failed first and which metric signalled the limit ahead of the failure <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>.</p><p>Testing in production<br>AWS describes stressing the live system during a period of low customer usage with the responsible people present, noting that it tests the real environment with no fidelity gap but risks live traffic, so it must be planned and staffed carefully <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>. My judgment: do it only after you have passed the same tests in a production-like environment, with limits from a previous post <a href="https://medium.com/@dtechwizard/rate-limiting-and-load-shedding-protect-the-many-from-the-few-b53484329899">here</a> on rate limiting in place and a kill switch ready.</p><p>Security section<br>Load tests can look exactly like denial-of-service attacks. Only test systems you own or have written permission to test, tell your cloud provider and security team before large tests where their policies require it, and keep real customer data out of test environments by using synthetic or masked data. Also test your own protections: rate limits and autoscaling from a previous post <a href="https://medium.com/@dtechwizard/autoscaling-in-the-cloud-why-just-add-more-servers-is-not-a-plan-2a31290048b4">here</a> should engage before things break, and a load test is the cheapest way to prove it.</p><p>The tradeoffs, honestly<br>- A production-like environment costs real money. Build it with the code from a previous post <a href="https://medium.com/@dtechwizard/infrastructure-as-code-if-it-is-not-in-a-file-it-is-not-real-d3a65c7f0d25">here</a> on infrastructure as code and switch it off after the test.<br>- Realistic test data and traffic mixes take effort to build, and a poor model gives false comfort.<br>- A load test shows the limit today. Code, data, and traffic change, so repeat it. AWS lists never repeating it as an anti-pattern <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">[S1]</a>.<br>- Pushing a system to failure disrupts shared dependencies, so warn the teams that own them.</p><p>A checklist you can use this week<br>1. Can you name the component that fails first, and the metric that warns you?<br>2. Does the test environment match production in configuration and scale?<br>3. Is the request mix based on real traffic?<br>4. Did you keep pushing past expected peak?<br>5. Is the test scheduled to repeat, not a one-off?</p><p>Sources<br>[S1] AWS, Well-Architected Framework, REL07-BP04 Load test your workload. <a href="https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html">https://docs.aws.amazon.com/wellarchitected/latest/framework/rel07-bp04.html</a> <br>[S2] Grafana k6 documentation, Test types. <a href="https://grafana.com/docs/k6/latest/testing-guides/test-types/">https://grafana.com/docs/k6/latest/testing-guides/test-types/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93cd9a3b5d6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backups Are Not Disaster Recovery: RPO, RTO, and the Restore You Have Never Tested]]></title>
            <link>https://dispatch.jsipe.com/backups-are-not-disaster-recovery-rpo-rto-and-the-restore-you-have-never-tested-cef42f977a2c?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/cef42f977a2c</guid>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[disaster-recovery]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 20:39:15 GMT</pubDate>
            <atom:updated>2026-11-23T20:39:15.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxGHgGaqAp-WvzD4osqVmQ.jpeg" /></figure><p>Backups Are Not Disaster Recovery: RPO, RTO and the Restore You Have Never Tested</p><p>Imagine keeping your most important papers in a fireproof safe in another city. Comforting, until your house burns and you find that nobody ever opened the safe, the key is lost and half the pages are blank. A surprising number of teams treat their data that way. This post is about turning “we have backups” into “we can recover”. It is language and framework neutral, with the four database families this series has used.</p><p>Two numbers the business must own<br>AWS defines the recovery time objective (RTO) as the maximum acceptable delay between the interruption of service and restoration of service, and the recovery point objective (RPO) as the maximum acceptable amount of time since the last data recovery point, meaning how much data loss is acceptable. Both are defined by the organisation, and AWS adds that these decisions should not be made in isolation, since the likelihood of disruption and the cost of recovery also matter <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/business-continuity-plan-bcp.html">[S1]</a>.<br>My judgment: write both numbers down per system, in plain words, and get them agreed by someone who owns the business risk. An engineer choosing them alone usually picks what is cheap.</p><p>Replication is not a backup<br>A previous post <a href="https://medium.com/@dtechwizard/read-replicas-make-your-database-faster-to-ask-not-faster-to-be-right-95ef3e1eb117">here</a> on read replicas explained why replicas are valuable. They are not a safety net against your own mistakes. AWS says continuous replication gives near-zero time to back up data but may not protect against data corruption or malicious attacks such as unauthorised deletion as well as point-in-time backups do <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html">[S2]</a>. The bad change replicates faithfully.</p><p>Four strategies, ordered by cost<br>AWS’s disaster recovery options paper lists four <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html">[S2]</a>:<br>- Backup and restore, suitable for mitigating data loss or corruption. You must also redeploy infrastructure, configuration, and application code in the recovery Region, and AWS notes that without infrastructure as code this may be complex and lengthen recovery times.<br>- Pilot light, where data replication and backup resources stay on, and application servers are loaded but switched off until needed.<br>- Warm standby, a scaled-down but fully functional copy of production that is always on and can handle traffic at reduced capacity immediately.<br>- Multi-site active/active, described as the most complex and costly, which can reduce recovery time to near zero for most disasters but may still rely on backups for data corruption, giving a non-zero recovery point.<br>My judgment: my view is that most teams should start with backup and restore done properly, then move up only when the RTO the business wrote down demands it. A previous post <a href="https://medium.com/@dtechwizard/infrastructure-as-code-if-it-is-not-in-a-file-it-is-not-real-d3a65c7f0d25">here</a> on infrastructure as code is what makes the “redeploy everything” part realistic.</p><p>How each database gets you back<br>- PostgreSQL maintains a write-ahead log. Combining a file-system backup with archived WAL supports point-in-time recovery: restoring to any time since the base backup. It needs a continuous sequence of archived WAL files reaching back at least to the backup start, and the docs advise setting up and testing WAL archiving before taking your first base backup. They also note that pg_dump does not produce file-system-level backups and cannot be part of a continuous-archiving solution, and that WAL archiving does not restore changes to configuration files <a href="https://www.postgresql.org/docs/18/continuous-archiving.html">[S3]</a>.<br>- SQL Server documents full, differential, and log backups, with the recovery model deciding backup and restore requirements. Microsoft’s advice is blunt: you do not have a backup strategy until you successfully restore backups in every combination in your restore strategy and test each restored database for physical consistency, running DBCC CHECKDB after a restore <a href="https://learn.microsoft.com/en-nz/sql/relational-databases/backup-restore/back-up-and-restore-of-sql-server-databases">[S4]</a>.<br>- Oracle’s RMAN has RESTORE … VALIDATE, which tests whether RMAN can restore files from a backup, reading the backup without writing output files. Oracle says the absence of an error stack means RMAN confirmed it can use those backups in a real restore <a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/bradv/validating-database-files-backups.html">[S5]</a>.<br>- MongoDB’s manual lists Cloud Manager or Ops Manager (which offer point-in-time recovery, with Cloud Manager requiring MongoDB Enterprise Server), filesystem snapshots, file copies, and mongodump. It says copied data files do not support point-in-time recovery for replica sets, and positions mongodump and mongorestore for small deployments <a href="https://www.mongodb.com/docs/current/core/backups/">[S6]</a>. Treat the details as version-specific and read the page for your release.</p><p>Test the restore on a schedule<br>AWS says your backup strategy must include testing your backups, and suggests scheduled periodic restores <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html">[S2]</a>. Microsoft’s guidance above says the same in different words <a href="https://learn.microsoft.com/en-nz/sql/relational-databases/backup-restore/back-up-and-restore-of-sql-server-databases">[S4]</a>. My practice: a monthly restore into a throwaway environment, with a script that checks row counts and a few business-level facts, such as the latest order existing. Time it. That time is your real RTO, not the one in the document. If you rehearsed a schema change in a previous post <a href="https://medium.com/@dtechwizard/how-to-change-a-live-database-without-taking-your-app-down-5170f191b528">here</a> on live database changes, you already know how valuable a rehearsal is.</p><p>Security section<br>Attackers and accidents go after backups too. AWS notes that cross-account backups help protect from disaster events that include insider threats or account compromise <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html">[S2]</a>. My judgment: keep at least one copy that production credentials cannot modify or delete, encrypt backups, restrict who can restore, and log every restore. A backup that anyone with production access can delete is a backup an attacker will delete first.</p><p>The tradeoffs, honestly<br>- Faster recovery costs more, in money and in complexity.<br>- Frequent backups lower your RPO and add storage and load.<br>- Point-in-time recovery needs every log file in the chain. One missing file can break the chain.<br>- Restoring takes time you must budget for, including the steps outside the database, like DNS and secrets.</p><p>A checklist you can use this week<br>1. Are RPO and RTO written down and agreed per system?<br>2. Do you have point-in-time backups, not only replicas?<br>3. Have you restored last month’s backup somewhere and verified it?<br>4. Is there a backup copy that production credentials cannot delete?<br>5. Can you rebuild the environment, not just the data?</p><p>Sources<br>[S1] AWS, Disaster Recovery of Workloads on AWS, Business Continuity Plan. <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/business-continuity-plan-bcp.html">https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/business-continuity-plan-bcp.html</a> <br>[S2] AWS, Disaster Recovery of Workloads on AWS, Disaster recovery options in the cloud. <a href="https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html">https://docs.aws.amazon.com/whitepapers/latest/disaster-recovery-workloads-on-aws/disaster-recovery-options-in-the-cloud.html</a> <br>[S3] PostgreSQL 18 Documentation, Continuous Archiving and Point-in-Time Recovery. <a href="https://www.postgresql.org/docs/18/continuous-archiving.html">https://www.postgresql.org/docs/18/continuous-archiving.html</a> <br>[S4] Microsoft Learn, Back up and restore of SQL Server databases. <a href="https://learn.microsoft.com/en-nz/sql/relational-databases/backup-restore/back-up-and-restore-of-sql-server-databases">https://learn.microsoft.com/en-nz/sql/relational-databases/backup-restore/back-up-and-restore-of-sql-server-databases</a> <br>[S5] Oracle Database 21 Backup and Recovery documentation, Validating Database Files and Backups. <a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/bradv/validating-database-files-backups.html">https://docs.oracle.com/en/database/oracle/oracle-database/21/bradv/validating-database-files-backups.html</a> <br>[S6] MongoDB Manual (current), Backup Methods for a Self-Managed Deployment. <a href="https://www.mongodb.com/docs/current/core/backups/">https://www.mongodb.com/docs/current/core/backups/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cef42f977a2c" width="1" height="1" alt=""><hr><p><a href="https://dispatch.jsipe.com/backups-are-not-disaster-recovery-rpo-rto-and-the-restore-you-have-never-tested-cef42f977a2c">Backups Are Not Disaster Recovery: RPO, RTO, and the Restore You Have Never Tested</a> was originally published in <a href="https://dispatch.jsipe.com/">Dispatch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rate Limiting and Load Shedding: Protect the Many from the Few]]></title>
            <link>https://dtechwizard.medium.com/rate-limiting-and-load-shedding-protect-the-many-from-the-few-b53484329899?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b53484329899</guid>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[load-shedding]]></category>
            <category><![CDATA[rate-limiting]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 22:24:02 GMT</pubDate>
            <atom:updated>2026-11-22T22:24:02.233Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P6zCSwPYIb9PVK-ZJyeSRw.jpeg" /></figure><p>Picture a popular restaurant on a Saturday night. Leave the doors open to everyone and the dining room fills, the kitchen drowns, and every table waits an hour. A well-run place does two things: it stops any one group from ordering endlessly, and when the kitchen is truly swamped, it pauses the least important work, such as delivery-app orders, so seated guests still eat. Those two moves are rate limiting and load shedding. This post is language and framework-neutral.</p><p>Two different jobs<br>Stripe’s engineering post describes four limiters running in production: <br>- Request rate limiter, <br>- Concurrent requests limiter, <br>- Fleet usage load shedder, and <br>- Worker utilization load shedder <a href="https://stripe.com/blog/rate-limiters">[S1]</a>. <br>The useful distinction is that rate limiters work per user, while load shedders look at overall system state and drop lower-priority traffic so that more critical requests get through <a href="https://stripe.com/blog/rate-limiters">[S1]</a>. They give two motivating cases: one user causes a spike, and you must stay up for everyone else, or one user has a misbehaving script that accidentally sends a lot of requests <a href="https://stripe.com/blog/rate-limiters">[S1]</a>.</p><p>Do the per-user limit first. It is simpler, it is fair, and it handles the most common accident. Add shedding when you have a clear idea of which traffic can be sacrificed.</p><p>The token bucket in one paragraph<br>Stripe uses the token bucket algorithm: each user has a bucket, each request removes a token, and requests are rejected when the bucket is empty <a href="https://stripe.com/blog/rate-limiters">[S1]</a>. Tokens are added back over time, which is how a token bucket works in general. The appeal is that short bursts are allowed while the long-run rate is capped. In practice, that means a mobile app that fires six calls on startup is not punished, but a script that fires sixty a second is.</p><p>Shipping a limiter without causing an outage<br>The same Stripe post has operational advice I would follow. Dark launch each limiter and watch the traffic it would block before enforcing it. Show clear errors, choosing between HTTP 429 and 503 depending on the situation. Fail open, so an error in the limiter such as a Redis outage does not break the API. Put kill switches behind feature flags so a limiter that misfires can be turned off quickly <a href="https://stripe.com/blog/rate-limiters">[S1]</a>. That last one pairs well with the flags from our previous post <a href="https://medium.com/@dtechwizard/why-the-safest-teams-separate-putting-code-on-servers-from-showing-it-to-users-deploying-is-not-30d2df4cf3dc">here</a> on safe deployments.</p><p>Reject early, and make clients behave<br>Google’s SRE chapter on overload makes an easy-to-miss point: a backend should reject requests quickly, because rejection consumes far fewer resources than processing, though this doesn&#39;t hold for trivially cheap operations <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>. It also describes per-customer quotas, so that during global overload the service delivers errors only to the customers who exceed their share <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>.</p><p>On the client side, the book describes client-side throttling: each client tracks its recent requests and accepts, and once requests exceed a multiple of accepts, it starts rejecting some requests locally, with 2 as the preferred multiplier <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>. It also offers criticality classes such as CRITICAL_PLUS, CRITICAL, SHEDDABLE_PLUS and SHEDDABLE, so a shedder knows what to drop first <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>.</p><p>This is where our previous post <a href="https://medium.com/@dtechwizard/retries-timeouts-and-circuit-breakers-how-good-intentions-take-systems-down-5abe76d4f4c2">here</a> on retries matters. Google’s retry guidance is up to three attempts per request, a per-client retry budget that continues only while the retry ratio is below 10 percent, and retrying only at the layer directly above the one that rejected <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>. A limit that clients answer with instant retries just relocates the stampede.</p><p>Where this fits with scaling<br>My previous post <a href="https://medium.com/@dtechwizard/autoscaling-in-the-cloud-why-just-add-more-servers-is-not-a-plan-2a31290048b4">here</a> on autoscaling explained why new capacity takes time to become useful. Limits and shedding are what keep you alive during those minutes. Watch both with the metrics from a previous post <a href="https://medium.com/@dtechwizard/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e">here</a> on observability, especially rejections per client and per endpoint.</p><p>Security section<br>OWASP’s API Security Top 10 lists unrestricted resource consumption as a risk, with impact ranging from denial of service through resource starvation to increased operational costs. Its prevention list includes limiting how often a client can call an API in a time window, stricter limits on sensitive operations such as OTP validation and password recovery, server-side validation of the parameters that control how many records come back, maximum sizes for inputs and payloads, and spending limits or billing alerts for third-party services <a href="https://api-security.owasp.org/editions/2023/en/0xa4-unrestricted-resource-consumption/">[S3]</a>. <br>The login, password-reset, and code-verification endpoints should be the first ones you limit, and limits keyed only by IP address will miss distributed attackers, so combine them with per-account limits.</p><p>The tradeoffs, honestly<br>- Tight limits block honest users, and loose limits protect nothing. Start in dark launch and tune from real traffic.<br>- A limiter is a new dependency. Decide up front whether it fails open or closed.<br>- Shedding needs agreement on what is expendable. That is a business conversation, not only an engineering one.<br>- Per-customer limits that sum to more than capacity are normal, because customers rarely hit their limits together <a href="https://sre.google/sre-book/handling-overload/">[S2]</a>, but you still need headroom.</p><p>A checklist you can use this week<br>1. Does every API key or user have a limit?<br>2. Are login and password-reset endpoints limited per account?<br>3. Do refusals return a clear error and a signal about when to retry?<br>4. Is there a kill switch, and does the limiter fail open?<br>5. Do you know which requests you would drop first?</p><p>Sources<br>[S1] Stripe Engineering, Scaling your API with rate limiters. <a href="https://stripe.com/blog/rate-limiters">https://stripe.com/blog/rate-limiters</a> <br>[S2] Google, Site Reliability Engineering, Chapter 21, Handling Overload. <a href="https://sre.google/sre-book/handling-overload/">https://sre.google/sre-book/handling-overload/</a><br>[S3] OWASP API Security Top 10 2023, API4:2023 Unrestricted Resource Consumption. <a href="https://api-security.owasp.org/editions/2023/en/0xa4-unrestricted-resource-consumption/">https://api-security.owasp.org/editions/2023/en/0xa4-unrestricted-resource-consumption/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b53484329899" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retries, Timeouts and Circuit Breakers: How Good Intentions Take Systems Down]]></title>
            <link>https://dtechwizard.medium.com/retries-timeouts-and-circuit-breakers-how-good-intentions-take-systems-down-5abe76d4f4c2?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5abe76d4f4c2</guid>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[reliability]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Sat, 21 Nov 2026 05:19:45 GMT</pubDate>
            <atom:updated>2026-11-21T05:19:45.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*on05CUfVqKxRlqqyPdsqMA.jpeg" /></figure><p>Think about a busy phone line. One person redialling every few seconds is fine. Ten thousand people redialling at once keeps the line permanently jammed, and nobody gets through. Software does the same thing, and the retry logic added “to be safe” often causes it.</p><p>How a hiccup becomes an outage<br>Google’s SRE book defines a cascading failure as a failure that grows over time as a result of positive feedback, and describes how retries feed it: the retries themselves add to the requests sent to the backend, so 100 QPS of retries in the first second leads to 200 QPS, then 300, and so on <a href="https://sre.google/sre-book/addressing-cascading-failures/">[S1]</a>. Microsoft describes a nastier layered version: if one component calls another with three retries and that one calls the target with three retries, there are nine attempts against the target service, which is why it advises avoiding cascading retry designs <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">[S2]</a>.<br>Before adding a retry anywhere, ask who else, further up the chain, is already retrying.</p><p>Rule one — every call has a timeout<br>Google says it is usually wise to set a deadline, and that no deadline or an extremely high one can cause problems, because the client does not care what the server does after the deadline has passed. It also recommends deadline propagation, so servers pass the remaining time downstream instead of inventing their own <a href="https://sre.google/sre-book/addressing-cascading-failures/">[S1]</a>. A call without a limit holds a thread, a connection, and a user. A previous post <a href="https://medium.com/@dtechwizard/the-hidden-numbers-that-decide-how-many-users-you-can-serve-connection-pools-worker-limits-and-0647f8afe505">here</a> on connection pools showed how quickly a handful of slow calls exhaust a pool.</p><p>Rule two — back off, and add randomness<br>The AWS Architecture Blog says plain capped exponential backoff helps a small amount but does not solve the problem; the solution is to add jitter, which flattens the spikes into an approximately constant rate of calls <a href="https://aws.amazon.com/jp/blogs/architecture/exponential-backoff-and-jitter/">[S3]</a>. Microsoft adds that jitter prevents multiple clients from syncing their retries, and suggests exponential backoff with jitter for background work and immediate or regular-interval retries for interactive work <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">[S2]</a>. If a response carries a Retry-After header, Microsoft says to follow it and wait at least that long <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">[S2]</a>.</p><p>Rule three — give retries a budget<br>Google’s guidance is to limit retries per request and to consider a server-wide retry budget, giving the example of allowing 60 retries per minute in a process and not retrying once that budget is spent. It also says to always use randomized exponential backoff <a href="https://sre.google/sre-book/addressing-cascading-failures/">[S1]</a>. Microsoft repeats the budget idea and says never to build an endless retry mechanism <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">[S2]</a>. My practice: the budget is a number someone chose and wrote down, not a default.</p><p>Rule four — retry only what is safe<br>Microsoft says to retry only transient faults, giving 429 and 5xx responses as typical candidates and noting that most 4xx errors such as 400, 401, 403 and 404 will not be fixed by a retry. It also says to design each step as idempotent, because repeating a non-idempotent step can cause data inconsistencies, such as a repeated queue message that a consumer cannot recognise as a duplicate <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">[S2]</a>. Idempotent means repeating the operation leaves the same result as doing it once. For payments and other money movements, my judgment is that an idempotency key is not optional. See a previous post <a href="https://medium.com/@dtechwizard/do-not-make-the-user-wait-a-practical-guide-to-queues-and-background-jobs-and-why-your-job-will-fcf459494bbf">here</a> on queues and the outbox for the consumer side.</p><p>Rule five — stop calling something that is clearly down<br>Microsoft describes the circuit breaker pattern as temporarily blocking access to a remote service after failures reach a threshold, instead of repeatedly retrying an operation that is likely to fail <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">[S4]</a>. It has three states: closed (requests flow and failures are counted), open (requests fail immediately) and half-open (a limited number of requests are let through to test recovery) <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">[S4]</a>. The article contrasts it with retry: retry expects eventual success, while the breaker prevents an operation that is likely to fail, and the two can be combined so retry logic stops when the breaker says a fault is not transient <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">[S4]</a>.<br>The article also lists when not to use it, including message-driven architectures that route failures to a dead letter queue, and cases where waiting for the breaker to reset adds unacceptable delay <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">[S4]</a>. It advises monitoring both failed and successful requests, so connect it to a previous post <a href="https://medium.com/@dtechwizard/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e">here</a> on observability.</p><p>Security section<br>Unsafe retries can cause real harm: duplicate charges, duplicate orders, duplicate emails. Idempotency keys are the main defence. My judgment on a second risk: automatic retries against login or password-reset endpoints can look like an attack to your own rate limiter, and can lock out genuine users, so test that path. A retry storm is also a self-inflicted denial of service.</p><p>The tradeoffs, honestly<br>- Patient backoff protects the dependency and makes users wait longer. Interactive paths need few, short retries.<br>- A circuit breaker can block calls that would have succeeded. Offer a manual override for slow recoveries, as Microsoft suggests <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">[S4]</a>.<br>- Every protection adds settings that someone must tune and test.<br>- Fallbacks and graceful degradation help, but Google warns they should not trigger very often and should be easy to switch off <a href="https://sre.google/sre-book/addressing-cascading-failures/">[S1]</a>.</p><p>A checklist you can use this week<br>1. Does every outbound call have a timeout, and is the deadline passed downstream?<br>2. Do retries use backoff with jitter?<br>3. Is there a per-request limit and a per-process retry budget?<br>4. Are retried operations idempotent?<br>5. Which dependency has a circuit breaker, and who watches it?</p><p>Sources<br>[S1] Google, Site Reliability Engineering, Chapter 22, Addressing Cascading Failures. <a href="https://sre.google/sre-book/addressing-cascading-failures/">https://sre.google/sre-book/addressing-cascading-failures/</a> <br>[S2] Microsoft Learn, Azure Architecture Center, Transient fault handling best practices. <a href="https://learn.microsoft.com/azure/architecture/best-practices/transient-faults">https://learn.microsoft.com/azure/architecture/best-practices/transient-faults</a> <br>[S3] AWS Architecture Blog, Exponential Backoff and Jitter. <a href="https://aws.amazon.com/jp/blogs/architecture/exponential-backoff-and-jitter/">https://aws.amazon.com/jp/blogs/architecture/exponential-backoff-and-jitter/</a> <br>[S4] Microsoft Learn, Azure Architecture Center, Circuit Breaker pattern. <a href="https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker">https://learn.microsoft.com/azure/architecture/patterns/circuit-breaker</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5abe76d4f4c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Cost Control for Engineers: Spend on Purpose, Not by Accident]]></title>
            <link>https://dtechwizard.medium.com/cloud-cost-control-for-engineers-spend-on-purpose-not-by-accident-b1fc49ea3c45?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1fc49ea3c45</guid>
            <category><![CDATA[finops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud-cost-optimization]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 04:49:24 GMT</pubDate>
            <atom:updated>2026-11-20T04:49:24.487Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine a house on prepaid electricity. Leave every light on in every empty room, and the meter spins until the credit runs out. The answer is not to sit in the dark; it is to know which rooms are lit and why. A cloud bill works the same way. This post is vendor-neutral in spirit, with AWS and FinOps Foundation material as the verified references.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2mNds8g5Hq8Dk5Khtw_xA.jpeg" /></figure><p>Cost is an engineering decision<br>The FinOps Foundation’s public cloud page makes a point I agree with: cost outcomes depend on decisions made across the organisation. Engineering makes the architecture and provisioning choices that drive cost, while Finance handles budgeting, forecasting and financial accountability <a href="https://www.finops.org/framework/technology-categories/public-cloud/">[S1]</a>. If engineers treat the bill as someone else’s problem, the people who can change it never see it.</p><p>Principle one: build the capability, not a one-off clean-up<br>AWS’s Well-Architected cost pillar starts with cloud financial management, and says you need to build capability in it through knowledge, programs, resources and processes, similar to security or operations <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html">[S2]</a>. A single “cost-cutting sprint” gets applause and then the bill creeps back. Give it an owner and a monthly rhythm.</p><p>Principle two: know who owns what<br>The same pillar talks about analysing and attributing expenditure so that costs can be traced to workload owners <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html">[S2]</a>. FinOps treats tagging as ongoing governance, calling for consistent, complete and enforceable tagging standards, and notes that untagged or mistagged resources are a common source of unallocated spend <a href="https://www.finops.org/framework/technology-categories/public-cloud/">[S1]</a>. Practical rule from me: no resource without a team and a purpose tag, enforced in code. That is the benefit of a previous post <a href="https://medium.com/@dtechwizard/infrastructure-as-code-if-it-is-not-in-a-file-it-is-not-real-d3a65c7f0d25">here</a> on infrastructure as code, where tags live in a reviewed file instead of someone’s memory.</p><p>Principle three: pay for what you use<br>AWS’s wording is to pay only for the resources you consume and adjust usage to business needs. Its example: development and test environments are typically used about eight hours a day in the work week, so stopping them when idle could save about 75 percent (40 hours versus 168) <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html">[S2]</a>. Treat that figure as AWS’s illustrative arithmetic, not a promise for your account. My practice is to schedule non-production environments off by default and make staying on the exception.</p><p>Principle four: rightsize, then commit<br>FinOps describes rightsizing as matching provisioned compute, storage and database capacity to actual utilisation, preferably as a continuous workflow instead of a one-off review <a href="https://www.finops.org/framework/technology-categories/public-cloud/">[S1]</a>. Only after that does it make sense to talk about commitment discounts such as reserved instances, savings plans and committed use discounts, and FinOps stresses monitoring utilisation and coverage so commitments can be adjusted as workloads change <a href="https://www.finops.org/framework/technology-categories/public-cloud/">[S1]</a>. Committing before rightsizing locks in waste at a discount. The sequence matters. And the ceiling you chose from our previous post <a href="https://medium.com/@dtechwizard/autoscaling-in-the-cloud-why-just-add-more-servers-is-not-a-plan-2a31290048b4">here</a> on autoscaling is a spending cap as well as a stability cap.</p><p>Principle five: measure efficiency, not just the total<br>AWS suggests measuring the business output of the workload against the cost of delivering it <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html">[S2]</a>. My preference is a unit cost, such as cost per order or per thousand requests. A bill that doubled because sales doubled is success. A bill that doubled while sales stayed flat is a leak. Metrics from a previous post <a href="https://medium.com/@dtechwizard/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e">here</a> on observability make the numerator easy.</p><p>Security section<br>Cost and security meet at leaked credentials and forgotten resources. My judgment, not a quoted statistic: stolen cloud credentials are a way to run up charges, and forgotten resources are an extra attack surface. Use budget alerts, keep keys short-lived (the OpenID Connect idea from our previous post <a href="https://medium.com/@dtechwizard/ci-cd-pipelines-build-the-box-once-and-guard-the-factory-89d4266cc8a1">here</a> on CI/CD pipelines), and review unowned resources regularly.</p><p>The tradeoffs, honestly<br>- Trimming too hard removes the spare capacity that absorbs spikes. Do not cut redundancy that protects reliability.<br>- Commitments lower unit price but reduce flexibility if your workload shifts.<br>- Tagging has a maintenance cost, and tags drift without enforcement.<br>- Cost reviews take engineer time that competes with features. Keep them small and regular.</p><p>A checklist you can use this week<br>1. Can you name the owner of your five most expensive resources?<br>2. Are non-production environments scheduled off outside working hours?<br>3. Have you compared provisioned size with real usage in the last quarter?<br>4. Do you know your cost per order or request?<br>5. Is there a budget alert, and does a person receive it?</p><p>Sources<br>[S1] FinOps Foundation, Framework, Public Cloud. <a href="https://www.finops.org/framework/technology-categories/public-cloud/">https://www.finops.org/framework/technology-categories/public-cloud/</a> <br>[S2] AWS, Well-Architected Framework, Cost Optimization Pillar, Design principles. <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html">https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/design-principles.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1fc49ea3c45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CDN Caching Done Right: Fast for Everyone, Safe for Everyone]]></title>
            <link>https://dtechwizard.medium.com/cdn-caching-done-right-fast-for-everyone-safe-for-everyone-71c5c45bca31?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/71c5c45bca31</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[cdn]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 11:37:31 GMT</pubDate>
            <atom:updated>2026-11-19T11:37:31.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJwgSTbBmOxkwaTssykKOQ.jpeg" /></figure><p>Picture a bakery that bakes everything in one city. Every customer has to travel to that single shop, and at breakfast time it is mobbed. Now suppose the baker stocks small corner shops across the country with the bread people ask for most. A content delivery network, or CDN, is exactly that for your app: copies of your files close to your users, with the origin server visited only when a copy is missing or stale. This post is language and framework-neutral.</p><p>Start with who is allowed to keep a copy<br>MDN’s Cache-Control reference separates private caches, such as a browser, from shared caches, such as a CDN or proxy, which store one response and reuse it for many users <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>. That single idea decides most of the design. The private directive means only a private cache may store the response, and public allows a shared cache to store it <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>.<br>Treat “who may keep this?” as the first question for every response. Public marketing pages and fingerprinted assets are shared-cache material. Anything shaped by a login or a cookie is not, until proven otherwise.</p><p>Four directives worth knowing<br>- max-age keeps a response fresh for some seconds after it was generated on the origin <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>.<br>- s-maxage sets freshness for shared caches only, is ignored by private caches, and overrides max-age for shared caches <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>. This lets a CDN keep something longer than a browser, or the reverse.<br>- stale-while-revalidate lets a cache reuse a stale response while it revalidates in the background <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>. Users get an instant answer while the copy refreshes.<br>- immutable tells a cache the response will not change while it is fresh, avoiding needless conditional requests <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>.</p><p>A common beginner trap: no-cache does not mean “do not cache”. MDN says it allows storing but requires revalidation before reuse, and that no-store is the directive for “do not store” <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>.</p><p>The naming trick that removes most headaches<br>My practice: put a fingerprint, such as a content hash, into the file name of scripts, styles, and images. When the file changes, its name changes, so the old name can be cached for a very long time as immutable and nobody ever sees a stale copy. HTML pages that point to those files stay short-lived. This is where a previous post <a href="https://medium.com/@dtechwizard/the-fastest-request-is-the-one-that-never-happens-a-practical-guide-to-caching-from-one-user-to-c4ed048167bf">here</a> on caching meets another <a href="https://medium.com/@dtechwizard/the-heaviest-part-of-your-app-is-probably-its-images-6-ways-to-cut-their-weight-without-losing-b853e3e5e99f">here</a> on images and another <a href="https://medium.com/@dtechwizard/why-users-leave-before-your-app-loads-the-4-delays-behind-every-slow-page-from-1-user-to-1-573aa9d9b05f">here</a> on the first three seconds.</p><p>Security section: two ways a CDN hurts you<br>First, personal data leaks. MDN says that forgetting private on personalised content can let a shared cache store it and reuse it for multiple users, leaking personal information, and that private should be added especially for responses after login and for cookie-managed sessions <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>. It also notes that requests with an Authorization header must not be stored in a shared cache by default, but that public forces them to be stored <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">[S1]</a>, so be careful where you write that word.</p><p>Second, cache poisoning. PortSwigger describes it as exploiting the behaviour of a web server and its cache: the attacker gets a harmful response from the back end and ensures it is cached and served to victims. The cache decides two requests are equivalent using a cache key, and parts of a request left out of the key are “unkeyed”, which attackers can use to inject payloads <a href="https://portswigger.net/web-security/web-cache-poisoning">[S2]</a>. Their prevention list includes restricting caching to purely static responses, disabling request headers the site does not need, and avoiding accepting “fat” GET requests <a href="https://portswigger.net/web-security/web-cache-poisoning">[S2]</a>. They note that the definitive prevention is disabling caching altogether <a href="https://portswigger.net/web-security/web-cache-poisoning">[S2]</a>; my judgment is that this is rarely practical, so the narrower rules matter more.</p><p>Tradeoffs, honestly<br>- Long freshness is fast, but stale content is real. Plan how you will clear bad copies.<br>- Serving stale while revalidating trades perfect freshness for speed, which suits news feeds and catalogues and does not suit prices or stock counts.<br>- Every extra variation of a response, such as by language or device, divides your cache and lowers the hit rate.<br>- A CDN is another system to monitor. Tie it into [Day 32] on observability: watch the cache hit rate and origin load.</p><p>A checklist you can use this week<br>1. Does every response say who may cache it?<br>2. Are personalised and logged-in responses marked private or not stored?<br>3. Do static files carry fingerprints and long lifetimes?<br>4. Do you know which request parts are in your cache key?<br>5. Can you purge a bad copy quickly?</p><p>Sources<br>[S1] MDN Web Docs, Cache-Control header. <a href="https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control">https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Cache-Control</a> <br>[S2] PortSwigger Web Security Academy, Web cache poisoning. <a href="https://portswigger.net/web-security/web-cache-poisoning">https://portswigger.net/web-security/web-cache-poisoning</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71c5c45bca31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Observability: How to Find Out Why Your App Is Slow Before the Customer Tells You.]]></title>
            <link>https://dtechwizard.medium.com/observability-how-to-find-out-why-your-app-is-slow-before-the-customer-tells-you-23e1ec8ca30e?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/23e1ec8ca30e</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 12:32:54 GMT</pubDate>
            <atom:updated>2026-11-17T12:32:54.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQYzDCK_Zb0O0PnBLdq5BQ.jpeg" /></figure><p>A customer says the app is slow. Someone looks at the server, and it seems fine. Someone else searches logs on three machines. Two hours later, the team is arguing about theories.</p><p>The analogy I use: a parcel you ordered online. A good courier doesn&#39;t say, “it’s somewhere.” You can see each stop, and when it is late, you can see where it stalled. Observability gives your software that tracking page.</p><p>What observability means<br>OpenTelemetry’s primer says observability lets you understand a system from the outside, by letting you ask questions about it without knowing its inner workings. It defines telemetry as data emitted from a system and its behaviour <a href="https://opentelemetry.io/docs/concepts/observability-primer">[S1]</a>. The primer describes three signals <a href="https://opentelemetry.io/docs/concepts/observability-primer">[S1]</a>:<br>- Metrics are aggregations over a period of time of numeric data about your infrastructure or application.<br>- A log is a timestamped message emitted by services or other components.<br>- A span represents a single unit of work, and distributed tracing lets you observe requests as they propagate through complex distributed systems.</p><p>In everyday terms: metrics tell you something is wrong, logs tell you what a component said, and traces tell you where in the journey the time went.</p><p>Start with four numbers<br>Google’s SRE book names four golden signals: latency, traffic, errors, and saturation. Latency is the time to service a request, and it advises tracking failed requests separately because a slow error is even worse than a fast error. Traffic is demand on the system, errors are the rate of failed requests, and saturation is how full the service is <a href="https://sre.google/sre-book/monitoring-distributed-systems/">[S2]</a>.<br>If you have time for only one dashboard, build these four per service. The book also warns that averages hide slow outliers and recommends distributions, noting that the 99th percentile of one backend can become the median response of your frontend when a request depends on several services <a href="https://sre.google/sre-book/monitoring-distributed-systems/">[S2]</a>. That is why a previous post <a href="https://medium.com/@dtechwizard/why-guessing-is-the-most-expensive-habit-in-software-and-the-numbers-that-replace-it-dab2d7744972">here</a> on measuring first starts with percentiles.</p><p>Alerts are a product for tired humans<br>This is where I see the most waste. The SRE book says every page should be actionable and should require intelligence, and that if a page merely merits a robotic response, it should not be a page <a href="https://sre.google/sre-book/monitoring-distributed-systems/">[S2]</a>. It separates two questions, what is broken and why, and advises that paging should focus on symptoms while cause-oriented signals mostly help debugging <a href="https://sre.google/sre-book/monitoring-distributed-systems/">[S2]</a>. It also warns that complex dependency hierarchies in alerting have had limited success, and that rules which catch real incidents should be as simple, predictable and reliable as possible <a href="https://sre.google/sre-book/monitoring-distributed-systems/">[S2]</a>.</p><p>My practice, stated as judgment: page on user-visible symptoms such as error rate and slow responses, and send everything else to a dashboard or a ticket. Review noisy alerts after every incident and delete or fix them.<br>A canary release from a previous <a href="https://medium.com/@dtechwizard/why-the-safest-teams-separate-putting-code-on-servers-from-showing-it-to-users-deploying-is-not-30d2df4cf3dc">here</a> on safe deployments is only safe if you can compare error rate and latency between the old and new versions. Autoscaling from a previous <a href="https://medium.com/@dtechwizard/autoscaling-in-the-cloud-why-just-add-more-servers-is-not-a-plan-2a31290048b4">here</a> depends on a metric that really tracks load. Without telemetry, both become hopeful guesses.</p><p>Security section<br>Telemetry can leak. Logs often capture tokens, passwords and personal data by accident. Decide up front what must never be logged, mask it where it is produced, restrict who can read logs and traces, and set retention so old data does not sit around forever. Apply your own legal and regulatory data rules.</p><p>The tradeoffs, honestly<br>- More data means more storage cost and more noise.<br>- Tracing every request can be expensive, so many teams sample.<br>- A dashboard nobody opens is decoration.<br>- Instrumentation takes effort up front and saves hours in an incident.</p><p>A checklist you can use this week<br>- Do you have the four golden signals for each service?<br>- Can you follow one request across services?<br>- Does every page require a human to think?<br>- Is sensitive data kept out of logs?<br>- Can someone new find the slow step in minutes?</p><p>Sources<br>[S1] OpenTelemetry, Observability primer. <a href="https://opentelemetry.io/docs/concepts/observability-primer">https://opentelemetry.io/docs/concepts/observability-primer</a><br>[S2] Google, Site Reliability Engineering, Chapter 6, Monitoring Distributed Systems. <a href="https://sre.google/sre-book/monitoring-distributed-systems/">https://sre.google/sre-book/monitoring-distributed-systems/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23e1ec8ca30e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CI/CD Pipelines: Build the Box Once, and Guard the Factory]]></title>
            <link>https://dtechwizard.medium.com/ci-cd-pipelines-build-the-box-once-and-guard-the-factory-89d4266cc8a1?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/89d4266cc8a1</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 11:05:20 GMT</pubDate>
            <atom:updated>2026-11-17T11:05:20.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31hfwyr1JgNVtaq1PETzKQ.jpeg" /></figure><p>Imagine a factory that ships sealed boxes. A sensible factory does not let each worker build a box their own way and does not open a tested box to repack it before delivery. Every box goes down the same line, past the same stations. CI/CD is that software line, and most of the damage I see described in the industry comes from boxes that skipped it.</p><p>What the two letters mean<br>Google Cloud’s DevOps pages, built on the DORA research, list continuous integration, continuous delivery, deployment automation, and trunk-based development as separate capabilities. They describe continuous delivery as making deployment a reliable, low-risk process that can be performed on demand at any time <a href="https://docs.cloud.google.com/architecture/devops">[S1]</a>. That sentence is the goal. Everything else is a means.</p><p>Build once, promote the same artifact<br>The thing that passes your tests should be the exact thing that reaches production. If staging gets one build and production gets a fresh rebuild, you have tested a cousin of what you ship. A small, scanned, non-root image from a previous post <a href="https://medium.com/@dtechwizard/docker-images-in-production-ship-the-product-not-the-workshop-f93c7da1f2b3">here</a> is a good example of an artifact worth promoting unchanged. Configuration differs per environment; the package should not.</p><p>Small changes, fast feedback<br>Small changes are easier to review and easier to undo. This is what makes the techniques in a previous post <a href="https://medium.com/@dtechwizard/why-the-safest-teams-separate-putting-code-on-servers-from-showing-it-to-users-deploying-is-not-30d2df4cf3dc">here</a> on safe deployments workable: a canary release of a tiny change is a small risk, and a canary release of a month of work is a gamble. Keep the fastest checks first. A pipeline nobody waits for gets used; a pipeline that takes an hour gets bypassed.</p><p>The pipeline as a code file<br>Pipeline definitions belong in version control and get reviewed like any code. This is the same principle as a previous post <a href="https://medium.com/@dtechwizard/infrastructure-as-code-if-it-is-not-in-a-file-it-is-not-real-d3a65c7f0d25">here</a> on infrastructure as code: if the process is not in a file, it lives in someone’s memory.</p><p>Security section: the pipeline holds the keys<br>A pipeline can usually deploy to production, which makes it a high-value target. GitHub’s documentation on secure use of Actions gives concrete rules, and the ideas apply to any CI system:<br>- Pin third-party actions to a full-length commit SHA. GitHub says this is currently the only way to use an action as an immutable release, and that it reduces the risk of a backdoor because an attacker would need a SHA-1 collision. Check that the SHA comes from the action’s own repository, not a fork [S2].<br>- Give the job token the least privilege it needs, with read-only repository access as a sensible default, and raise permissions per job only when required <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">[S2]</a>.<br>- Prefer OpenID Connect for cloud deployments so workflows authenticate directly, and you stop storing long-lived credentials as secrets <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">[S2]</a>.<br>- Treat untrusted input as hostile. An expression such as a pull request title inserted into an inline script can inject commands. GitHub’s preferred fix is to assign it to an intermediate environment variable and use that <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">[S2]</a>.<br>- Protect production secrets with environments and required reviewers, so a job cannot read them until a reviewer approves <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">[S2]</a>. GitHub notes these controls do not isolate workflows on self-hosted runners <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">[S2]</a>.<br>Pin and automate the update, as with base images in a previous <a href="https://medium.com/@dtechwizard/docker-images-in-production-ship-the-product-not-the-workshop-f93c7da1f2b3">here</a>. Pinning with no update process just freezes vulnerabilities in place.</p><p>Provenance: proving where a build came from<br>SLSA is a framework of levels that aim to give increasing supply chain security guarantees. In the v1.0 Build track, level 1 only requires that provenance exists describing how the artifact was built, level 2 requires a hosted build platform with signed provenance, and level 3 adds hardened builds so runs cannot influence each other <a href="https://slsa.dev/spec/v1.0/levels">[S3]</a>. Note that the page I read for these level details is marked retired, with 1.2 the current version, so check the current requirements before quoting levels in your own work <a href="https://slsa.dev/spec/v1.0/levels">[S3]</a>.</p><p>The tradeoffs, honestly<br>- More checks make pipelines safer and slower ones. Order them by speed.<br>- Strict approvals protect production and slow emergencies. Design the emergency path before you need it.<br>- Flaky tests teach people to ignore red builds. Fix or delete them.<br>- A green build proves your tests passed, not that the software is right.</p><p>A checklist you can use this week<br>- Is the artifact built once and promoted unchanged?<br>- Is the pipeline the only route to production?<br>- Are third-party steps pinned and token permissions minimal?<br>- Are long-lived cloud keys replaced with short-lived credentials?<br>- Can you say, for any release, exactly what went out and from which commit?</p><p>Sources<br>[S1] Google Cloud, DevOps capabilities (DORA research). <a href="https://docs.cloud.google.com/architecture/devops">https://docs.cloud.google.com/architecture/devops</a> <br>[S2] GitHub Docs, Secure use reference for GitHub Actions (Enterprise Server 3.15 edition). <a href="https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use">https://docs.github.com/en/enterprise-server@3.15/actions/reference/security/secure-use</a> <br>[S3] SLSA, Security levels, specification v1.0 (page marked retired; v1.2 is current). <a href="https://slsa.dev/spec/v1.0/levels">https://slsa.dev/spec/v1.0/levels</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89d4266cc8a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Autoscaling in the Cloud: Why “Just Add More Servers” Is Not a Plan]]></title>
            <link>https://dtechwizard.medium.com/autoscaling-in-the-cloud-why-just-add-more-servers-is-not-a-plan-2a31290048b4?source=rss-612ae3cffe2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a31290048b4</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[autoscaling]]></category>
            <dc:creator><![CDATA[Rufus Kehinde]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 16:43:17 GMT</pubDate>
            <atom:updated>2026-11-14T16:43:17.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QFcmmpkS4kirDVBarzEEOQ.jpeg" /></figure><p>Think of a supermarket on pay day. One till is open and the queue wraps round the shelves. The manager opens three more tills and the same crowd moves. That is autoscaling: add capacity when demand rises, remove it when demand falls.<br>The idea is easy. Making it work is where the judgment comes in. This post is language and framework-neutral and uses cloud and Kubernetes examples because the vendors document the behaviour clearly.</p><p>Scaling out, not up<br>Microsoft’s architecture guidance separates two moves. Vertical scaling changes the size of one machine and often requires brief downtime, so it is less common to automate. Horizontal scaling adds or removes instances, and existing instances keep serving while new ones start, though continuity depends on how the application is designed <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>. In supermarket terms, you open more tills; you do not build a bigger till.</p><p>The thermostat idea<br>AWS describes target tracking as similar to a thermostat: you pick a target value for a metric, and the service adds or removes capacity to stay near it <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">[S2]</a>. My judgment: pick a metric that reflects how busy a server is, not one that merely correlates with traffic. AWS says the metric must move proportionally with the number of instances, and names load balancer request count and latency as examples that may not behave that way <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">[S2]</a>.</p><p>The cashier needs time to get ready<br>New servers are not useful the moment they exist. AWS offers instance warmup so that a new instance does not count toward the group’s metrics until its resource use settles, because startup spikes can mislead the scaling logic <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">[S3]</a>. It suggests 300 seconds as a starting point and tuning from there <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">[S3]</a>.</p><p>Microsoft adds a blunt point: a demand spike may pass before new instances are ready, so measure your real startup time and test the combined delay before choosing thresholds <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>. If your startup is slower than your spike, autoscaling alone will not save you. Keep spare capacity, schedule capacity ahead of known busy periods, or throttle incoming work <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>.</p><p>Startup time is the first number I would measure. A smaller, simpler image is generally quicker to pull and start, which is why a previous post <a href="https://medium.com/@dtechwizard/docker-images-in-production-ship-the-product-not-the-workshop-f93c7da1f2b3">here</a> on container images belongs in this conversation. That is a reasoned expectation, not a figure I am quoting.</p><p>Ceilings and floors<br>Kubernetes’ Horizontal Pod Autoscaler has a required maxReplicas, the upper limit, and a minReplicas, the lower limit <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/">[S4]</a>. Azure says to set a minimum for baseline demand and a maximum to bound resource use, and warns that a configured maximum does not prove that your application or its dependencies can support that load <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>.</p><p>That last point connects to the database posts. Adding servers multiplies connections, a story told in a previous post <a href="https://medium.com/@dtechwizard/the-hidden-numbers-that-decide-how-many-users-you-can-serve-connection-pools-worker-limits-and-0647f8afe505">here</a> on connection pools, and it does nothing for a database that is already the limit, which is the territory of a previous post <a href="https://medium.com/@dtechwizard/read-replicas-make-your-database-faster-to-ask-not-faster-to-be-right-95ef3e1eb117">here</a> on read replicas and <a href="https://medium.com/@dtechwizard/sharding-takes-an-afternoon-to-start-and-years-to-undo-31fc21e495c9">here</a> on sharding.</p><p>Scale down slowly<br>Scaling in is where teams get hurt. Microsoft describes flapping, where scale-in and scale-out keep reversing. In its example, removing one instance would push the remaining load over the scale-out threshold, so the service skips scaling in, and it advises leaving an adequate margin between the two thresholds <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>.</p><p>The defaults reflect the same caution. Kubernetes’ scale-down uses a 300-second stabilization window by default, while scale-up has none <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/">[S4]</a>. AWS target tracking scales in more gradually when traffic is falling, prioritising availability <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">[S2]</a>. My judgment: keep those defaults until you have data showing a better setting. They are conservative for a reason.</p><p>Predictable traffic deserves a schedule<br>Microsoft recommends scheduled autoscaling for predictable changes in demand and metric-based rules for the unpredictable ones, and says the two can be combined <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>. Pay day, Monday morning and a planned campaign are not surprises, so do not let the system discover them the hard way.</p><p>Design the app so any server can do the job<br>Autoscaling quietly assumes any instance can serve any request. Microsoft advises avoiding dependencies on a specific instance, designing services to be stateless where possible, and making processing idempotent so that retries or duplicate delivery do not repeat side effects <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a>. For queue-based work, see a previous post <a href="https://medium.com/@dtechwizard/do-not-make-the-user-wait-a-practical-guide-to-queues-and-background-jobs-and-why-your-job-will-fcf459494bbf">here</a> on queues and the outbox.</p><p>Security section<br>Autoscaling is an availability tool, not a defence. A flood of junk requests can trigger scale-out and raise your bill. Set a sensible maximum, apply rate limits in front of the app, and alert on unusual scaling activity so a person looks at it.</p><p>The tradeoffs, honestly<br>- A variable bill replaces a predictable one.<br>- More moving parts mean more settings to get wrong.<br>- Spikes faster than startup time can still hurt.<br>- Scaling the app tier can push the problem to the database.</p><p>A checklist you can use this week<br>1. Do you know your real startup time, from launch to useful?<br>2. Is there a maximum, and is it safe for your database?<br>3. Is there a margin between scale-out and scale-in thresholds?<br>4. Do you have scheduled capacity for known busy periods?<br>5. Can any server handle any request?</p><p>Sources<br><a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">[S1]</a> Microsoft Learn, Azure Architecture Center, Autoscaling best practices. <a href="https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling">https://learn.microsoft.com/azure/architecture/best-practices/auto-scaling</a> <br>[S2] AWS, Target tracking scaling policies for Amazon EC2 Auto Scaling. <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html</a> <br>[S3] AWS, Set the default instance warmup for an Auto Scaling group. <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html</a> <br>[S4] Kubernetes, HorizontalPodAutoscaler v2 API reference (v1.31). <a href="https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/">https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a31290048b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>