Used by
Simplicity
Append with a POST, tail with a GET.
S2 is to moving data what object storage is to static data.
# Append a record
curl -X POST "https://my-basin.b.s2.dev/v1/streams/my-stream/records" \
-H "Authorization: Bearer $S2_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"records": [{"body": "hello, world"}]}'
# Read from the start, then tail new records over SSE
curl -N "https://my-basin.b.s2.dev/v1/streams/my-stream/records?seq_num=0" \
-H "Authorization: Bearer $S2_ACCESS_TOKEN" \
-H "Accept: text/event-stream"
s2 — zsh
ubuntu@us-east-1-vm:~$ s2 bench my-test-basin
Creating temporary stream s2://my-test-basin/bench/da38e404-dd32-457f-84bd-470a9f4a9da9
Running for 1m targeting 1 MiB/s with 8192 byte records, Ctrl+C to end early
Ack Latency Statistics (n=7681) End-to-End Latency Statistics (n=7681)
min : 14.02ms min : 18.09ms
p50 : 26.57ms p50 : 31.43ms
p90 : 35.31ms p90 : 40.34ms
p99 : 37.70ms p99 : 44.13ms
max : 125.18ms max : 148.70ms
Write: 1.00 MiB/s, 128 records/s (62922752 bytes, 7681 records in 60.00s)
Read: 1.00 MiB/s, 128 records/s (62922752 bytes, 7681 records in 60.00s)
End-to-end p99 latency, same region
<50ms
Write throughput per stream
100 MiBps
Storage per stream
Bottomless
Number of streams
Unlimited

