Catalogue / listennotes-2025-tech-stack

A single-digit team runs Listen Notes as one Django monolith on EC2 with self-managed Postgres, Elasticsearch, ClickHouse and Redis

Listen Notes, 2025. Podcast database with a website, an API and data exports.

Organisation
Listen Notes
Evidence
Reported from production
System
Podcast database with a website, an API and data exports
As of
2025-02
Source
Tech & Non-Tech Stacks to Run Listen Notes (2025)

The Official Listen Notes Blog, published 2025-02-18

Architecture

Listen Notes describes its main web application as one podcast database with three interfaces: a website, a developer API and raw data exports. The code is a monorepo with a Django backend, whose monolith includes the API gateway, and it uses several data stores: Postgres, Elasticsearch, Redis and ClickHouse. Requests to the website and the API pass through Cloudflare.

Section: How We Build Listen Notes Software | Near: now part of our monolithic Django app | Near: Podcast API pass through Cloudflare

Components

ComponentRoleWhere
PostgresThe primary data store and single source of truth, holding podcast metadata from the ingest workers and most website and API data. The cluster typically has 3 instances: one primary for writes and some reads, and read-only replicas with short query timeouts.Section: The Single Source of Truth: Postgres
ElasticsearchThe search engine. Documents are synced from Postgres whenever a podcast or episode is added, updated or deleted, and periodic jobs keep the two copies almost in sync. Searches from the website, the API and internal scripts all go to it.Section: Search Engine: Elasticsearch
ClickHouseStores analytics data such as API, listen and search logs. It joined the stack around 2020.Section: Analytics: ClickHouse
RedisA cache used for rate limiting, feature switches and other performance-critical functions.Section: Fast & Ephemeral Datastore: Redis
WebsiteA Django application served by uwsgi under supervisord behind an nginx load balancer, with pages rendered partly by Django templates and partly by a React application.Section: UI #1: The Website (listennotes.com)
API gatewayPart of the Django monolith. It handles rate limits, authentication, authorization, caching and the processing of each API request.Section: UI #2: The Podcast API (PodcastAPI.com)
Async workersPython code on async worker servers ingests and processes podcast metadata into Postgres. Separately, Celery async workers take tasks triggered by user events such as sending transactional email.Near: ingests and processes podcast metadata | Near: we offload to Celery async workers
CloudflareEvery request to the website and the API passes through it for CDN, firewall and DDoS protection, with custom firewall rules per page and endpoint. Internal tools call its API to block or challenge an IP address.Section: Fighting Bad Guys/Bots

Figures, as the source states them

FigureAs statedNoteWhere
Size of the Postgres primary data store1.2 TBOver; Postgres only, not Elasticsearch, ClickHouse or RedisNear: which has grown to over 1.2 TB
Documents in the Elasticsearch index200 million documentsApproximate, stated as over; all public podcasts and episodesNear: now totaling over ~200 million documents
Instances in the Postgres cluster3 instancesTypical; sometimes 4 or 5; one primary and the rest read-only replicasNear: Our Postgres cluster typically has 3
Query timeout on read-only Postgres replicas30 secondsGiven as an example of a short timeoutNear: short query timeouts (e.g., 30 seconds)
Yearly cost of the earlier monitoring tools3,500 US dollars per yearApproximate; Datadog, PagerDuty and Atlassian Statuspage togetherNear: costing ~$3,500 annually
Commission RapidAPI took on API revenue20 percentNear: paying RapidAPI's 20% commission fee

Records

Decision#d1

Run open-source datastores on EC2 instances and avoid AWS managed database products

listennotes-2025-tech-stack#d1 at corpus version 26a1b3a7e3dd
Chosen

The company runs on AWS but does not pay for its managed database products: it runs open-source datastore software on EC2 instances. Postgres runs on storage-optimized instances, and custom bash scripts, some scheduled, do its routine DBA tasks.

Section: One Database | Section: The Single Source of Truth: Postgres

Rejected

AWS RDS for Postgres. Avoided for cost and for control; the lack of root access is the example given.

Near: We avoid AWS RDS for cost and

Reasoning

Cost efficiency. The author says sustainability is key: the aim is to give excellent service without running out of money.

Near: on AWS EC2 instances for cost efficiency

Decision#d2

Replace RapidAPI with an API gateway built into the Django monolith

listennotes-2025-tech-stack#d2 at corpus version 26a1b3a7e3dd
Chosen

