{"id":36983314,"url":"https://github.com/s2-streamstore/s2","last_synced_at":"2026-05-20T03:04:59.489Z","repository":{"id":323062124,"uuid":"1091983034","full_name":"s2-streamstore/s2","owner":"s2-streamstore","description":"Durable Streams API","archived":false,"fork":false,"pushed_at":"2026-05-14T03:29:28.000Z","size":4959,"stargazers_count":509,"open_issues_count":36,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-05-14T03:30:47.472Z","etag":null,"topics":["database","durable","durable-streams","real-time","streaming","streamstore","write-ahead-log"],"latest_commit_sha":null,"homepage":"https://s2.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s2-streamstore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-07T20:11:30.000Z","updated_at":"2026-05-11T18:01:51.000Z","dependencies_parsed_at":"2026-02-27T21:01:55.328Z","dependency_job_id":null,"html_url":"https://github.com/s2-streamstore/s2","commit_stats":null,"previous_names":["s2-streamstore/s2"],"tags_count":239,"template":false,"template_full_name":null,"purl":"pkg:github/s2-streamstore/s2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s2-streamstore","download_url":"https://codeload.github.com/s2-streamstore/s2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2-streamstore%2Fs2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33045145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","durable","durable-streams","real-time","streaming","streamstore","write-ahead-log"],"created_at":"2026-01-13T22:56:32.197Z","updated_at":"2026-05-14T22:01:30.904Z","avatar_url":"https://github.com/s2-streamstore.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003c!-- Light mode logo --\u003e\n    \u003ca href=\"https://s2.dev#gh-light-mode-only\"\u003e\n      \u003cimg src=\"./assets/s2-black.png\" height=\"60\"\u003e\n    \u003c/a\u003e\n    \u003c!-- Dark mode logo --\u003e\n    \u003ca href=\"https://s2.dev#gh-dark-mode-only\"\u003e\n      \u003cimg src=\"./assets/s2-white.png\" height=\"60\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003ch1\u003eS2, the durable streams API\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003c!-- Github Actions (CI) --\u003e\n    \u003ca href=\"https://github.com/s2-streamstore/s2/actions?query=branch%3Amain++\"\u003e\u003cimg src=\"https://github.com/s2-streamstore/s2/actions/workflows/ci.yml/badge.svg\" /\u003e\u003c/a\u003e\n    \u003c!-- Discord (chat) --\u003e\n    \u003ca href=\"https://discord.gg/vTCs7kMkAf\"\u003e\u003cimg src=\"https://img.shields.io/discord/1209937852528599092?logo=discord\" /\u003e\u003c/a\u003e\n    \u003c!-- LICENSE --\u003e\n    \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/s2-streamstore/s2\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n[s2.dev](https://s2.dev) is a serverless datastore for real-time, streaming data.\n\nThis repository contains:\n- **[s2-cli](cli/)** - The official S2 command-line interface\n- **[s2-lite](lite/)** - An open source, self-hostable server implementation of the [S2 API](https://s2.dev/docs/api)\n- **[s2-sdk](sdk/)** - The official Rust SDK for S2\n\n## Installation\n\n### Homebrew (macOS/Linux)\n```bash\nbrew install s2-streamstore/s2/s2\n```\n\n### Cargo\n```bash\ncargo install --locked s2-cli\n```\n\n### Release Binaries (macOS/Linux)\n```bash\ncurl -fsSL https://raw.githubusercontent.com/s2-streamstore/s2/main/install.sh | bash\n```\nOr specify a version with `VERSION=x.y.z` before the command. See all [releases](https://github.com/s2-streamstore/s2/releases).\n\n### Docker\n```bash\ndocker pull ghcr.io/s2-streamstore/s2\n```\n\n## s2-lite\n\n`s2-lite` is embedded as the `s2 lite` subcommand of the CLI. It's a self-hostable server implementation of the S2 API.\n\nIt uses [SlateDB](https://slatedb.io) as its storage engine, which relies entirely on object storage for durability.\n\nIt is easy to run `s2 lite` against object stores like AWS S3 and Tigris. It is a single-node binary with no other external dependencies. \n\nYou can also simply not specify a `--bucket`, which makes it operate entirely in-memory (or use `--local-root` to persist to local disk instead).\n\n\u003e [!TIP]\n\u003e When you point lite at a `--bucket`, data is **always durable** on object storage before being acknowledged or returned to readers — just like [s2.dev](https://s2.dev).\n\u003e \n\u003e The _optional_ in-memory mode (no `--bucket` or `--local-root` specified) just makes it an effective S2 emulator for integration tests.\n\n### Quickstart\n\nHere's how you can run in-memory without any external dependency:\n```bash\n# Using Docker\ndocker run -p 8080:80 ghcr.io/s2-streamstore/s2 lite\n\n# Or directly with the CLI\ns2 lite --port 8080\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAWS S3 bucket example\u003c/summary\u003e\n\n```bash\ndocker run -p 8080:80 \\\n  -e AWS_PROFILE=${AWS_PROFILE} \\\n  -v ~/.aws:/home/nonroot/.aws:ro \\\n  ghcr.io/s2-streamstore/s2 lite \\\n  --bucket ${S3_BUCKET} \\\n  --path s2lite\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eStatic credentials example (Tigris, R2 etc)\u003c/summary\u003e\n\n```bash\ndocker run -p 8080:80 \\\n  -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \\\n  -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \\\n  -e AWS_ENDPOINT_URL_S3=${AWS_ENDPOINT_URL_S3} \\\n  ghcr.io/s2-streamstore/s2 lite \\\n  --bucket ${S3_BUCKET} \\\n  --path s2lite\n```\n\u003c/details\u003e\n\n\u003e [!NOTE]\n\u003e Point the [S2 CLI](https://s2.dev/docs/quickstart) or [SDKs](https://s2.dev/docs/sdk) at your lite instance like this:\n\u003e ```bash\n\u003e export S2_ACCOUNT_ENDPOINT=\"http://localhost:8080\"\n\u003e export S2_BASIN_ENDPOINT=\"http://localhost:8080\"\n\u003e export S2_ACCESS_TOKEN=\"ignored\"\n\u003e ```\n\nLet's make sure the server is ready:\n```bash\nwhile ! curl -sf ${S2_ACCOUNT_ENDPOINT}/health -o /dev/null; do echo Waiting...; sleep 2; done \u0026\u0026 echo Up!\n```\n\nInstall the CLI (see [Installation](#installation) above) or upgrade if `s2 --version` is older than `0.26`\n\nLet's create a [basin](https://s2.dev/docs/concepts) with auto-creation of streams enabled:\n```bash\ns2 create-basin liteness --create-stream-on-append --create-stream-on-read\n```\n\nTest your performance:\n```bash\ns2 bench liteness --target-mibps 10 --duration 5s --catchup-delay 0s\n```\n\n![S2 Benchmark](./assets/bench.gif)\n\nNow let's try streaming sessions. In one or more new terminals (make sure you re-export the env vars noted above),\n```bash\ns2 read s2://liteness/starwars 2\u003e /dev/null\n```\n\nNow back from your original terminal, let's write to the stream:\n```bash\nnc starwars.s2.dev 23 | s2 append s2://liteness/starwars\n```\n\n![S2 Star Wars Streaming](./assets/starwars.gif)\n\n### Kubernetes Deployment\n\nDeploy `s2-lite` to Kubernetes using Helm. See the [Helm chart documentation](charts/s2-lite-helm/README.md) for installation instructions and configuration options.\n\n### Monitoring\n\n`/health` will return 200 on success for readiness and liveness checks\n\n`/metrics` returns Prometheus text format\n\n### Internals\n\n#### SlateDB settings\n\n[Settings reference](https://docs.rs/slatedb/latest/slatedb/config/struct.Settings.html#fields)\n\nUse `SL8_` prefixed environment variables, e.g.:\n\n```bash\n# Defaults to 50ms for remote bucket / 5ms in-memory\nSL8_FLUSH_INTERVAL=10ms\n```\n\n#### Design\n\n[Concepts](https://s2.dev/docs/concepts)\n\n- HTTP serving is implemented using [axum](https://github.com/tokio-rs/axum)\n- Each stream corresponds to a Tokio task called [`streamer`](lite/src/backend/streamer.rs) that owns the current `tail` position, serializes appends, and broadcasts acknowledged records to followers\n- Appends are pipelined to improve performance against high-latency object storage\n- [`lite::backend::kv::Key`](lite/src/backend/kv/mod.rs) documents the data modeling in SlateDB\n\n### Compatibility\n\n- [CLI](cli/) ✅ v0.26+\n- [TypeScript SDK](https://github.com/s2-streamstore/s2-sdk-typescript) ✅ v0.22+\n- [Go SDK](https://github.com/s2-streamstore/s2-sdk-go) ✅ v0.11+\n- [Rust SDK](sdk/) ✅ v0.22+\n- [Python SDK](https://github.com/s2-streamstore/s2-sdk-python) ✅ v0.1+\n\n### API Coverage\n\nComplete [specs](https://github.com/s2-streamstore/s2-specs/tree/main/s2/v1) are available:\n- [OpenAPI](https://s2.dev/docs/api) for the REST-ful core\n- [Protobuf](https://buf.build/streamstore/s2/docs/main:s2.v1) definitions\n- [S2S](https://s2.dev/docs/api/protocol#sessions), which is the streaming session protocol\n\n\u003e [!IMPORTANT]\n\u003e Unlike the cloud service where the basin is implicit as a subdomain, `/streams/*` requests **must** specify the basin using the `S2-Basin` header. The SDKs take care of this automatically.\n\n| Endpoint | Support |\n| --- | --- |\n| `/basins` | Supported |\n| `/streams` | Supported |\n| `/streams/{stream}/records` | Supported |\n| `/access-tokens` | Not supported https://github.com/s2-streamstore/s2/issues/28 |\n| `/metrics` | Not supported |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs2-streamstore%2Fs2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2-streamstore%2Fs2/lists"}