<?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: Mohamed Saif Eldeen</title>
    <description>The latest articles on DEV Community by Mohamed Saif Eldeen (@msaifeldeen).</description>
    <link>https://dev.to/msaifeldeen</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3786131%2F7dcaa422-94c1-4355-8a5d-42653d465ebf.png</url>
      <title>DEV Community: Mohamed Saif Eldeen</title>
      <link>https://dev.to/msaifeldeen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/msaifeldeen"/>
    <language>en</language>
    <item>
      <title>How I Built a Serverless Postgres on EKS (and saved 90% vs RDS)</title>
      <dc:creator>Mohamed Saif Eldeen</dc:creator>
      <pubDate>Mon, 23 Feb 2026 13:51:28 +0000</pubDate>
      <link>https://dev.to/msaifeldeen/how-i-built-a-serverless-postgres-on-eks-and-saved-90-vs-rds-nd2</link>
      <guid>https://dev.to/msaifeldeen/how-i-built-a-serverless-postgres-on-eks-and-saved-90-vs-rds-nd2</guid>
      <description>

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Everyone loves Serverless Postgres (Neon, Supabase, Aurora Serverless). It scales to zero, wakes up instantly, and saves money.&lt;/p&gt;

&lt;p&gt;But under the hood, most are proprietary forks or expensive managed services.&lt;/p&gt;

&lt;p&gt;As a DevOps engineer, I wanted the best of both worlds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Serverless Scaling:&lt;/strong&gt; Pay for what I use.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Standard Postgres:&lt;/strong&gt; No vendor lock-in.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Control:&lt;/strong&gt; Running on my own Kubernetes cluster (EKS).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built &lt;strong&gt;Vura&lt;/strong&gt; (&lt;a href="https://vura.dev" rel="noopener noreferrer"&gt;https://vura.dev&lt;/a&gt;). Here is the architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem with RDS &amp;amp; Aurora
&lt;/h3&gt;

&lt;p&gt;AWS RDS is great, but expensive. Even a small &lt;code&gt;t3.micro&lt;/code&gt; instance costs ~$15/month idle. Multiply that by 10 microservices or side projects, and you're burning $150/month for databases doing nothing.&lt;/p&gt;

&lt;p&gt;Aurora Serverless v2 scales, but the minimum capacity unit (ACU) is still pricey (~$45/mo minimum).&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: Postgres on EKS
&lt;/h3&gt;

&lt;p&gt;Kubernetes is perfect for orchestrating stateful workloads if you know what you're doing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture Overview:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Orchestration:&lt;/strong&gt; Kubernetes (EKS).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Storage:&lt;/strong&gt; EBS gp3 (fast, persistent) or Local NVMe (for high performance tiers).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Operator:&lt;/strong&gt; Custom operator to manage Postgres pods.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Proxy:&lt;/strong&gt; PgBouncer + Custom Proxy for "Wake on Connect".&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How "Scale to Zero" Works
&lt;/h3&gt;

&lt;p&gt;The magic of Serverless is scaling to zero when idle.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Idle Detection:&lt;/strong&gt; A sidecar monitors active connections. If 0 connections for 5 minutes -&amp;gt; Scale Deployment to 0 replicas.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The Proxy:&lt;/strong&gt; We keep a lightweight proxy running (consuming ~5MB RAM). It holds the IP address.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Wake Up:&lt;/strong&gt; When a client connects (e.g., your Lambda function), the proxy intercepts the TCP packet.

&lt;ul&gt;
&lt;li&gt;  It signals K8s to scale the Postgres deployment to 1.&lt;/li&gt;
&lt;li&gt;  It &lt;em&gt;holds&lt;/em&gt; the connection open (pauses the handshake).&lt;/li&gt;
&lt;li&gt;  Once Postgres is ready (2-3 seconds), it proxies the traffic.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; You pay $0 for compute when no one is using your app.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Economics (Why it's cheaper)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Compute:&lt;/strong&gt; Spot Instances on EKS. We bin-pack hundreds of databases onto a few nodes.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Storage:&lt;/strong&gt; You only pay for the EBS volume size (e.g., 5GB = $0.40/mo).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Vura Pricing:&lt;/strong&gt; We charge flat rates ($5/mo) because we can oversubscribe CPU/RAM safely, unlike AWS which reserves capacity.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why not just use Neon/Supabase?
&lt;/h3&gt;

&lt;p&gt;They are great! But Vura offers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Standard Postgres:&lt;/strong&gt; We run the official docker image. Extensions work out of the box.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Region Choice:&lt;/strong&gt; We run on AWS us-east-1 currently, but can deploy to any K8s cluster (Edge, On-prem).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Simplicity:&lt;/strong&gt; No custom drivers needed. Just a connection string.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Try it out
&lt;/h3&gt;

&lt;p&gt;I'm looking for beta testers who want a free database for their side projects.&lt;br&gt;
👉 &lt;a href="https://vura.dev" rel="noopener noreferrer"&gt;https://vura.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you think of this architecture!&lt;/p&gt;

&lt;h1&gt;
  
  
  kubernetes #postgres #aws #startups
&lt;/h1&gt;

</description>
      <category>kubernetes</category>
      <category>postgres</category>
      <category>devops</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
