<?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: ARITRA SARKAR</title>
    <description>The latest articles on DEV Community by ARITRA SARKAR (@aritrasarkar).</description>
    <link>https://dev.to/aritrasarkar</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%2F1048198%2F8c8a1fb7-63e5-40b2-9f7c-21add3964b8d.png</url>
      <title>DEV Community: ARITRA SARKAR</title>
      <link>https://dev.to/aritrasarkar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aritrasarkar"/>
    <language>en</language>
    <item>
      <title>My "serverless" database was billing me like it never slept.</title>
      <dc:creator>ARITRA SARKAR</dc:creator>
      <pubDate>Tue, 30 Jun 2026 03:35:49 +0000</pubDate>
      <link>https://dev.to/aritrasarkar/my-serverless-database-was-billing-me-like-it-never-slept-ffc</link>
      <guid>https://dev.to/aritrasarkar/my-serverless-database-was-billing-me-like-it-never-slept-ffc</guid>
      <description>&lt;p&gt;My "serverless" database was billing me like it never slept.&lt;/p&gt;

&lt;p&gt;Neon has this great feature called scale-to-zero. Your Postgres compute suspends when it's idle, so you only pay for the queries you actually run. For a pre-revenue product, that should cost a few cents a month.&lt;/p&gt;

&lt;p&gt;Mine ran 24/7. The compute never once scaled to zero.&lt;/p&gt;

&lt;p&gt;The culprit wasn't my app logic. It was my database driver.&lt;/p&gt;

&lt;p&gt;I was using postgres-js, which holds a persistent connection open to the database. From Neon's side, an open connection looks like activity, so it never suspended. It just stayed awake and kept quietly billing me.&lt;/p&gt;

&lt;p&gt;The fix was basically one conceptual change: switch to @neondatabase/serverless, the HTTP driver.&lt;/p&gt;

&lt;p&gt;Instead of a long-lived connection, every query becomes a stateless one-shot HTTP request. The query fires, the connection closes, and the compute is free to suspend.&lt;/p&gt;

&lt;p&gt;Scale-to-zero finally worked.&lt;/p&gt;

&lt;p&gt;The lesson I keep relearning as a solo founder: "serverless" is a property of your whole stack, not a checkbox on one service. One persistent connection upstream and the whole cost model breaks.&lt;/p&gt;

</description>
      <category>neondb</category>
      <category>postgres</category>
      <category>serverless</category>
      <category>infrastructure</category>
    </item>
  </channel>
</rss>
