{"id":30983888,"url":"https://github.com/barddoo/zedis","last_synced_at":"2026-06-15T00:03:40.377Z","repository":{"id":313799905,"uuid":"1042065670","full_name":"barddoo/zedis","owner":"barddoo","description":"Redis in Zig","archived":false,"fork":false,"pushed_at":"2026-05-21T21:01:43.000Z","size":3152,"stargazers_count":291,"open_issues_count":11,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-22T06:31:37.668Z","etag":null,"topics":["cache","caching","in-memory","redis","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/barddoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":null,"dco":null,"cla":null}},"created_at":"2025-08-21T12:37:17.000Z","updated_at":"2026-05-21T20:51:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"59672e97-eb19-4608-bac7-4fbfd13ce045","html_url":"https://github.com/barddoo/zedis","commit_stats":null,"previous_names":["barddoo/zedis"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/barddoo/zedis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barddoo%2Fzedis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barddoo%2Fzedis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barddoo%2Fzedis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barddoo%2Fzedis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barddoo","download_url":"https://codeload.github.com/barddoo/zedis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barddoo%2Fzedis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34342089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["cache","caching","in-memory","redis","zig"],"created_at":"2025-09-12T11:54:37.851Z","updated_at":"2026-06-15T00:03:40.369Z","avatar_url":"https://github.com/barddoo.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zedis\n\n[![Release](https://github.com/barddoo/zedis/actions/workflows/release.yml/badge.svg)](https://github.com/barddoo/zedis/actions/workflows/release.yml)\n\nA Redis-compatible in-memory data store written in [Zig](https://ziglang.org/), designed for learning and experimentation. Zedis implements the core Redis protocol and data structures with a focus on simplicity, performance, and thread safety.\n\n\u003e Made for learning purposes. Not intended for production use **for now**.\n\n## Features\n\n- **Redis Protocol Compatibility**: Supports the Redis Serialization Protocol (RESP)locks.\n- **Multiple Data Types**: String and integer value storage with automatic type conversion.\n- **Core Commands**: Essential Redis commands including GET, SET, INCR, DECR, DEL, EXISTS, and TYPE.\n- **High Performance**: Written in Zig for optimal performance and memory safety.\n- **Key Expiration**: Set time-to-live (TTL) for keys with background expiration handling.\n- **Disk persistence (RDB)**: Point-in-time snapshots of your dataset.\n- **Append-only file (AOF)**: Durable write-ahead logging for data recovery.\n- **Memory Budgeting**: Eviction-aware KV allocator, fixed client slot pool, and separate temporary allocation paths.\n- **Pub/Sub**: Decoupled communication between services.\n- **Time Series**: Time series data structure. **Now with Gorilla compression!**\n\n## Caveats\n\n- Zedis is intentionally single-store. It does not support multiple logical databases and does not expose Redis `SELECT`. It adds complexity and segment memory. This follows the reasoning Salvatore Sanfilippo gave when he called Redis multiple databases one of his worst design decisions: https://groups.google.com/g/redis-db/c/vS5wX8X4Cjg/m/8ounBXitG4sJ\n\n## Roadmap\n\nSee the [open issues](https://github.com/barddoo/zedis/issues) for upcoming features and improvements.\n\n## Quick Start\n\nDownload the binary from the [releases page](https://github.com/barddoo/zedis/releases) or build from source to get started with Zedis.\n\n### Prerequisites\n\n- [Zig](https://ziglang.org/download/) master branch (required for latest language features)\n\n### Building and Running\n\n```bash\n# Clone the repository\ngit clone https://github.com/barddoo/zedis.git\ncd zedis\n\n# Build the project\nzig build\n\n# Run the server\nzig build run\n```\n\nThe server will start on `127.0.0.1:6379` by default.\n\n### Testing with Redis CLI\n\nYou can test Zedis using the standard `redis-cli` or any Redis client:\n\n```bash\n# Connect to Zedis\nredis-cli -h 127.0.0.1 -p 6379\n\n# Try some commands\n127.0.0.1:6379\u003e SET mykey \"Hello, Zedis!\"\nOK\n127.0.0.1:6379\u003e GET mykey\n\"Hello, Zedis!\"\n127.0.0.1:6379\u003e INCR counter\n(integer) 1\n127.0.0.1:6379\u003e TYPE mykey\nstring\n```\n\n## Docker\n\nPre-built images are available on [Docker Hub](https://hub.docker.com/r/barddoo/zedis):\n\n```bash\ndocker run -p 6379:6379 barddoo/zedis\n```\n\n### Variants\n\n| Tag | Base | Size | Use case |\n|-----|------|------|----------|\n| `latest`, `x.x.x-alpine` | Alpine 3.20 | Smallest with shell | Default |\n| `x.x.x-debian`, `x.x.x-slim` | Debian Bookworm slim | glibc compat | Broader ecosystem |\n| `x.x.x-distroless` | Distroless static | No shell | Security-sensitive |\n\n### Persistent data\n\nMount a volume to persist data across restarts:\n\n```bash\ndocker run -p 6379:6379 -v zedis-data:/var/lib/zedis/data barddoo/zedis\n```\n\n### Custom config\n\n```bash\ndocker run -p 6379:6379 -v ./zedis.conf:/etc/zedis/zedis.conf barddoo/zedis\n```\n\n## Development\n\n### Project Structure\n\nThe codebase follows Zig conventions with clear separation of concerns:\n\n- Type-safe operations with compile-time guarantees\n- Explicit error handling throughout\n- Memory safety\n- Modular design for easy extension\n- Comprehensive logging for debugging\n\nSee `docs/server-architecture.md` for the current server thread model and request flow.\n\n### Memory Management\n\nSee `docs/memory-architecture.md` for the current allocator layout, memory budgets, and runtime allocation behavior.\n\n### Building for Development\n\n```bash\n# Build in debug mode (default)\nzig build -Doptimize=Debug\n\n# Build optimized release\nzig build -Doptimize=ReleaseFast\n\n# Run tests (when available)\nzig build test\n```\n\n## Contributing\n\nContributors are welcome! Whether you're fixing bugs, adding features, improving documentation, or suggesting enhancements, your contributions are appreciated.\n\nFeel free to:\n\n- Open an issue to report bugs or suggest features\n- Submit pull requests with improvements\n- Share feedback and ideas\n\nCheck out the [open issues](https://github.com/barddoo/zedis/issues) to see where you can help.\n\n## Stay Connected\n\n- Subscribe to my [newsletter](https://charlesfonseca.substack.com)\n\n## Thanks\n\n- [Andrew Kelley](https://andrewkelley.me) - For creating the amazing [Zig Language](https://ziglang.org/).\n- [Redis](https://redis.io/) - For the inspiration and protocol design.\n- [TigerBeetle](https://tigerbeetle.com/) - For the memory management and the tiger style.\n- [Karl Seguin](https://github.com/karlseguin) - For the great articles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarddoo%2Fzedis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarddoo%2Fzedis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarddoo%2Fzedis/lists"}