Skip to content

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

Supabase 8 min read Case study mediumAdept

Exploring Support Tooling at Supabase: A Dive into SLA Buddy

SLA Buddy is Supabase's internal support-ticket SLA enforcer, built almost entirely in Postgres with Edge Functions. Edge Functions scan Slack channels into a slack_watcher table; a PL/pgSQL trigger enqueues four escalation tasks per ticket with due times based on channel and plan. A periodic function guarded by an advisory lock checks for replies and posts Slack escalations, and Google Calendar shifts are pulled via the http extension and Vault secrets. Escalation runs from non-embedded support to the head of success over 10–50 minutes for Enterprise and 1–12 hours for Team, and engineers can snooze it 30 minutes by mentioning the bot.

Assumes: PL/pgSQL functions and triggersPostgres advisory locksSlack bot APIs

Related posts

  • Slack Consolidate: a slackbot built with Python and Supabase

    Supabase mediumAdept

    A Python Slack bot polls watched channels via conversations.history and reposts new messages to consolidated destination channels. Supabase Postgres tables hold the channel routing config and act as a dedup buffer. The slack_watcher table's primary key on (channel_id, ts, ts_ms) makes inserts fail for already-seen messages, so only new ones get forwarded. The guide covers the Slack app manifest and OAuth scopes, the table schemas, env setup, and the full polling loop, which uses a 1.4s delay to stay under Slack Tier 3 rate limits and reloads the channel list hourly.

  • Processing large jobs with Edge Functions, Cron, and Queues

    Supabase mediumAdept

    Large data-processing jobs on Supabase can be split into a three-layer pipeline: cron-triggered Edge Functions collect work, distributor jobs route it into per-source Postgres queue tables, and specialized workers process one item at a time to stay within serverless timeouts. The worked example is an NFL news aggregator that scrapes sites, classifies articles with OpenAI, upserts player and team entities, and stores pgvector embeddings for search. Key practices include letting unique constraints handle deduplication, always marking queue items processed in a finally block to avoid infinite retries, reporting failures to Sentry, queuing user interactions for batched trending updates, and offloading expensive work like embeddings to background tasks.

  • Operate with confidence: check production with your coding agent

    Supabase mediumAdept

    Supabase now ships Agent prompts that let a coding agent (Claude, Codex, Cursor) check a production project on a schedule for error spikes, security findings, slow queries and resource growth, reporting only new or worsening issues with the measured value, threshold and a next step. Setup connects the Supabase MCP server scoped to one project with read_only=true, then schedules a prompt; deduplication requires the agent tool to persist alert state between runs. The launch also adds a query_logs MCP tool for read-only SQL over 24 hours of logs, a debugging-aware supabase agent skill, a Health tab in Advisors for abnormal error rates, and a Database Connections page for finding and cancelling blocked or long-running queries.

  • Faster config, migrations and functions on branches

    Supabase mediumAdept

    Supabase preview branches are separate projects that become ready in about 20 seconds (median) by running three mostly parallel workflows: copying configuration, applying migrations, and deploying Edge Functions. Postgres settings are written to disk without a restart so the single restart triggered by enabling WAL-G backups picks them up. SSL enforcement is ordered before the first backup so a restart can't corrupt it, and gitless branches wait for the last restart before migrating. Migrations are split by a Go reimplementation of psql's lexer, validated against regression tests and fuzzing, and each file runs as one pipelined transaction together with its history row. Edge Functions are skipped when the SHA-256 of their deterministic Brotli bundle and their JWT setting are unchanged.

  • Workflows are coming to Supabase

    Supabase mediumAdept

    Supabase is building Workflows, an open source orchestration engine written in Elixir that uses the Amazon States Language to coordinate existing functions (AWS, GCP, Azure, OpenFaaS, Postgres) in response to database events or HTTP calls. Jobs, queues and logs are stored in Postgres via Oban. Workflows can be persistent, surviving restarts, or transient and in-memory. A worked example shows a state machine that maps over Realtime INSERT events on a users table, waits 86400 seconds, then sends a templated welcome email. The interpreter is already open sourced on Hex, with dashboard integration and a Zapier-like UI planned.

The quest for software engineering knowledge.

Look:
Layout: