Building OpenStatus: A Deep Dive into Our Infrastructure Architecture | openstatus

Building OpenStatus: A Deep Dive into Our Infrastructure Architecture

Dec 29, 2024 | by Thibault Le Ouay Ducasse | [engineering]

Infrastructure Overview

OpenStatus is a synthetic monitoring platform designed with resilience, scalability, and efficiency in mind. Our users rely on us to provide real-time insights into their service health, making it essential to maintain a robust and performant infrastructure.

In this post, we'll take a deep dive into our infrastructure architecture, exploring the key components, managed services, and design principles that power OpenStatus.

Application Landscape

Our platform consists of several interconnected applications, each designed for a specific purpose:

  1. Frontend Ecosystem:

    • A NextJS application that powers our marketing site, user dashboard, and status page hosted on Vercel.
    • An Astro + Starlight-powered documentation application hosted on Cloudflare Pages.

We chose Vercel for the Next.js application because it performs exceptionally well there, the DX is great. And we selected Cloudflare Pages for the documentation since it is a static site and it's super cheap.

  1. Backend Infrastructure All our backend services are hosted on Fly.io.

We chose Fly.io for our backend services because it's a great platform for deploying globally distributed services. It's also very easy to deploy and manage. We are planning to add more providers (e.g. Koyeb) to our probes to have a more resilient system.

Managed Services

We also rely heavily on managed services to avoid handling it ourselves. Here are the services we use:

Scheduling

Recognizing the critical nature of monitoring, we've heavily rely on CRON to ensure timely checks:

Queue Architecture

Due to the critical nature of checks, we are using a queue to handle task processing and retry logic:

Every check is pushed to a queue and processed by our probes. If the probe fails to process the check, it is retried 3 times before being marked as failed.

We've implemented a granular queue system to ensure efficient task processing, each queue is dedicated to a specific check frequency (e.g. every minute, every 10 minutes).

Data Infrastructure

We also don't want to handle the data infrastructure by ourselves. We rely on managed services for that:

Design Philosophy

Our infrastructure design is driven by several key principles:

How much does it cost us?

Our current monthly cost is around $328. This includes:

Conclusion

Building a resilient synthetic monitoring platform is hard. It's not just a $5 VPS that you can deploy and forget. It requires a more complex infrastructure to be able to provide a reliable service.

The drawback of this approach is the complexity of providing an easy self hostable services. Which is annoying because we are an open-source project and we want to provide a self-hostable version of OpenStatus. But we are working on community edition that will be easier to deploy.

Want to start monitoring your services with OpenStatus? Sign up for free and get started today!