Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 7 min read Case study mediumAdept

Automating performance tests

Supabase built its performance-testing pipeline while rewriting its WebSocket-based Realtime service, starting with manual k6 load generators on AWS VMs and adding Grafana/Prometheus to diagnose loader resource exhaustion. When load-test metric volume overwhelmed Prometheus's push endpoint, they added Telegraf as an intermediary buffer that also collects host metrics. Because k6 Cloud would have cost hundreds of thousands per year for their concurrency levels, they wrote a small Go app that runs Terraform and k6 scenarios, tears down infrastructure, tracks launch history and exposes an API for GitHub Actions. With it they have run tests of up to 1M concurrent virtual users for Supavisor and 200K for Realtime, and onboarded other services in hours to days.

Assumes: load testing basicsWebSocketsPrometheus and Grafana

Related posts

  • Continuous Load Testing

    Slack Engineering mediumAdept

    Slack moved to running its Koi Pond load-testing clients continuously, 24/7, against an organization 4x the size of its largest customer. Performance regressions get caught on every deploy without the cost of spinning up test environments. Making this safe required an Automatic Shutdown service that polls Prometheus via Trickster and stops tests when thresholds are breached (e.g. API success below 95% for five minutes), partial shutdown and Emergency Stop controls, DynamoDB-backed persistence so the Keeper survives pod restarts, and automated token generation via cron, job queues, exponential-backoff retries and encrypted S3 storage. A gradual rollout from 5,000 to 500,000 clients with cross-team communication produced zero off-hours pages in six months, and an ad-hoc test that once took a day of effort now takes minutes.

  • Load Testing with Koi Pond

    Slack Engineering mediumAdept

    Koi Pond is Slack's load-testing tool that boots lightweight simulated clients (koi), grouped into schools of up to 5,000, which open real websocket connections and call Web APIs. They run two kinds of work. Behaviors are templated API sequences fired at frequencies taken from real workspace usage. Formations make a percentage of koi act together within a time window to recreate thundering herds such as mass reactions in an announcement channel. Scaling from 5,000 to 1 million koi before a large customer launch, alongside manual QA and API Blast, exposed problems that single-endpoint tools missed: real-time server overload from file-sharing fan-out, a missing rate limit on chat.postMessage, and a monitoring database that needed more shards.

  • Building an End to End load test automation system on top of Kubernetes

    Zalando Engineering mediumAdept

    Zalando's payments team built an automated end-to-end load testing system in its Kubernetes test cluster. A Go service, the load-test-conductor, deploys production versions of services, scales Kubernetes and ECS to production configuration, drives distributed Locust workers, then scales down and cleans up. External dependencies are mocked with Hoverfly, chosen after comparing several tools, and Skipper header-based routing lets shared services switch to mocks for load-test traffic. A feedback algorithm adjusts Locust user count and hatch rate each minute to hit a target orders-per-minute KPI. Tests run on a CronJob or via an API call. Results are still judged manually from Grafana dashboards and SLO alerts, and keeping the test environment production-like took the most effort, including mid-test deployments and mismatched infrastructure.

  • Modular regression testing framework built on AWS for large-scale systems

    AWS Architecture Blog mediumAdept

    A traffic-replay regression testing framework built on AWS captures production requests and responses, replays a sample against new code in pre-production, and gates deployments on a CloudWatch alarm over the fraction of matching outputs (typically 99.9%). Step Functions toggles a Lambda event source mapping on a DynamoDB stream, replayed requests carry simulation IDs so stateful services can skip side effects and seed randomness deterministically, and responses are reduced and normalized before comparison via CloudWatch Logs Insights. Over six months it caught five customer-impacting regressions with zero false positives, using about 5% traffic replay with 200-record batches and reserved concurrency to cap load.

  • Own Your Observability: Supabase Metrics API

    Supabase mediumAdept

    Supabase's Metrics API exposes roughly 200 Postgres health and performance metrics per project in Prometheus exposition format at a privileged endpoint authenticated with service-role Basic Auth, refreshed every minute. It can be scraped by Grafana Cloud, Datadog, AWS Managed Prometheus or any Prometheus-compatible backend, so database telemetry can be correlated with existing application observability. Suggested signals and alerts include connection saturation, CPU/memory above 80%, disk I/O wait, replication lag and post-deploy query regressions, plus using PgBouncer for bursty connection patterns.

The quest for software engineering knowledge.

Look:
Layout: