Seed relay: nodes get their headers through the seed API
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:
1 parent
3d5cfb2527
commit
41859636d3
13 files changed
+289
-33
No files matched your search
+8
-2
@@ -1,10 +1,16 @@
|
||||
import type { XoverClient, Overview } from '../nntp/xover_client.js'
|
||||
import type { Overview } from '../nntp/xover_client.js'
|
||||
import { segmentFromHeader, type IngestSegment, type OverviewHeader } from '../ingest/segment.js'
|
||||
import { FileAggregator } from '../aggregate/index.js'
|
||||
import { toFragment, toSeedFile, type SeedBatch } from './wire.js'
|
||||
|
||||
/** Where a range's overviews come from: an NNTP connection, or the seed API's relay. */
|
||||
export interface OverviewSource {
|
||||
group(name: string): Promise<unknown>
|
||||
xover(from: number, to: number): Promise<Overview[]>
|
||||
}
|
||||
|
||||
export interface RunRangeOptions {
|
||||
client: XoverClient
|
||||
client: OverviewSource
|
||||
group: string
|
||||
/** Inclusive article numbers. */
|
||||
start: number
|
||||
|
||||
Reference in new issue
Block a user