Catalogue / hashnode-2023-feed-precalculation

Hashnode pre-calculates personalized feeds for active users with Step Functions and Lambda, serving them from a Redis cache

Hashnode, 2023. Feed pre-calculation pipeline.

Organisation
Hashnode
Evidence
Reported from production
Source
Hashnode's Feed Architecture

Hashnode Engineering, published 2023-12-07

Records

Decision#d1

Pre-calculate each active user's feed on events and serve it from cache instead of computing it per page view

Decision#d2

Batch users in the Step Function so post data is shared across a batch, and calculate only from cached data

Decision#d3

Purge the whole feed cache every couple of hours as a safety net for stale data

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.