---
title: "Keep the monolith, but split the workloads"
description: "A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services."
url: "https://swe.quest/articles/keep-the-monolith-but-split-the-workloads-a46b5ee6a5f1e352"
canonical: "https://incident.io/blog/monolith"
source: "incident.io"
published: "2023-04-12"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["resilience","system-design","postgres","go","microservices"]
---

# Keep the monolith, but split the workloads

A post on [incident.io](https://swe.quest/sources/incident-io.md), published 2023-04-12, 9 min read, Case study. Original: [https://incident.io/blog/monolith](https://incident.io/blog/monolith)

## Summary

A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services. After a bad Pub/Sub message caused an unhandled panic that crashed the web, worker and cron threads together for 32 minutes, incident.io split them into independent Heroku dyno tiers selected by command-line flags. They also gave each class of work its own capped Postgres connection pool and statement timeout, so low-priority jobs such as BigQuery event export or best-effort nudges fall behind rather than exhausting the shared database. The main migration hazard is code that assumes a shared process, such as process-local caches, and the fix is to move that coordination into Postgres or Redis.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [Microservices](https://swe.quest/tags/microservices.md) (Backend & APIs)

## Prerequisites

- connection pooling
- message queues ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- monolith vs microservices tradeoffs ([easy posts on Microservices](https://swe.quest/tags/microservices.md?difficulty=easy))

## Keywords

Heroku, GCP Pub/Sub, Postgres, kingpin, incident.io

## Related posts

- [Parallel Run Pattern - A Migration Technique in Microservices Architecture](https://swe.quest/articles/parallel-run-pattern-a-migration-technique-in-microservices-architecture-762d770d757278f2.md): Zalando Engineering · 2021-11-03 · Medium · 9 min read · Refactoring & migrations, Microservices, Deployment, Testing, Observability
  Zalando's Returns team extracted returns logic from a legacy monolith into a new microservice using the Parallel Run pattern.
- [Production Postgres on Railway: From First Deploy to High Availability](https://swe.quest/articles/production-postgres-on-railway-from-first-deploy-to-high-availability-70a3bcba84354fc9.md): Railway · 2026-10-15 · Medium · 13 min read · PostgreSQL, Replication, Resilience, Cloud platforms
  Railway Postgres can grow from a single private-networked database to a production setup with volume backups, point-in-time recovery, PgBouncer connection pooling and Patroni-based high availability, demonstrated with an orders API that uses idempotency keys so retries stay safe.
- [Intermittent downtime from repeated crashes](https://swe.quest/articles/intermittent-downtime-from-repeated-crashes-9e00050b528fb037.md): incident.io · 2022-11-30 · Medium · 11 min read · Incidents & postmortems, Go, Resilience, Queues & messaging
  A poison-pill Pub/Sub message crashed incident.io's Go monolith on Heroku repeatedly, causing 13 minutes of downtime over 32 minutes.
- [Scaling PostgreSQL to power 800 million ChatGPT users](https://swe.quest/articles/scaling-postgresql-to-power-800-million-chatgpt-users-dfa96876f4563ed2.md): OpenAI · 2026-01-22 · Medium · 11 min read · PostgreSQL, Scaling, Replication, Resilience, Caching
  OpenAI serves millions of queries per second for ChatGPT and its API from a single unsharded Azure PostgreSQL primary plus nearly 50 geo-distributed read replicas, despite load growing more than 10x in a year.
- [Service disruption on October 20, 2025](https://swe.quest/articles/service-disruption-on-october-20-2025-fe786fa7dabbc413.md): incident.io · 2025-10-22 · Medium · 12 min read · Incidents & postmortems, Resilience, PostgreSQL, CI/CD, Cloud platforms
  The October 20, 2025 AWS us-east-1 outage degraded incident.io through third-party dependencies even though it runs on Google Cloud: its transcription, SAML, telecom and status page providers were all affected.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
