{"id":20698190,"url":"https://github.com/fly-apps/keydb","last_synced_at":"2025-04-22T21:46:13.113Z","repository":{"id":38015617,"uuid":"313801701","full_name":"fly-apps/keydb","owner":"fly-apps","description":"KeyDB server on Fly","archived":false,"fork":false,"pushed_at":"2022-02-10T19:17:11.000Z","size":4281,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T19:11:15.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fly-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-18T02:31:42.000Z","updated_at":"2024-10-20T14:17:34.000Z","dependencies_parsed_at":"2022-09-14T00:40:40.185Z","dependency_job_id":null,"html_url":"https://github.com/fly-apps/keydb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fkeydb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fkeydb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fkeydb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fkeydb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-apps","download_url":"https://codeload.github.com/fly-apps/keydb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250330680,"owners_count":21413020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-17T00:23:24.209Z","updated_at":"2025-04-22T21:46:13.093Z","avatar_url":"https://github.com/fly-apps.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyDB on Fly\n\nKeyDB is a multithreaded fork of Redis designed for high performance on multi-core servers.\n\nKeyDB also supports a _multimaster_ mode which is uniquely suited to deployment on Fly. This mode\ndoes not currently enforce strong consistency, but it's useful for a few scenarios today.\n\n## Performant global cache\n\n[We've written about](https://fly.io/blog/last-mile-redis/) using standard Redis\nreplicas that can accept writes both from clients *and* their primary.\n\nKeydb multimaster provides a similar last-write-wins guarantee. So it's useful for caching\nand does not require targeting a specific instance to invalidate a cache item.\n\n## Distributed pub/sub\n\nThis setup also supports broadcasting pub/sub events to clients connected to other KeyDB peers\nusing the standard [Redis Pub/Sub commands](https://fly.io/blog/last-mile-redis/).\n\nKeyDB offers no additional guarantees on deliverability nor ordering of messages.\nOtherwise, any existing software using Redis pub/sub should work in a multimaster setup.\n\n## Deployment\n\nGet the [Fly CLI](https://fly.io/blog/last-mile-redis/) and a Fly account.\n\nThen, clone this repo and run `fly launch`. Don't deploy yet - we need to do a bit more setup.\n\nBy default, this configuration enables authentication on KeyDB. So let's set a password:\n\n```\nfly secrets set KEYDB_PASSWORD=password\n```\n\nNow let's add storage volumes in Chicago and Amsterdam for KeyDB persistent storage.\n\n```\nfly volumes create keydb_server --region ord\nfly volumes create keydb_server --region ams\n```\n\nNow we're ready to deploy!\n\n```\nfly deploy\n```\n\nWe can keep track of what's going on with `fly logs`.\n\nFinally, we'll want to deploy an application in the same regions and connect to the region-local KeyDB.\n\nThat can be done by building the instance hostname using the region and application name. For example,\nthe Chicago instance is available at `redis://password:password@ord.multimaster-keydb-example.internal`.\n\nCheck out our [example Rails app using Anycable](https://github.com/superfly/anycable-rails) to broadcast websocket messages globally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fkeydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-apps%2Fkeydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fkeydb/lists"}