Oct 21, 2021

How Instatus reduced their infrastructure costs by 86% thanks to GraphCDN’s GraphQL edge caching

Learn about how we helped Instatus improve their cache hit rate (and lower their costs). Or just go ahead and give GraphCDN a try. Or do both!

Instatus allows its customers to create status pages for their products and services. Not only are these pages beautiful and customizable, but they load incredibly fast. Buckle up, because we’re about to explore Instatus’ architecture to understand how GraphCDN's GraphQL edge cache helped reduce their infrastructure costs by a whopping 86%.

Technical architecture

The entire product is based on a unified GraphQL API, queried from two main clients: the management dashboard and the status pages. Ali Salah, the founder of Instatus, uses Node.js and TypeScript, his language of choice, for the backend, and the data is stored in an AWS Aurora Postgres instance and queried with Prisma.

To ensure the status pages load as quickly as possible and avoid traffic spikes, they leverage Next.js' Incremental Static Regeneration (ISR). Rather than dynamically rendering the status pages for every visitor, Instatus builds static HTML files… at a leisurely three second rate. This results in an up-to-date, almost-instant response, providing a fantastic overall user experience.

GraphQL Edge Caching is the Solution

As snappy as this sounds, these frequent rebuilds in fact cause a significant strain on the API and database. Instatus initially countered this by significantly upgrading their infrastructure across the stack, however, this ballooned costs skyhigh. Ouch.

There had to be a better way.  

Salah says, “GraphQL caching seemed like the obvious solution to save those unnecessary costs by reducing load on the API and database.” Instatus knew that purely Time-To-Live-based caching wouldn't suffice, as updates made to status pages (i.e., "Service B is currently experiencing downtime") must be reflected immediately.

With its instant global invalidation, GraphCDN's GraphQL edge cache was the perfect solution.

Cha-Ching! Savings From Provider Costs

Almost immediately after implementing GraphCDN's GraphQL edge cache, Instatus’ overall cache hit rate across all GraphQL queries was 90%+. That, in turn, reduced their hosting provider costs and allowed them to use fewer database instances to serve the same audience.

Those two changes, enabled by GraphCDN's worldwide GraphQL edge cache, reduced Instatus' overall infrastructure costs by an incredible 86%. Now that’s a result that would make just about anyone reach for the sky.