{"id":19751315,"url":"https://github.com/awinterman/anarchoredis","last_synced_at":"2026-02-14T05:35:09.000Z","repository":{"id":261544440,"uuid":"884406381","full_name":"AWinterman/anarchoredis","owner":"AWinterman","description":"Leaderless replication for Redis","archived":false,"fork":false,"pushed_at":"2025-01-23T20:37:35.000Z","size":5008,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T14:01:54.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/AWinterman.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},"funding":{"custom":["https://uptrace.dev/sponsor"]}},"created_at":"2024-11-06T17:35:19.000Z","updated_at":"2025-01-23T20:37:39.000Z","dependencies_parsed_at":"2025-01-23T21:24:07.041Z","dependency_job_id":"a51839f4-8578-425b-adc9-793bd739a776","html_url":"https://github.com/AWinterman/anarchoredis","commit_stats":null,"previous_names":["awinterman/anarchoredis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AWinterman/anarchoredis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fanarchoredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fanarchoredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fanarchoredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fanarchoredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWinterman","download_url":"https://codeload.github.com/AWinterman/anarchoredis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWinterman%2Fanarchoredis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-12T02:43:12.365Z","updated_at":"2026-02-14T05:35:08.986Z","avatar_url":"https://github.com/AWinterman.png","language":"Go","funding_links":["https://uptrace.dev/sponsor"],"categories":[],"sub_categories":[],"readme":"# anarchoredis\n\nStrongly Consistent Redis\n\n1. Implement the Redis wire protocol\n2. Understand which keys can be modified by a given command\n3. Anarchoredis has a single write leader.\n4. The write leader holds a mutually exclusive lock on each key modified by\n   a command. A request must obtain the lock before the key can be written to.\n5. Anarchoredis subscribes to the write leaders replication stream (using `PSYNC` and `REPLCONF`)\n6. When a command is received on the replication stream, the write leader\n   writes the command to a replicated log (e.g. Raft) and releases the lock on the key.\n7. When the lock is released, the write leader responds to the client.\n\nThis is inspired by:\n\n1. The now [years-old Jepsen analysis of Redis](https://aphyr.com/posts/283-jepsen-redis)\n2. The leaderless replication section from [Designing Data-Intesnive Applications]([url](https://learning.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/ch05.html#sec_replication_topologies))\n3. [MemoryDB](https://www.amazon.science/publications/amazon-memorydb-a-fast-and-durable-memory-first-cloud-database)\n\nI started out wanting to write a leaderless replication proxy for redis, but the presence of non-deterministic \noperations, like `SPOP` makes such a client undesirable, and such a proxy turned out to be relatively complicated \nanyhow.\n\nThen I read the MemoryDB paper, linked. \n\nMemoryDB keeps a replicated log of all updates. Writes are acknowledged once a corresponding update has been written \nto the replicated log. Reads can be served with eventual consistency from any replica, or with strong consistency \nfrom the leader.\n\nMemoryDB navigates leader election with the replicated log as well, although the details of how this is accomplished \nare not published.\n\n## Tasks\n\n- [x] Proxy redis commands\n- [x] Delay write acknowledgement until replication + Kafka\n- [ ] leader election\n- [ ] All redis commands\n  - [x] String commands\n  - [ ] ...\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawinterman%2Fanarchoredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawinterman%2Fanarchoredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawinterman%2Fanarchoredis/lists"}