TL;DR

This document looks into how Station could take on the benchmarking and load testing for Saturn L1 nodes. It analyses it based on certain criteria such as:

Status Quo Process Flow

The Saturn team tests their network from the user perspective in the following way.

  1. The Arc service worker gets hold of the top IPFS gateway CIDs by making requests to the following endpoints: https://cids.arc.io/top-cids?limit=500 (how often is this list updated?)
  2. The service worker randomly selects a CID from this list weighted by how popular the CID is. This is to preserve the distribution of requests in the organic traffic.
  3. The service worker then makes a request to IPFS and Saturn with the chosen CID.
  4. On each response, it creates a benchmark record with the following fields.
Field Description
service IPFS or Saturn
cid The chosen CID
url The request URL
transferId saturn-transfer-id header, fallback to x-bfid header
httpStatusCode Status code of the response
httpProtocol quic-status header
nodeId saturn-node-id header, fallback to x-ipfs-pop header
cacheStatus saturn-cache-status header, fallback to x-proxy-cache
ttfb new Date() timestamp when response arrives
ttfbAfterDnsMs Difference between window.performance.resource.responseStart and window.performance.resource.requestStart
dnsTimeMs Difference between window.performance.resource.domainLookupEnd and window.performance.resource.domainLookupStart
startTime new Date() at start of request invocation
endTime new Date() at end of response handling
transferSize Size of response body
isError Did the request error out?
isDir Is the CID addressing a directory instead of a file?
traceparent Open Telemetry Traceparent made using the transferId header
  1. The service worker then sends 1 or more requests in to the Saturn network to increase the network load.
  2. The service worker then reports the benchmark record into a benchmark report URL (AWS) as well as a log ingestor URL (also an AWS endpoint), which writes them into Postgres DBs. There is currently no fraud detection to make sure the values in the benchmark record are not fraudulent. Fraud is conducted on the Log Ingestor DB
  3. You can view aggregated metrics of the Postgres DBs in this dash

Untitled

Opportunity: Station nodes as network testers

Station nodes can replace Arc service workers to perform these Saturn network tests and measurements.