NFDB: Scaling Relays

An introduction to NFDB, a scalable, distributed Nostr relay database.

semisol

April 28, 2025 · 3 min read

I have been recently building NFDB, a new relay DB. This post is meant as a short overview.

Regular relays have challenges#

Current relay software have significant challenges, which I have experienced when hosting Nostr.land:

NFDB: A scalable database for large relays#

NFDB is a new database meant for medium-large scale relays, built on FoundationDB that provides:

NFDB has extended search capabilities including:

Personalization#

NFDB allows significant personalization:

Other#

NFDB has support for many other features such as:

Calcite: A local microrelay database#

Calcite is a lightweight, local version of NFDB that is meant for microrelays and caching, meant for thousands of personal microrelays.

Calcite HA is an additional layer that allows live migration and relay failover in under 30 seconds, providing higher availability compared to current relays with greater simplicity. Calcite HA is enabled in all Calcite deployments.

For zero-downtime, NFDB is recommended.

Noswhere SmartCache#

Relays are fixed in one location, but users can be anywhere.

Noswhere SmartCache is a CDN for relays that dynamically caches data on edge servers closest to you, allowing:

routerd#

routerd is a custom load-balancer optimized for Nostr relays, integrated with SmartCache.

routerd is specifically integrated with NFDB and Calcite HA to provide fast failover and high performance.

Ending notes#

NFDB is planned to be deployed to Nostr.land in the coming weeks.

A lot more is to come. 👀️️️️️️

#nfdb#nostr#relays
0

Written by

👨‍💻 software developer 📨 nostr.land relay all opinions are my own.

semisol@nostr.land

Comments0

No comments yet. Start the conversation.