Seed relay: nodes get their headers through the seed API
Test and deploy / test (push) Successful in 1m28s
Test and deploy / deploy (push) Successful in 2m5s

The seed API keeps a pool of NNTP connections (SEED_NNTP_CONNECTIONS) and
serves GET /api/v1/seed/ranges/:id/chunk?from=&to= for leased ranges:
the gzip stream the news server sent, passed on unopened. seed:node fetches
that way by default (SEED_FETCH=relay), so a node needs only a token and
SEED_CONNECTIONS; SEED_FETCH=direct keeps its own NNTP connections. All
fetching then comes from the indexer's IP (the account allows two).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-05 15:24:39 +02:00
1 parent 3d5cfb2527
commit 41859636d3
13 files changed
+289 -33

No files matched your search

+1
View File
@@ -49,6 +49,7 @@ export default await Env.create(new URL('../', import.meta.url), {
NNTP_POOL_SIZE: Env.schema.number.optional(),
NNTP_COMMAND_TIMEOUT_MS: Env.schema.number.optional(),
NNTP_TLS_SERVERNAME: Env.schema.string.optional(),
SEED_NNTP_CONNECTIONS: Env.schema.number.optional(),
// Indexer (config/indexer.ts)
BACKFILL_MAX_QUEUED: Env.schema.number.optional(),
+1
View File
@@ -55,6 +55,7 @@ router
.group(() => {
router.post('lease', [SeedController, 'lease'])
router.post('ranges/:id/batches', [SeedController, 'batch']).where('id', router.matchers.number())
router.get('ranges/:id/chunk', [SeedController, 'chunk']).where('id', router.matchers.number())
router.post('ranges/:id/done', [SeedController, 'done']).where('id', router.matchers.number())
router.post('ranges/:id/release', [SeedController, 'release']).where('id', router.matchers.number())
router.get('status', [SeedController, 'status'])