<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hritik Chaudhary</title>
    <description>The latest articles on DEV Community by Hritik Chaudhary (@hritik_chaudhary_5db0056f).</description>
    <link>https://dev.to/hritik_chaudhary_5db0056f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4213827%2Fdd1ca856-e50e-4b77-b7ed-f9650b09e165.png</url>
      <title>DEV Community: Hritik Chaudhary</title>
      <link>https://dev.to/hritik_chaudhary_5db0056f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hritik_chaudhary_5db0056f"/>
    <language>en</language>
    <item>
      <title>Postgres cutover: four things a green replica does not tell you</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Wed, 02 Dec 2026 18:09:26 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/postgres-cutover-four-things-a-green-replica-does-not-tell-you-2cp</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/postgres-cutover-four-things-a-green-replica-does-not-tell-you-2cp</guid>
      <description>&lt;p&gt;A Postgres cutover can go cleanly on the replica side and still break the application an hour later. The replica caught up, the promote worked, the health check is green. Four things that a green replica does not tell you are worth checking before you call it done.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Sequences do not come along with logical replication
&lt;/h2&gt;

&lt;p&gt;Physical (streaming) replication copies everything, sequences included. Logical replication, which is what most major-version upgrades and low-downtime migrations use, copies row changes only. The sequence on the new primary stays where it was when the subscription was created.&lt;/p&gt;

&lt;p&gt;The result shows up on the first insert after cutover: &lt;code&gt;duplicate key value violates unique constraint&lt;/code&gt;, because &lt;code&gt;nextval()&lt;/code&gt; hands out an id that already exists.&lt;/p&gt;

&lt;p&gt;Check every serial or identity column before you open the writes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;schemaname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sequencename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;last_value&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_sequences&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;last_value&lt;/code&gt; is lower than &lt;code&gt;max(id)&lt;/code&gt;, fix it with a margin, because the old primary may still be handing out values until it is fenced:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nf"&gt;setval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;pg_get_serial_sequence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'orders'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A gap in ids is harmless. A duplicate is an outage.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Fence the old primary, do not just stop sending it traffic
&lt;/h2&gt;

&lt;p&gt;Clients with a stale DNS answer, a connection pool that keeps its server connections, or a cron job with a hardcoded host will keep writing to the old primary after the promote. Those writes are lost, and nobody gets an error.&lt;/p&gt;

&lt;p&gt;What works, in order of strength:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;reject&lt;/code&gt; line in &lt;code&gt;pg_hba.conf&lt;/code&gt; for the app network, then a reload, then terminate the existing sessions: &lt;code&gt;SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'app' AND pid &amp;lt;&amp;gt; pg_backend_pid();&lt;/code&gt;. A new rule only affects new connections, which is why the terminate step is needed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;REVOKE CONNECT ON DATABASE app FROM PUBLIC;&lt;/code&gt; on the old primary also works in the logical replication case, because grants stay on that node. Revoking from the app role alone does nothing while PUBLIC still holds the privilege. With a streaming standby the revoke would replicate to the standby you are about to promote, so use &lt;code&gt;pg_hba.conf&lt;/code&gt; there.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;default_transaction_read_only = on&lt;/code&gt; is a useful seatbelt, but a session can override it with &lt;code&gt;SET&lt;/code&gt;, so it is not a fence on its own.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do the fence before the promote, not after, so there is no window where both nodes accept writes.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Poolers keep talking to the old host
&lt;/h2&gt;

&lt;p&gt;PgBouncer does not drop existing server connections when you change the host in its config and reload. Idle server connections stay open to the old primary until they are closed. After changing the target, run &lt;code&gt;RECONNECT&lt;/code&gt; on the admin console, or &lt;code&gt;PAUSE&lt;/code&gt;, change the config, &lt;code&gt;RELOAD&lt;/code&gt;, &lt;code&gt;RESUME&lt;/code&gt;. Then look at &lt;code&gt;SHOW SERVERS;&lt;/code&gt; and confirm every row points at the new address.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Roles, and what the old primary is still holding
&lt;/h2&gt;

&lt;p&gt;Roles and their passwords are global objects. Logical replication does not carry them, so a role that exists on the old primary may be missing on the new one. Compare with &lt;code&gt;pg_dumpall --globals-only&lt;/code&gt; before the cutover, not during it.&lt;/p&gt;

