Cutting Cloud Costs: Moving to Serverless Postgres

Elvin Fortes
Elvin Fortes
Mar 4, 20262 min read
Cutting Cloud Costs: Moving to Serverless Postgres

How word-flux.com Reduced Database Costs

Managing costs is vital for any new project. The team at word-flux.com recently found a way to lower expenses while maintaining high performance.

Moving Away from Amazon RDS

Initially, word-flux.com used Amazon RDS to host its Postgres database. The monthly fees were high for a project in its early stages. The team wanted to minimize spending during the beta phase. Paying for a database that runs 24 hours a day is not efficient. This is especially true while features are still being built and traffic is low.

The Power of Serverless Postgres

The team decided to switch to a serverless Postgres solution. This platform is different from traditional hosting services because it follows a serverless model.

  • It scales to zero when no one is using the app.

  • You only pay for the queries you run.

  • There are no fixed hourly fees for idle time.

Smart Scheduling with Upstash

To make the most of this setup, the team needed a way to handle tasks without keeping the database awake. We chose Upstash to manage our cronjobs. Upstash is not the database itself. Instead, it acts as a reliable scheduling tool.

When a user plans a post for social media, the app does not run a constant check every minute. That would keep the database active and expensive. Instead, the process works like this:

  • The app sends a request to Upstash with the specific time for the post.

  • Upstash waits until that exact moment.

  • Upstash then sends a request back to the app to trigger the post.

The serverless Postgres database only becomes active when it receives this request from Upstash. This approach saves money because it removes the cost of a running server during quiet periods. For a startup in beta, this simple technical shift allows more budget for actual development.

Cutting Cloud Costs: Moving to Serverless Postgres