In early 2026, an Indian B2B SaaS startup reached out to Webeta with a critical bottleneck: their AWS bill had ballooned to $4,200/month despite having under 12,000 active monthly users, and their marketing platform was taking 4.6 seconds to load. Here is the step-by-step engineering teardown of how we rebuilt their architecture, slashed cloud overhead by 68%, and cut page load times to 420 milliseconds.

Key Takeaways

  • The Over-Engineering Trap: The client was running 7 containerized microservices on AWS ECS with dedicated RDS Postgres instances, paying for idle compute 85% of the day.
  • The Decoupled Fix: We separated their public-facing marketing engine from their application dashboard. The marketing platform was moved to pre-rendered React on Netlify edge CDN, while the API was consolidated into Django REST with Neon Serverless Postgres.
  • Database Cost Collapse: Migrating from provisioned AWS RDS db.m5.large to Neon serverless auto-scaling slashed database infrastructure expenses from $1,850/mo to $190/mo with zero connection pool exhaustion.
  • Performance Gains: Google Lighthouse performance jumped from 34 to 98 on mobile, while INP dropped to 28ms.
  • Bottom-Line Impact: Total monthly hosting plummeted from $4,200 to $1,340, saving over $34,000 annually while demo conversions increased by 41%.

The Client Problem: Architecture Debt & Cost Explosion

The client operates a SaaS workflow automation platform for freight forwarders. Two years prior, their initial development agency built what they called an "enterprise microservices architecture."

In reality, it was an operational disaster:

  • A Dockerized Node.js frontend server doing synchronous SSR on every single page request.
  • Separate authentication, billing, tracking, and notification microservices communicating over internal HTTP.
  • A provisioned AWS RDS multi-AZ PostgreSQL instance running 24/7 at 12% average CPU utilization.
  • A marketing website glued directly to the application container, meaning a DDoS on marketing took down active customer workspaces.
Infrastructure LayerLegacy ArchitectureWebeta Re-Engineered Stack
Public Web LayerNode.js SSR on AWS ECS (3x t3.medium)Static Pre-rendered React on Netlify Edge CDN
Backend API4 Node.js microservices with custom authModular Django REST Framework on Render
DatabaseAWS RDS Postgres db.m5.large ($1,850/mo)Neon Serverless Postgres ($190/mo auto-scale)
Mobile PageSpeed34 / 100 (FCP 3.9s)98 / 100 (FCP 0.4s)
Total Monthly Cloud Cost$4,210 / month$1,340 / month (68.1% net reduction)
Key Architectural Takeaway: 90% of early-stage SaaS platforms do not need Kubernetes or 8 microservices. A clean modular monolith in Python/Django paired with a static React frontend running on global edge nodes outperforms distributed architectures in latency, developer velocity, and operating expense.

Phase 1: Decoupling Public Marketing from Application State

The first move was isolating public discovery from private application logic. We extracted the marketing site, pricing calculator, and lead intake forms out of the containerized Docker pipeline and migrated them to a pre-rendered React architecture.

With pre-rendering, every marketing page is baked into static HTML files at build time. When a prospective customer lands on the pricing page, Netlify delivers cached HTML directly from the nearest regional point of presence (Edge CDN) in Mumbai, Singapore, or Frankfurt:

javascript
// prerender.js - Pre-rendering public routes into static HTML assets
import { renderToString } from 'react-dom/server';
import fs from 'node:fs';

export async function preRenderPublicRoutes(routes, templateHtml) {
  for (const route of routes) {
    const appHtml = renderToString(<StaticRouter location={route}><App /></StaticRouter>);
    const finalHtml = templateHtml.replace('<!--app-root-->', appHtml);
    fs.writeFileSync(`./dist${route}/index.html`, finalHtml);
  }
}

This single change eliminated 3 always-on AWS ECS t3.medium instances that were running solely to serve HTML to web crawlers.

Phase 2: Database Modernization with Neon Serverless Postgres

The largest financial drain on their AWS bill was their provisioned RDS PostgreSQL database. Because the previous team feared connection exhaustion during marketing webinars, they had provisioned an expensive `db.m5.large` instance with 500 IOPS and multi-AZ replication.

We migrated the data to Neon Serverless PostgreSQL. Neon's architecture separates storage from compute:

  • During quiet night hours (1 AM to 6 AM IST), compute automatically scales down to 0.25 Compute Units (CU), costing pennies.
  • During peak operational hours, compute scales up elastically to 4 CUs without dropping transactions.
  • Built-in connection pooling handles over 10,000 concurrent client connections via PgBouncer without requiring a separate AWS ElastiCache layer.

Is your cloud hosting eating into your SaaS runway?

Our engineering team specializes in scalable web architectures.

Book Architecture Audit

Phase 3: Restructuring the Django API Monolith

Rather than maintaining 4 separate Node.js repositories with inconsistent TypeScript versions, we consolidated business operations into a single modular Django REST Framework (DRF) service:

  1. Automated Schema & Migrations: Django's built-in migration engine eliminated manual schema drifting issues that plagued their Node services.
  2. Security Hardening: Enforced Turnstile token validation and strict rate-limiting on sensitive endpoints to protect against brute force and API scraping.
  3. Webhooks for External Integrations: Background workers asynchronously push customer lead data into HubSpot and Slack in 180ms.

The Results: 60 Days Post-Deployment

Two months after cutover, the metrics spoke for themselves:

  • Annual Infrastructure Savings: $34,440 freed up directly into their product growth budget.
  • Organic Search Impressions: Rose by 64% within 45 days due to perfect Core Web Vitals (sub-500ms TTFB and 0ms CLS).
  • Demo Booking Completion Rate: Rose from 2.1% to 3.8% because the qualification wizard loaded instantaneously on mobile browsers.

Ready to build your digital ecosystem?

Let's talk strategy. We design and engineer premium platforms for industry leaders.

Start Project Discovery

Ready to build your digital ecosystem?

Let's talk strategy. We design and engineer premium platforms for industry leaders.

Start Project Discovery
Tags:#saas#aws#neon#react#architecture

Previous

The US Founder's Guide to Managing Offshore Web Engineering Teams Without Communication Gaps

Next

E-Commerce Store Teardown: Slashing Mobile Checkout Drop-off from 74% to 31%