&lt;p&gt;Afterwards, look at &lt;code&gt;pg_replication_slots&lt;/code&gt; on the old primary. An inactive slot keeps WAL on disk forever, and a forgotten slot from a decommissioned subscriber fills a volume weeks later. Drop the ones you no longer need with &lt;code&gt;pg_drop_replication_slot()&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Sequences: &lt;code&gt;last_value&lt;/code&gt; against &lt;code&gt;max(id)&lt;/code&gt; for every table, then &lt;code&gt;setval&lt;/code&gt; with a margin.&lt;/li&gt;
&lt;li&gt;Fence the old primary (&lt;code&gt;pg_hba.conf&lt;/code&gt; reject or revoke, then terminate sessions) before promoting.&lt;/li&gt;
&lt;li&gt;Pooler: reconnect, then check that every server connection points at the new host.&lt;/li&gt;
&lt;li&gt;Roles compared, extensions installed, privileges checked.&lt;/li&gt;
&lt;li&gt;One real write and one real read through the application path, not through psql.&lt;/li&gt;
&lt;li&gt;Old primary: slots dropped, or the node shut down.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The replica being healthy is the easy part. The other four are where the Friday evening goes.&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>devops</category>
      <category>database</category>
      <category>sre</category>
    </item>
    <item>
      <title>Apply the plan you reviewed: saved Terraform plans in CI</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Thu, 26 Nov 2026 15:05:35 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/apply-the-plan-you-reviewed-saved-terraform-plans-in-ci-2mme</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/apply-the-plan-you-reviewed-saved-terraform-plans-in-ci-2mme</guid>
      <description>&lt;p&gt;Most Terraform pipelines run &lt;code&gt;terraform plan&lt;/code&gt; on the pull request, a human reads it, and then a different job runs &lt;code&gt;terraform apply -auto-approve&lt;/code&gt; after the merge. Those are two separate plans. Anything that changed in between, such as another merge, a manual console edit or a provider update, gets applied without anyone having read it.&lt;/p&gt;

&lt;p&gt;The fix is small: apply the plan file the reviewer actually saw.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform plan -input=false -lock-timeout=60s -out=tfplan
terraform apply -input=false tfplan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;terraform apply tfplan&lt;/code&gt; does not plan again. It applies exactly what is in the file. If the state has changed since the plan was made, Terraform refuses with a "saved plan is stale" error instead of applying something nobody reviewed. That refusal is the feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Showing the plan to a human
&lt;/h2&gt;

&lt;p&gt;A plan file is binary. Render it for the review:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform show -no-color tfplan &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; plan.txt
terraform show -json tfplan &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; plan.json   &lt;span class="c"&gt;# for policy checks&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Post &lt;code&gt;plan.txt&lt;/code&gt; in the pull request, or as the approval screen in your pipeline. Run policy checks against &lt;code&gt;plan.json&lt;/code&gt;, so the same file is read by people and by rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  A pipeline shape that works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Plan job&lt;/strong&gt; on the commit you intend to apply. Save &lt;code&gt;tfplan&lt;/code&gt; as a pipeline artifact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approval gate&lt;/strong&gt; (a protected environment, or a manual approval step).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply job&lt;/strong&gt; downloads that same artifact and runs &lt;code&gt;terraform apply tfplan&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you plan on the pull request branch and apply after the merge, the merged code may differ from what was planned. Plan again on the merge commit and gate that plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that bite
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The plan file can contain secrets.&lt;/strong&gt; Variable values, including sensitive ones, can end up in it in plain text. Store it as a restricted, encrypted artifact and delete it after the apply.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same environment for plan and apply.&lt;/strong&gt; Use the same Terraform version, the same provider lock file (&lt;code&gt;.terraform.lock.hcl&lt;/code&gt;) and the same working directory contents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan files go stale.&lt;/strong&gt; Apply soon after approval. A plan that waits for a week will be rejected, correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never &lt;code&gt;-auto-approve&lt;/code&gt; an unsaved plan in production.&lt;/strong&gt; It re-plans at apply time, which is the exact gap you were trying to close.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;Reviewing a plan only means something if the thing you apply is the thing you reviewed. Save the plan, gate it, and apply the file.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>cicd</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Three questions to answer before you write a line of code</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Mon, 23 Nov 2026 20:25:52 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/three-questions-to-answer-before-you-write-a-line-of-code-2c5l</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/three-questions-to-answer-before-you-write-a-line-of-code-2c5l</guid>
      <description>&lt;p&gt;Most side projects fail at the same place: the build is fine, and nobody wanted it. You can find that out before you build, with three questions and a few hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Who pays?
&lt;/h2&gt;

&lt;p&gt;Not "who would like this". Who has a budget, a job title or a personal credit card, and uses it on problems like this? If your answer is "everyone", you have not picked a person yet. Write down one: "a freelance bookkeeper who handles 20 clients" is a person. "Small businesses" is a category.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What do they pay for today?
&lt;/h2&gt;

&lt;p&gt;If people already pay for something that solves a neighbouring problem, a market exists. Name three products, with prices. If you cannot name any, you are either early or wrong, and the next step is to find out which by talking to people, not by building.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What do they use instead?
&lt;/h2&gt;

&lt;p&gt;Often the answer is a spreadsheet, a WhatsApp group or a manual checklist. That is good news: it shows the problem is real enough that people built their own fix. Your job is to be clearly better than that fix, not better than an imaginary competitor.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick test for the problem statement
&lt;/h2&gt;

&lt;p&gt;Describe the problem in one sentence without naming your product. Show it to a stranger. If they recognise it ("yes, that is annoying"), keep going. If they ask what you mean, rewrite the sentence before you write any code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where a tool can help
&lt;/h2&gt;

&lt;p&gt;We built &lt;a href="https://www.cruxproof.com/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=cruxproof" rel="noopener noreferrer"&gt;Cruxproof&lt;/a&gt; to run this kind of idea check and link the sources it used. It can be wrong, so open the links and judge them yourself. A report is a starting point for the conversations in step 1, not a replacement for them.&lt;/p&gt;

&lt;p&gt;What would you add as a fourth question?&lt;/p&gt;