The team built its own API gateway, now part of the monolithic Django application, which handles rate limits, authentication, authorization, caching and request processing for the API.

Section: UI #2: The Podcast API (PodcastAPI.com)

What forced it

The team experienced multiple RapidAPI outages.

Near: after experiencing multiple RapidAPI outages

Reasoning

RapidAPI took a 20% commission, which the author calls acceptable for a side project but too high for a serious API business.

Near: paying RapidAPI's 20% commission fee

What worked before

At first the API was managed and monetized through RapidAPI, then called Mashape. The API launched in December 2017.

Near: we used RapidAPI (then Mashape) to manage | Near: We launched the API in December 2017

Cost

Building the gateway took a month.

Near: we spent a month building our own

Outcome

The author reports that the change improved reliability and ended the 20% commission payments.

Near: This not only improved our reliability

Decision#d3

Dump Postgres daily from a read-only replica, encrypt it, and upload it to three cloud providers

listennotes-2025-tech-stack#d3 at corpus version 26a1b3a7e3dd
Chosen

Postgres is replicated across several servers in real time. A daily cron job also runs pg_dump on one of the read-only servers, encrypts the dump with GPG and uploads it to AWS S3, Google Cloud Storage and Cloudflare R2.

Section: Data Backup

Reasoning

The author says that with the Postgres dump the business could be restored even if the code and servers were gone, and that he hopes the three storage companies do not all lose the data at once.

Near: with our Postgres dump, the business could | Near: lose our data all at once

Decision#d4

Stay on AWS with prepaid reserved instances although cheaper hosts exist

listennotes-2025-tech-stack#d4 at corpus version 26a1b3a7e3dd
Chosen

The company has stayed on AWS since early 2018. For EC2 it always buys reserved instances and prepays where it can, and it changes instance types over time for price and performance.

Section: Cloud Hosting | Near: we update our EC2 instance types

Rejected

Cheaper hosting providers. The author says downtime or poor support costs far more, in people's effort and in customer trust.

Near: While cheaper alternatives exist

What worked before

In 2017 the service ran on three DigitalOcean droplets at $10 a month each. It moved to AWS in early 2018, which the author credits to $5,000 of AWS credits from WeWork.

Near: we used three $10/month DigitalOcean droplets

Cost

AWS is the company's second biggest expense after people, and the author calls the reserved instances a significant expense.

Near: second biggest expense after human costs | Near: It’s a significant expense

Decision#d5

Move monitoring and alerting from Datadog, PagerDuty and Statuspage to one bundled service

listennotes-2025-tech-stack#d5 at corpus version 26a1b3a7e3dd
Chosen

In early 2025 the company moved its whole monitoring and alerting stack to BetterStack, a bundled service.

Section: Monitoring and Alerting

Reasoning

The author says that as a small business owner he often checks whether the tools in use have cheaper and better alternatives.

Near: I frequently evaluate whether there are

What worked before

Datadog, PagerDuty and Atlassian Statuspage were used before and together cost about $3,500 a year.

Near: costing ~$3,500 annually

Outcome

The author reports that the move cut monitoring costs by 90%.

Near: cut our monitoring costs by 90%

Decision#d6

Group uwsgi processes to isolate slow page types from the others

listennotes-2025-tech-stack#d6 at corpus version 26a1b3a7e3dd
Chosen

In production Django is served by uwsgi under supervisord behind an nginx load balancer, and the uwsgi processes are grouped.

Near: We group uwsgi processes to prevent

Reasoning

The grouping is meant to stop one slow type of page, search for example, from affecting other types such as feed pages.

Near: We group uwsgi processes to prevent

Decision#d7

Deploy from a laptop with an Ansible script while nginx takes some uwsgi processes out of rotation

listennotes-2025-tech-stack#d7 at corpus version 26a1b3a7e3dd
Chosen

Django and React code is deployed straight from a MacBook Pro by an Ansible-orchestrated script: it compiles the JavaScript and CSS assets, uploads them to Cloudflare R2 to be served by the Cloudflare CDN, and checks out the latest Django code on the production servers. The nginx load balancer temporarily removes some uwsgi processes during a deployment so that there is no downtime. Servers are also provisioned with Ansible.

Section: Code Deployment | Near: We provision servers using Ansible

Review

Extracted by
Claude (feed 25)
Human review
Not started. Status recorded on 2026-12-02.