UNDER DEVELOPMENT - DRAFT
Skip to main content
nostr101
Foundations track page 4 of 6 NIP-01, NIP-09, NIP-11, NIP-65 @ 656cecc

Relays, and why your set decides what you see

A relay is a server that stores Nostr events and sends them to clients that ask. Your client reads only from the relays it is connected to, which we call its relay set, and no relay is required to hold every event. So two people who read the same thread can see different replies, and neither client is wrong. This lesson follows an event from publication to a reader's screen and shows the four places it can drop out, so you can tell where a missing reply was lost, and which Nostr specification documents, called NIPs, help clients find it.

1 000 words4 min0 explainersSpec: NIP-65
Anchor text · read alongside terms stated per work · free online
NIP-65 · anchor
Nostr Implementation Possibilities (NIPs)
the contributors to nostr-protocol/nips
"Relay List Metadata" — the kind 10002 event in which a person lists the relays they write to and the relays they read mentions on, and the rules for which list a client should use.
Read the chapter →
NIP-11 · anchor
Nostr Implementation Possibilities (NIPs)
the contributors to nostr-protocol/nips
"Relay Information Document" — the JSON profile a relay can publish about itself, including its limits and the NIPs it supports.
Read the chapter →
NIP-09 · anchor
Nostr Implementation Possibilities (NIPs)
the contributors to nostr-protocol/nips
"Event Deletion Request" — what a kind 5 event asks of relays and clients, and what it cannot promise.
Read the chapter →

Four places an event can be lost

This lesson follows one event from its author to a reader. Publishing, storing and fetching an event are separate steps, NIP-01 describes them, and each can fail without the reader seeing an error. A relay holds only the events that were sent to it and that it chose to keep, so when three relays hold different sets of events, a client that asks each of them for the same note can get three different answers.

  1. The author never sent the event to that relay. A client publishes by sending an EVENT message to each relay it picks, so a relay it did not pick receives the event only if someone else sends it there. In a real reply that this site fetched from a public relay (wss://relay.primal.net) on August 22, 2026, six tags name four relays as hints: wss://spatia-arcana.com/, wss://nostr.mom/, wss://nostr.wine/ and wss://relay.damus.io/. NIP-01 calls such a hint a “recommended relay URL, optional.”
  2. The relay refused it. The relay answers each EVENT with ["OK", id, false, reason] when it declines. NIP-01 lists the reasons it knows, among them blocked, rate-limited, restricted, pow (not enough proof of work) and error. The author’s client receives that message, and other readers never learn that the attempt happened.
  3. The relay accepted it, then dropped it. For replaceable events NIP-01 says “older versions MAY be discarded,” and ephemeral events are “not expected to be stored” at all. For regular events NIP-01 says only that they are “expected to be stored.”
  4. The reader’s client never asked that relay, or asked with limits. A REQ message names the filter, and the relay “SHOULD return events that match the filter.” For the limit property, “returning fewer events is acceptable.”

Add those up and the opening claim follows. Each reader sees at most what their own relay set accepted, kept and chose to return.

Relay sets are choices

A relay set is the list of relays a client connects to. Adding a relay to your set lets your client query it from then on. It does not change what the other relays hold, so the first question about a missing reply is whether any relay in your set could have held it.

What a relay will hold depends on its owner. NIP-11 gives relays a way to say so: a client can send an HTTP request with Accept: application/nostr+json to the relay’s address, and the relay “SHOULD return a document” in return. Its optional limitation object includes the fields auth_required, payment_required and restricted_writes, with the descriptions “this relay requires NIP-42 authentication,” “this relay requires payment before a new connection may perform any action” and “this relay requires some kind of condition to be fulfilled to accept events.” The document also lists supported_nips, the NIPs the relay implements.3

Read together, these fields show what a relay chooses to say about its admission rules, and a relay can omit them.

NIP-65: telling others where to look

A reader who does not know which relays an author writes to can find that author’s posts only by luck. NIP-65 gives the author a place to say it, in a replaceable event of kind 10002. The event carries one r tag per relay, each with an optional read or write marker: “if the marker is omitted, the relay is both read and write.”

The NIP gives clients these rules:

With these rules, your relay set is no longer only your own choice. The client can add a relay because the author of a note says that the author writes there.1 Whether a given client does this depends on the client.2 The same NIP also tells clients to “guide users to keep kind:10002 lists small (2-4 relays of each category).”

NIP-02 offers a second hint. A kind 3 follow list holds one p tag per followed key, and each tag can carry “a relay URL where events from that key can be found.”

A deletion request is a request

Suppose a note reached three relays and you delete it. Your client sends a kind 5 event, and NIP-09 says relays “SHOULD delete or stop publishing any referenced events” and clients “SHOULD hide or otherwise indicate a deletion request status.” Neither word is MUST, and a request reaches only the relays that receive it.

A relay that never receives the request keeps the note. A reader who already saved the note keeps it too, which is why NIP-09 says relays should keep sharing the deletion request itself. NIP-09 also requires a client to check that each event referenced in an e tag of the request has the same pubkey as the request, and it adds that relays “can not, in general, perform this validation.”

What you can do with this

When a reply or a profile is missing, find out which of the four places lost it, in this order:

  1. Open the author’s relay list if the client shows one, and check whether your set includes any relay on it.
  2. Fetch the relay’s NIP-11 document, with the Accept header shown above, and look for payment_required, auth_required or restricted_writes.
  3. Add one of the author’s write relays to your set, then look again.

Next, What a NIP actually is shows how to find and read the documents this page quoted.

Notes

  1. Some writers call this pattern the outbox model. NIP-65 does not use that name, so this page does not either.NIP-65
  2. NIP-65 uses "SHOULD" for what clients do with these lists. This page makes no claim about which clients follow it, because the site's client check records only whether each client's address still resolves, not which NIPs it implements.NIP-65
  3. NIP-11 says "any field may be omitted" and lists a relay's limits and supported NIPs as information the relay supplies about itself. The document is a relay's own statement, and the NIP does not describe a way to check it.NIP-11

Source & license

This page adapts no licensed material. It is original work by Delta Gamma LLC and is published under CC BY-SA 4.0; the figures it reports are separately dedicated to the public domain, below.

nostr101 adds no normative claims. Where this page and a NIP disagree, the NIP is correct and this page is a bug. Every page states the revision it was written against: NIP-01, NIP-09, NIP-11, NIP-65 @ 656cecc.

Numbers, titles and kind assignments come from the NIPs repository and belong to its contributors, who state that all NIPs are public domain. This page asserts no license over that text. Its own prose is CC BY-SA 4.0; attribute to nostr101.com and to the NIPs contributors.