</description>
      <category>startup</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Your Kubernetes CPU limit may be slowing the app while the node sits idle</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:11:17 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/your-kubernetes-cpu-limit-may-be-slowing-the-app-while-the-node-sits-idle-1dcp</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/your-kubernetes-cpu-limit-may-be-slowing-the-app-while-the-node-sits-idle-1dcp</guid>
      <description>&lt;p&gt;A pod can have p99 latency spikes, failing probes and slow requests while its CPU graph sits well under the limit and the node is mostly idle. The usual cause is CPU throttling, and it is easy to miss because the standard usage graph does not show it.&lt;/p&gt;

&lt;p&gt;Here is what is going on and how to check your own cluster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requests and limits do different jobs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CPU request&lt;/strong&gt;: used by the scheduler to place the pod, and as the container's relative share of CPU when the node is busy. It is a guarantee of weight, not a cap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU limit&lt;/strong&gt;: a hard cap, enforced with the Linux CFS quota. Even if the node has idle cores, the container is paused once it uses up its quota.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Memory is different. Memory cannot be paused, so a container that goes over its memory limit is OOM-killed. CPU is compressible, so the kernel makes the container wait instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the quota actually works
&lt;/h2&gt;

&lt;p&gt;The quota is handed out in short periods, 100 ms by default. A limit of &lt;code&gt;500m&lt;/code&gt; means 50 ms of CPU time per 100 ms period, counted across &lt;strong&gt;all threads&lt;/strong&gt; of the container.&lt;/p&gt;

&lt;p&gt;Take an app with four busy threads and a &lt;code&gt;500m&lt;/code&gt; limit. The four threads can use the whole 50 ms in about 12 ms of wall-clock time. For the remaining 88 ms of that period, every thread is stopped, including the one answering your health check. A request that needed 20 ms of CPU can take over 100 ms.&lt;/p&gt;

&lt;p&gt;The average usage graph looks fine, because average usage over a minute is still below 500m. The damage happens inside each 100 ms window.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to see it
&lt;/h2&gt;

&lt;p&gt;Throttling has its own counters, exposed by cAdvisor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sum by (namespace, pod, container) (
  rate(container_cpu_cfs_throttled_periods_total[5m])
)
/
sum by (namespace, pod, container) (
  rate(container_cpu_cfs_periods_total[5m])
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the fraction of periods in which the container was throttled. A container that is throttled in a large share of its periods deserves a closer look, especially if it serves latency-sensitive traffic. There is no universal threshold, so compare it with the latency of the same service.&lt;/p&gt;

&lt;p&gt;You can also read the raw numbers inside a container, in &lt;code&gt;cpu.stat&lt;/code&gt; under the cgroup filesystem (&lt;code&gt;nr_throttled&lt;/code&gt; and &lt;code&gt;throttled_time&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do about it
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set requests from real usage.&lt;/strong&gt; Use the observed p90 to p95 of CPU as a starting point, so the scheduler and the share weights reflect reality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Be deliberate about limits.&lt;/strong&gt; Many teams keep CPU requests and drop CPU limits for latency-sensitive services, relying on requests for fair sharing. Others keep limits for noisy neighbours, shared clusters or cost controls. Both are defensible. What is hard to defend is a limit copied from a template that nobody has measured.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you keep a limit, leave headroom&lt;/strong&gt; for multi-threaded runtimes, garbage collection and startup bursts. Match thread pools and runtime settings to the CPU you actually have: Go, the JVM and Node worker pools can all see more cores than the quota allows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep memory requests and limits close&lt;/strong&gt;, because memory is not compressible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change one service at a time&lt;/strong&gt; and compare latency and the throttling ratio before and after.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Things that catch people out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Probes failing at peak.&lt;/strong&gt; A throttled container answers health checks slowly. If readiness or liveness probes fail during busy periods, check throttling before you blame the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autoscaling on the wrong signal.&lt;/strong&gt; If HPA scales on CPU utilisation relative to requests, inaccurate requests make scaling too early or too late.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kernel differences.&lt;/strong&gt; Throttling behaviour has changed between kernel versions, but the quota model is the same, so the check above still applies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;A CPU limit is a hard cap that can pause a container while the node has spare cores. Watch the throttling ratio, not just usage, and treat every CPU limit as a decision you can justify with a measurement.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I do remote DevOps and SRE contract work for US and UK teams (Kubernetes, cloud, Terraform, CI/CD, observability). More at &lt;a href="https://hritikch24.github.io/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=sre" rel="noopener noreferrer"&gt;https://hritikch24.github.io/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=sre&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>performance</category>
    </item>
    <item>
      <title>Your liveness probe should not call the database</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Mon, 16 Nov 2026 06:48:15 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/your-liveness-probe-should-not-call-the-database-27ii</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/your-liveness-probe-should-not-call-the-database-27ii</guid>
      <description>&lt;p&gt;A liveness probe is meant to recover one stuck container. Configured badly, it restarts every healthy pod you have at the same moment, and a 30 second blip becomes an outage.&lt;/p&gt;

&lt;p&gt;Here is how that happens, and how to set the three probes so it does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three probes, three jobs
&lt;/h2&gt;

&lt;p&gt;Kubernetes gives a container three probes. They look alike in YAML and do very different things when they fail.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Startup probe&lt;/strong&gt;: has the app finished starting? Until it passes, the other two probes do not run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readiness probe&lt;/strong&gt;: can this pod take traffic right now? If it fails, the pod is removed from the Service endpoints. It is &lt;strong&gt;not&lt;/strong&gt; restarted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liveness probe&lt;/strong&gt;: is this process stuck beyond recovery? If it fails, the kubelet &lt;strong&gt;restarts the container&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The difference between "stop sending traffic" and "kill it" is the whole story.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a blip becomes an outage
&lt;/h2&gt;

&lt;p&gt;A common setup: one &lt;code&gt;/health&lt;/code&gt; endpoint that checks the database, used for both readiness and liveness.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The database has a 30 second failover.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/health&lt;/code&gt; starts failing on every pod, because every pod shares that database.&lt;/li&gt;
&lt;li&gt;Liveness fails everywhere, so every container is restarted at roughly the same time.&lt;/li&gt;
&lt;li&gt;The database comes back. Now all pods are cold-starting together, reconnecting together, and warming caches together.&lt;/li&gt;
&lt;li&gt;The startup load slows the app down, probes time out again, and you get a restart loop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing was wrong with the pods. Restarting them could not fix the database. The probe turned a dependency problem into a self-inflicted one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What each probe should check
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Liveness: only the process itself.&lt;/strong&gt; Can the event loop or a worker thread answer a trivial request? No database, no cache, no downstream API. If a restart would not fix the failure, liveness should not be testing for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Readiness: what this pod needs to serve a request.&lt;/strong&gt; It is reasonable for readiness to notice that the pod has lost something it cannot work without. Be careful with shared dependencies though: if every pod fails readiness at once, the Service has no endpoints and clients get connection errors instead of your app's own error handling. For a shared dependency, serving a clear error is often better than vanishing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Startup: slow boots.&lt;/strong&gt; If the app takes a while to start (migrations, cache warm-up, JIT), use a startup probe with a generous &lt;code&gt;failureThreshold&lt;/code&gt; instead of a long &lt;code&gt;initialDelaySeconds&lt;/code&gt; on liveness. You get a long allowance at boot and a quick liveness check afterwards.&lt;/p&gt;

&lt;h2&gt;
  
  
  A starting point
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;startupProbe&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;httpGet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;path:&lt;/span&gt; &lt;span class="s"&gt;/livez&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;port:&lt;/span&gt; &lt;span class="mi"&gt;8080&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;periodSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
  &lt;span class="na"&gt;failureThreshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;   &lt;span class="c1"&gt;# up to 150s to start
&lt;/span&gt;&lt;span class="na"&gt;livenessProbe&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;httpGet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;path:&lt;/span&gt; &lt;span class="s"&gt;/livez&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;port:&lt;/span&gt; &lt;span class="mi"&gt;8080&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;periodSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
  &lt;span class="na"&gt;timeoutSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="na"&gt;failureThreshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="na"&gt;readinessProbe&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;httpGet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;path:&lt;/span&gt; &lt;span class="s"&gt;/readyz&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;port:&lt;/span&gt; &lt;span class="mi"&gt;8080&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;periodSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
  &lt;span class="na"&gt;timeoutSeconds&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="na"&gt;failureThreshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/livez&lt;/code&gt; returns 200 if the process can respond at all. &lt;code&gt;/readyz&lt;/code&gt; checks what this pod needs before it takes traffic. Treat the numbers as a starting point and tune them against how your app really behaves under load.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that catch people out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Timeouts under load.&lt;/strong&gt; The default &lt;code&gt;timeoutSeconds&lt;/code&gt; is 1. A busy but healthy pod can miss that, fail liveness and be restarted exactly when you need it most.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tight CPU limits.&lt;/strong&gt; A throttled container answers probes slowly. If probes start failing during traffic peaks, look at throttling before you blame the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liveness on a shared thread pool.&lt;/strong&gt; If the probe handler queues behind real requests, saturation looks like a hang. That may be what you want, or it may restart pods that were just busy. Decide on purpose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same endpoint for both probes.&lt;/strong&gt; It is the shortest path to the outage described above.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;Readiness answers "should this pod get traffic?". Liveness answers "would a restart help?". If the honest answer to the second question is no, keep that check out of the liveness probe.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>reliability</category>
    </item>
    <item>
      <title>Split Terraform state by blast radius, not by team</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Sat, 14 Nov 2026 14:19:51 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/split-terraform-state-by-blast-radius-not-by-team-5ei1</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/split-terraform-state-by-blast-radius-not-by-team-5ei1</guid>
      <description>&lt;p&gt;Most teams split Terraform state the way they split org charts: one state per team, or one state per repo. It feels tidy. Then someone runs &lt;code&gt;terraform apply&lt;/code&gt; on a Friday and the plan touches the network, the database and three services at once, because they all live in the same state.&lt;/p&gt;

&lt;p&gt;A better question to ask when you draw the boundaries: &lt;strong&gt;if this apply goes wrong, what is the most it can break?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What goes wrong with one big state
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every &lt;code&gt;plan&lt;/code&gt; has to refresh every resource, so it gets slower as the state grows.&lt;/li&gt;
&lt;li&gt;A state lock held by one person blocks everyone else, even when their changes are unrelated.&lt;/li&gt;
&lt;li&gt;A typo in a small change can still sit next to resources you would never want to touch by accident.&lt;/li&gt;
&lt;li&gt;Reviewers see a long plan and start skimming, which is exactly when mistakes get through.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Split by blast radius
&lt;/h2&gt;

&lt;p&gt;Group resources by how much damage a bad change to them can do, and how often they change:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Foundations&lt;/strong&gt; (accounts, networking, DNS zones, IAM baselines). Change rarely, hurt a lot when wrong. Own state, very careful review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared platform&lt;/strong&gt; (the Kubernetes cluster, shared databases, registries). Change occasionally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-environment application stacks&lt;/strong&gt; (dev, staging, prod each in their own state). Change often, and a mistake in dev must not be able to reach prod.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The test is simple: a bad apply in one state should only be able to hurt one thing, and you should be able to say which thing before you press the button.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing values between states
&lt;/h2&gt;

&lt;p&gt;Splitting does not mean copy-pasting IDs. Two common options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read what you need with a &lt;strong&gt;data source&lt;/strong&gt; (look up the VPC by tag, for example). This keeps the consumer decoupled from how the producer is managed.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;terraform_remote_state&lt;/code&gt; and read the producer's outputs. It works, but it couples the consumer to the producer's state location and output names, so keep the outputs small and treat them as an interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Make the boundaries safe
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use a &lt;strong&gt;remote backend with locking&lt;/strong&gt;, one state per boundary.&lt;/li&gt;
&lt;li&gt;Give each state its own credentials with only the access it needs, so a prod state cannot be applied with dev credentials, and the reverse.&lt;/li&gt;
&lt;li&gt;Pin provider and module versions (&lt;code&gt;required_providers&lt;/code&gt;, module &lt;code&gt;version&lt;/code&gt;), so an upgrade is a change you review rather than a surprise.&lt;/li&gt;
&lt;li&gt;Keep &lt;code&gt;plan&lt;/code&gt; output in the pull request, so the reviewer sees exactly what will change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The trade-off
&lt;/h2&gt;

&lt;p&gt;More states means more places to manage: more backends, more pipelines, more outputs to keep stable. Do not split until a boundary earns it. A good trigger is when two things change at very different speeds, or when you catch yourself being nervous about applying one change because of something unrelated that lives next to it.&lt;/p&gt;

&lt;p&gt;If you take one thing from this: draw state boundaries around failure, not around people.&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>devops</category>
      <category>infrastructure</category>
      <category>sre</category>
    </item>
    <item>
      <title>Before converting a bank CSV: check dates, signs and the target importer</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Thu, 12 Nov 2026 20:25:27 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/before-converting-a-bank-csv-check-dates-signs-and-the-target-importer-1h33</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/before-converting-a-bank-csv-check-dates-signs-and-the-target-importer-1h33</guid>
      <description>&lt;p&gt;A bank CSV can look tidy and still describe the wrong transactions after an import. The useful question is whether the destination receives the same dates and amounts that you intended.&lt;/p&gt;

&lt;p&gt;One starting check can save a conversion step: &lt;strong&gt;QuickBooks Online already supports CSV uploads.&lt;/strong&gt; Intuit documents supported three-column and four-column layouts in its &lt;a href="https://quickbooks.intuit.com/learn-support/en-us/help-article/import-transactions/manually-upload-transactions-quickbooks-online/L0rE9OXBz_US_en_US" rel="noopener noreferrer"&gt;manual upload guide&lt;/a&gt;. Check the current instructions for your country and product first. You may not need another file format.&lt;/p&gt;

&lt;p&gt;If your particular destination needs OFX, QBO or QFX, make a tiny example before moving a full statement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with two transactions whose meaning you know
&lt;/h2&gt;

&lt;p&gt;This is invented data for an &lt;strong&gt;asset-account&lt;/strong&gt; example, not a real bank statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Date,Description,Amount
2026-11-01,Synthetic incoming payment,125.00
2026-11-02,Synthetic outgoing payment,-35.50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this example, there are two transactions and a net movement of &lt;code&gt;89.50&lt;/code&gt;. Those are simple checks you can carry into the preview and destination. A converter producing a downloadable file does not prove the target application interpreted it correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the date convention before exporting
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;03/04&lt;/code&gt; cannot tell you by itself whether the date is March 4 or April 3. Use the convention documented by the source bank and inspect a transaction whose real date you know. Avoid letting a spreadsheet silently decide while you clean the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check signs and column meaning
&lt;/h2&gt;

&lt;p&gt;A balance column is not a transaction amount column. Separate money-in and money-out columns also need an explicit mapping. Inspect one known incoming and one known outgoing transaction in the target preview; do not apply this invented asset-account sign convention blindly to every statement type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the exact import path
&lt;/h2&gt;

&lt;p&gt;File extensions do not make formats interchangeable. The &lt;a href="https://financialdataexchange.org/common/Uploaded%20files/OFX%20files/OFX%20Banking%20Specification%20v2.3.pdf" rel="noopener noreferrer"&gt;OFX 2.3 specification&lt;/a&gt; describes the move from SGML formatting to XML. Use the format and version supported by the destination; renaming a file is not a conversion.&lt;/p&gt;

&lt;p&gt;Before a full import, review a small sample and check how the destination handles an overlapping date range. Two transactions with the same date and amount can be legitimate, so deleting apparent duplicates without checking the statement can create another error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool we build, and the limit of our test
&lt;/h2&gt;

&lt;p&gt;Our &lt;a href="https://www.luventra.co/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=nov13_csv_import" rel="noopener noreferrer"&gt;Luventra converter&lt;/a&gt; converts CSV to OFX/QBO/QFX in the browser. The current guest allowance is two files per day, up to 50 transactions per file.&lt;/p&gt;

&lt;p&gt;In our 10 November synthetic browser check, a two-row OFX download preserved amounts of &lt;code&gt;125.00&lt;/code&gt; and &lt;code&gt;-35.50&lt;/code&gt;. That test did &lt;strong&gt;not&lt;/strong&gt; include an accounting-application import, a payment, or a real customer statement. It supports a narrow claim about that export, rather than universal compatibility.&lt;/p&gt;

&lt;p&gt;Keep the original export, inspect the preview and verify the target import before relying on a converted statement.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Markup isn't margin: how to price a custom apparel order without losing money</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Thu, 12 Nov 2026 06:49:17 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/markup-isnt-margin-how-to-price-a-custom-apparel-order-without-losing-money-3186</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/markup-isnt-margin-how-to-price-a-custom-apparel-order-without-losing-money-3186</guid>
      <description>&lt;p&gt;If you quote custom apparel (hoodies, tees, team kits), there is one mix-up that quietly eats your profit: treating markup and margin as the same number. They are not.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Markup&lt;/strong&gt; is profit divided by your cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Margin&lt;/strong&gt; is profit divided by your selling price.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same job, two different percentages. People say "I add 50%" and think they are making 50%. They are not.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example
&lt;/h2&gt;

&lt;p&gt;Say you are quoting 24 hoodies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blank hoodie: $5.50 each&lt;/li&gt;
&lt;li&gt;Decoration: $2.50 each&lt;/li&gt;
&lt;li&gt;Setup (screens, artwork): $25 for the order&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cost: 24 x ($5.50 + $2.50) + $25 = &lt;strong&gt;$217.00&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you add 50% to cost:&lt;/strong&gt; price = $217 x 1.5 = &lt;strong&gt;$325.50&lt;/strong&gt;. Profit is $108.50. Margin = $108.50 / $325.50 = &lt;strong&gt;33.3%&lt;/strong&gt;, not 50%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you want a 35% margin:&lt;/strong&gt; price = cost / (1 - margin) = $217 / 0.65 = &lt;strong&gt;$333.85&lt;/strong&gt;. That is $13.91 a piece, and the profit is $116.85. As a markup on cost, that is 53.9%.&lt;/p&gt;

&lt;p&gt;So "I want a 35% margin" needs roughly a 54% markup. Quote at cost plus 35% and your real margin is only 25.9%.&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula to keep
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;price&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cost&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;target_margin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;price&lt;/span&gt;
&lt;span class="n"&gt;markup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;price&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;cost&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Where jobs actually go wrong
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting setup.&lt;/strong&gt; On a small order, the fixed setup cost is a big share of the cost. Spread it over the pieces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing from the blank only.&lt;/strong&gt; Decoration and handling belong in cost before you add anything on top.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not counting what you cannot see yet.&lt;/strong&gt; Shipping, payment fees, reprints and your own time are not in the numbers above. Treat the margin as a floor on the job, not as profit in the bank.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A free calculator
&lt;/h2&gt;

&lt;p&gt;I built a small free tool that does this arithmetic from your own costs: you enter the blank, decoration and setup costs and a target margin, and it gives a suggested selling total and per-piece price. It also turns a pasted size list into a breakdown and flags totals that do not add up. No account needed. The figures it shows are planning numbers from what you enter, not market prices, so check them against your own costs.&lt;/p&gt;

&lt;p&gt;It is my own project, so weigh that accordingly: &lt;a href="https://orderclear.vercel.app/?utm_source=devto&amp;amp;utm_campaign=orderclear_nov12" rel="noopener noreferrer"&gt;orderclear.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>business</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>startup</category>
    </item>
    <item>
      <title>Why AI idea validators flatter you, and what we changed in ours</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Tue, 10 Nov 2026 10:52:57 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/why-ai-idea-validators-flatter-you-and-what-we-changed-in-ours-3c8f</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/why-ai-idea-validators-flatter-you-and-what-we-changed-in-ours-3c8f</guid>
      <description>&lt;p&gt;A free idea validator is a lead magnet. Its job is to get you to sign up, so it says yes. A yes from something that can't say no carries no information.&lt;/p&gt;

&lt;p&gt;We build Cruxproof, a research engine that checks a startup idea before you build it. We wanted one that could come back with "don't build this version" and be right about it. Here is what that changed in how it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. It attacks the premise first
&lt;/h2&gt;

&lt;p&gt;Almost every idea rests on one factual claim: "nobody affordable does this", "incumbents only sell to enterprises". The engine treats that claim as the main research target. If it's false, most of the idea falls with it, so the report leads with that instead of burying it.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Competitors alone never mean "don't build"
&lt;/h2&gt;

&lt;p&gt;Most real businesses have competitors. They are the baseline you have to match and then beat, not a verdict. The question is whether there is a documented gap to beat them with. So there are three outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build:&lt;/strong&gt; the premise holds and there is at least one specific, documented weakness a newcomer can use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reshape:&lt;/strong&gt; the idea as stated has a problem, but a narrower or differently priced version looks viable. This is the common honest answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't build:&lt;/strong&gt; kept for fatal problems no reshaping fixes, such as a hard legal or platform blocker, or economics that can't work at any price.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Kind verdicts, never kind facts
&lt;/h2&gt;

&lt;p&gt;When two verdicts are both supported, it may choose the more favourable one, and it has to put the uncertainty in the confidence section instead of rounding down to no. But leniency stops at the verdict. It must not invent a wedge, soften a real blocker, or say "build" when it found no documented weakness.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Prices come from the vendor's own page
&lt;/h2&gt;

&lt;p&gt;Roundup articles publish prices that are wrong by large factors, and many are written by the vendors they rank. When a price decides the analysis, the engine looks for the vendor's pricing page. If it only finds a price secondhand, it says so and names the source.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. It won't make up a search volume
&lt;/h2&gt;

&lt;p&gt;Web search can't measure volume, so the engine never states one unless it found a published figure and can name where. Autocomplete shows a query exists and is common; it is not a volume. Evidence like competitors paying for the obvious ad terms, or whether the problem is discussed unprompted, is reported as exactly what it is: indirect.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Every material number is tagged
&lt;/h2&gt;

&lt;p&gt;Each one is marked as verified at source, secondhand, or untraceable. If research fails, the report says the research failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Roadblocks are checked every time
&lt;/h2&gt;

&lt;p&gt;Payment processors, ad policies, app store rules and licensing kill more products than competitors do, and founders rarely check them first. The engine works through that list even when you didn't ask, and reports only what genuinely applies.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest limit
&lt;/h2&gt;

&lt;p&gt;It can be wrong. It researches live and cites as it goes, but you should check the two or three findings your decision turns on against the linked sources.&lt;/p&gt;




&lt;p&gt;We launched on Product Hunt today. Launch week offer: $10 free credit, enough for two validations, no card, at &lt;a href="https://www.cruxproof.com" rel="noopener noreferrer"&gt;cruxproof.com&lt;/a&gt;. It is our own product, so weigh that accordingly.&lt;/p&gt;

</description>
      <category>startup</category>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>OFX looks like XML. It isn't, and QuickBooks will reject it</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Mon, 09 Nov 2026 11:37:17 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/ofx-looks-like-xml-it-isnt-and-quickbooks-will-reject-it-10ml</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/ofx-looks-like-xml-it-isnt-and-quickbooks-will-reject-it-10ml</guid>
      <description>&lt;p&gt;We built Luventra, a converter that turns a bank's CSV export into OFX, QBO or QFX entirely in the browser. Parsing the CSV was the expected hard part. The surprise was how much of the work was the output format. These are the rules that cost the most time.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Leaf elements have no closing tag
&lt;/h2&gt;

&lt;p&gt;OFX 1.x is SGML, not XML. A leaf element is written open-only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;TRNAMT&amp;gt;&lt;/span&gt;-42.10
&lt;span class="nt"&gt;&amp;lt;FITID&amp;gt;&lt;/span&gt;ABC123
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only aggregates, the elements that contain other elements, get a closing tag. Emit well-formed XML and Quicken and QuickBooks reject the file.&lt;/p&gt;

&lt;p&gt;So the writer makes the mistake impossible instead of relying on anyone to remember. It has &lt;code&gt;open()&lt;/code&gt; and &lt;code&gt;close()&lt;/code&gt; for aggregates and a &lt;code&gt;leaf()&lt;/code&gt; that physically cannot produce a close tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A plain-text header comes first
&lt;/h2&gt;

&lt;p&gt;Before the first &lt;code&gt;&amp;lt;OFX&amp;gt;&lt;/code&gt; there is a &lt;code&gt;KEY:VALUE&lt;/code&gt; block, ended by one blank line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OFXHEADER:100
DATA:OFXSGML
VERSION:&amp;lt;1.x version&amp;gt;
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:&amp;lt;derived, see below&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Line endings are CRLF everywhere, including inside that header and after the final closing tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The body has to be ASCII
&lt;/h2&gt;

&lt;p&gt;The header declares &lt;code&gt;ENCODING:USASCII&lt;/code&gt;, so the body must match. Accented characters are decomposed and stripped of their combining marks (é becomes e), anything still non-ASCII becomes &lt;code&gt;?&lt;/code&gt;, control characters are dropped, and &lt;code&gt;&amp;amp; &amp;lt; &amp;gt;&lt;/code&gt; are entity-escaped. Whitespace is collapsed so a value never spans a line.&lt;/p&gt;

&lt;p&gt;Field length caps from the OFX 1.0.2 spec are enforced too, and if a truncation lands in the middle of an entity, the entity is repaired rather than left half-written.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Same input, same bytes
&lt;/h2&gt;

&lt;p&gt;The output is reproducible. Nothing reads the clock, the locale or &lt;code&gt;Math.random&lt;/code&gt;, so a test can compare the result byte for byte.&lt;/p&gt;

&lt;p&gt;Two decisions follow from that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;TRNUID&lt;/code&gt; is fixed rather than random. Consumers only use it to correlate a request they never sent, so reproducibility beats uniqueness.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;NEWFILEUID&lt;/code&gt; is derived from the content by hashing. The header value is capped at 36 characters, and splicing two transaction ids together would truncate mid-token, which could let two statements that share a first transaction claim the same file id. A hash stays stable per statement and distinct across statements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hash is SHA-1, used purely as a content fingerprint and not for anything security related. We wrote a small synchronous implementation because &lt;code&gt;crypto.subtle.digest&lt;/code&gt; returns a Promise, and that would have forced the whole emitter to be async for what is a pure derivation.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. QBO and QFX need an Intuit extension
&lt;/h2&gt;

&lt;p&gt;For &lt;code&gt;.qbo&lt;/code&gt; and &lt;code&gt;.qfx&lt;/code&gt; the sign-on block needs an &lt;code&gt;INTU.BID&lt;/code&gt; element. QuickBooks refuses a QBO without it, and Quicken uses it to route a QFX to a subscribed institution. Plain OFX does not need it.&lt;/p&gt;




&lt;p&gt;All of this runs in a Web Worker in the browser, so the statement is never uploaded. It is free without an account: two files a day, 50 transactions per file, at &lt;a href="https://www.luventra.co" rel="noopener noreferrer"&gt;luventra.co&lt;/a&gt;. It is our own product, so weigh that accordingly.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>typescript</category>
    </item>
    <item>
      <title>I checked the search volume for my own product category. It was 110 a month, and falling.</title>
      <dc:creator>Hritik Chaudhary</dc:creator>
      <pubDate>Sun, 08 Nov 2026 09:17:34 +0000</pubDate>
      <link>https://dev.to/hritik_chaudhary_5db0056f/i-checked-the-search-volume-for-my-own-product-category-it-was-110-a-month-and-falling-20ko</link>
      <guid>https://dev.to/hritik_chaudhary_5db0056f/i-checked-the-search-volume-for-my-own-product-category-it-was-110-a-month-and-falling-20ko</guid>
      <description>&lt;p&gt;All figures below come from Google Ads Keyword Planner, United States, October 2025 to September 2026, pulled from our own Ads account.&lt;/p&gt;




&lt;p&gt;I built an idea-validation tool. Before writing the launch copy, I did the thing the tool itself does: I checked whether anyone was actually searching for it.&lt;/p&gt;

&lt;p&gt;Here is the entire category, monthly US search volume:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Keyword&lt;/th&gt;
&lt;th&gt;Monthly searches&lt;/th&gt;
&lt;th&gt;Trend&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;validate business&lt;/td&gt;
&lt;td&gt;110&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;business idea validation&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;−47% (3mo), −36% YoY&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;startup idea validation&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;−25%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;test your idea&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;+200%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;how do I know if my [idea]…&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;+600%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;how to know if my [idea]…&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;+600%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;is my business idea good&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;idea validation tool&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;−89% YoY&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The biggest term in my category gets 110 searches a month in the United States. The category as a whole is shrinking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What that actually means
&lt;/h2&gt;

&lt;p&gt;I had, before this, written a plan that involved ranking for "idea validation tool". That term gets ten searches a month and has fallen 89% year on year. Ranking first for it would be worth roughly nothing, and I'd have spent weeks on it.&lt;/p&gt;

&lt;p&gt;Worth saying plainly: since Google's 2012 exact-match-domain update, having the keyword in your domain doesn't lift rankings either. I'd half-assumed otherwise.&lt;/p&gt;

&lt;p&gt;So SEO is not a channel for this product. Not "SEO is hard" — SEO is not a channel. There is no traffic at the end of it. That's a different conclusion and it changes what you do on Monday morning.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that was actually useful
&lt;/h2&gt;

&lt;p&gt;Look at the two terms growing at +600%:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"how do I know if my…"&lt;/li&gt;
&lt;li&gt;"how to know if my…"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And "test your idea" at +200%.&lt;/p&gt;

&lt;p&gt;Every growing term in a shrinking category is a question. Nobody is shopping for an "idea validation tool". People are asking a question, in sentences, and increasingly they're asking it somewhere that answers in prose rather than a list of blue links.&lt;/p&gt;

&lt;p&gt;That doesn't mean "write blog posts and rank for questions" — the volumes are still 40 a month. It means the demand that exists is conversational, and the place to be is wherever those conversations happen: forums, communities, and the answer engines that get cited.&lt;/p&gt;

&lt;h2&gt;
  
  
  The uncomfortable bit
&lt;/h2&gt;

&lt;p&gt;The honest reading of this data is that my category has very little search demand and what exists is declining. That's not a reason not to build — plenty of real businesses exist in categories nobody searches for. It's a reason not to build a &lt;em&gt;search-led acquisition plan&lt;/em&gt;, which is what I was about to do.&lt;/p&gt;

&lt;p&gt;That took twenty minutes in Keyword Planner and saved a month.&lt;/p&gt;

&lt;p&gt;If you're about to start on SEO for something, go and look at the actual numbers for your actual terms first. Not the category you imagine you're in. The words people type.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;We build Cruxproof, which does this kind of check on startup ideas. First validation is free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>startup</category>
      <category>marketing</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
