{"id":26745748,"url":"https://github.com/afaanbilal/hyperdb","last_synced_at":"2026-04-26T08:35:52.200Z","repository":{"id":91108202,"uuid":"587015389","full_name":"AfaanBilal/hyperdb","owner":"AfaanBilal","description":"HyperDB is an in-memory hyper-fast key-value store with an HTTP API written in Rust.","archived":false,"fork":false,"pushed_at":"2025-07-17T14:06:09.000Z","size":68,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T16:15:17.030Z","etag":null,"topics":["database","db","fast","http","in-memory-database","rust"],"latest_commit_sha":null,"homepage":"https://afaan.dev/hyperdb-docs","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/AfaanBilal.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}},"created_at":"2023-01-09T19:05:51.000Z","updated_at":"2025-07-17T14:06:12.000Z","dependencies_parsed_at":"2023-03-13T17:49:42.620Z","dependency_job_id":null,"html_url":"https://github.com/AfaanBilal/hyperdb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AfaanBilal/hyperdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfaanBilal%2Fhyperdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfaanBilal%2Fhyperdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfaanBilal%2Fhyperdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfaanBilal%2Fhyperdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AfaanBilal","download_url":"https://codeload.github.com/AfaanBilal/hyperdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfaanBilal%2Fhyperdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32290919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"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":["database","db","fast","http","in-memory-database","rust"],"created_at":"2025-03-28T08:18:39.942Z","updated_at":"2026-04-26T08:35:52.190Z","avatar_url":"https://github.com/AfaanBilal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"HyperDB\n=======\n\nAuthor: **[Afaan Bilal](https://afaan.dev)**\n\n## Introduction\n**HyperDB** is an in-memory hyper-fast key-value store with an HTTP API written in Rust.\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/AfaanBilal/hyperdb)\n\n---\n\n## Run with Docker \u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/docker/docker-original.svg\" alt=\"Docker\" title=\"Docker\" width=\"50px\" style=\"float:right\" /\u003e\n\n`$ docker run --rm -it -p 8765:8765 afaanbilal/hyperdb`\n\n````\n[HyperDB v0.1.0 (https://afaan.dev)]: Server starting on 0.0.0.0:8765\n````\n\n## Build and Run \u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/bash/bash-original.svg\" alt=\"Bash\" title=\"Bash\" width=\"50px\" style=\"float:right\" /\u003e\n`$ cargo run`\n\n````\n[HyperDB v0.1.0 (https://afaan.dev)]: Server starting on 0.0.0.0:8765\n````\n\n\n---\n\n## Configuration\nThe following environment variables configure the HTTP server.\n\n| Environment Variable | Default value | Description\n| :------------------- | :------------ | :-----------\n| HYPERDB_HOST         | `0.0.0.0`     | HyperDB HTTP Server Bind Host.\n| HYPERDB_PORT         | `8765`        | HyperDB HTTP Server Port.\n| HYPERDB_AUTH         | `[blank]`     | Set to `1` to enable JWT authentication.\n| HYPERDB_SECRET       | `[blank]`     | Set the JWT signing secret. Must be set if authentication is enabled.\n| HYPERDB_USERNAME     | `[blank]`     | Set the username. Must be set if authentication is enabled.\n| HYPERDB_PASSWORD     | `[blank]`     | Set the password. Must be set if authentication is enabled.\n\n---\n\n## Clients\n|   | Language    | Source            | Package          | Install\n|:--| :---------- | :---------------- | :--------------- | :------\n|\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/javascript/javascript-plain.svg\" alt=\"JavaScript\" title=\"JavaScript\" width=\"20px\" /\u003e| Javascript | [HyperDB JS][1] | [hyperdb-js][2] | `npm i hyperdb-js`\n|\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/php/php-plain.svg\" alt=\"PHP\" title=\"PHP\" width=\"20px\" /\u003e| PHP | [HyperDB PHP][3] | [hyperdb-php][4] | `composer require afaanbilal/hyperdb-php`\n|\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/go/go-original-wordmark.svg\" alt=\"Go\" title=\"Go\" width=\"20px\" /\u003e| Go | [HyperDB Go][5] | [hyperdb-go][6] | `go get -u github.com/AfaanBilal/hyperdb-go`\n|\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/python/python-plain.svg\" alt=\"Python\" title=\"Python\" width=\"20px\" /\u003e| Python | [HyperDB Py][7] | [hyperdb-py][8] | `pip install hyperdb-py`\n|\u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/rust/rust-plain.svg\" alt=\"Rust\" title=\"Rust\" width=\"20px\" /\u003e| Rust | [HyperDB Rust][9] | [hyperdb-rs][10] | `cargo add hyperdb-rs`\n\n[1]: https://github.com/AfaanBilal/hyperdb-js\n[2]: https://www.npmjs.com/package/hyperdb-js\n[3]: https://github.com/AfaanBilal/hyperdb-php\n[4]: https://packagist.org/packages/afaanbilal/hyperdb-php\n[5]: https://github.com/AfaanBilal/hyperdb-go\n[6]: https://pkg.go.dev/github.com/AfaanBilal/hyperdb-go\n[7]: https://github.com/AfaanBilal/hyperdb-py\n[8]: https://pypi.org/project/hyperdb-py\n[9]: https://github.com/AfaanBilal/hyperdb-rs\n[10]: https://crates.io/crates/hyperdb-rs\n\n---\n\n## CLI \u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/bash/bash-original.svg\" alt=\"Bash\" title=\"Bash\" width=\"50px\" style=\"float:right\" /\u003e\n\n[HyperDB CLI](https://github.com/AfaanBilal/hyperdb-cli) is a command line interface to interact with the HyperDB server.\n\n````\ndocker run --rm -it afaanbilal/hyperdb-cli -a http://host.docker.internal:8765\n````\n\n---\n\n## HTTP API Endpoints\n\n| Method | Path             | Auth? | Description\n| :----- | :--------------- | :---- | :-----------\n| GET    | /                | ⬜    | Version. Example: `[HyperDB v0.1.0 (https://afaan.dev)]`.\n| GET    | /ping            | ⬜    | Ping (returns `PONG`).\n| POST   | /auth            | ⬜    | Returns the generated JWT on success, otherwise `INVALID_CREDENTIALS`.\n| GET    | /has/`{key}`     | ✅    | Returns `YES` if `key` is present, otherwise `NO`.\n| GET    | /data/`{key}`    | ✅    | Returns the value for the `key` if present, otherwise `\"\"`.\n| POST   | /data/`{key}`    | ✅    | Sets the value for the `key` to the request body.\n| DELETE | /data/`{key}`    | ✅    | Deletes the `key` and any value associated with it. Returns `OK` on success.\n| GET    | /data            | ✅    | Get all stored data. Returns the stored data as a JSON string.\n| DELETE | /data            | ✅    | Delete all stored data. Returns `OK` on success.\n| GET    | /empty           | ✅    | Returns `YES` if the store is empty, otherwise `NO`.\n| POST   | /save            | ✅    | Persist store to file. Returns `OK` on success.\n| POST   | /reload          | ✅    | Reload store from file. Returns `OK` on success.\n| DELETE | /reset           | ✅    | Delete all stored data from memory and disk. Returns `OK` on success.\n\n### Authentication\n- **Generating JWT**: Post to `/auth` with headers `username` and `password`. Returns JWT on success.\n- **All auth required requests**: Add header `Auth` with the JWT as the value.\n- **Token lifetime**: 6 hours.\n- **Token invalid or expired**: `AUTH_FAILED` is returned as response.\n\n---\n\n## Benchmarks\nLoad test using [autocannon](https://github.com/mcollina/autocannon).\n\n### Reading Data (`50,675.2 requests per second`)\n\n`$ autocannon -c 100 -d 30 -p 10 http://127.0.0.1:8765/data/hello`\n\n````\nRunning 30s test @ http://127.0.0.1:8765/data/hello\n100 connections with 10 pipelining factor\n\n┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐\n│ Stat    │ 2.5%  │ 50%   │ 97.5% │ 99%   │ Avg      │ Stdev   │ Max   │\n├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤\n│ Latency │ 15 ms │ 17 ms │ 36 ms │ 39 ms │ 19.39 ms │ 6.59 ms │ 72 ms │\n└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘\n┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐\n│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg     │ Stdev   │ Min     │\n├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤\n│ Req/Sec   │ 46559   │ 46559   │ 51039   │ 53791   │ 50675.2 │ 1887.99 │ 46542   │\n├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤\n│ Bytes/Sec │ 5.63 MB │ 5.63 MB │ 6.18 MB │ 6.51 MB │ 6.13 MB │ 229 kB  │ 5.63 MB │\n└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘\n\nReq/Bytes counts sampled once per second.\n# of samples: 30\n\n1521k requests in 30.27s, 184 MB read\n````\n\n### Writing Data (`49,797.34 requests per second`)\n\n`$ autocannon -c 100 -d 30 -p 10 -b WORLD -m POST http://127.0.0.1:8765/data/hello`\n\n````\nRunning 30s test @ http://127.0.0.1:8765/data/hello\n100 connections with 10 pipelining factor\n\n┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐\n│ Stat    │ 2.5%  │ 50%   │ 97.5% │ 99%   │ Avg      │ Stdev   │ Max   │\n├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤\n│ Latency │ 14 ms │ 17 ms │ 36 ms │ 38 ms │ 19.74 ms │ 6.95 ms │ 94 ms │\n└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘\n┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐\n│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg      │ Stdev   │ Min     │\n├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤\n│ Req/Sec   │ 43647   │ 43647   │ 49951   │ 52479   │ 49797.34 │ 1497.74 │ 43630   │\n├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤\n│ Bytes/Sec │ 5.28 MB │ 5.28 MB │ 6.05 MB │ 6.35 MB │ 6.03 MB  │ 181 kB  │ 5.28 MB │\n└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘\n\nReq/Bytes counts sampled once per second.\n# of samples: 30\n\n1495k requests in 30.26s, 181 MB read\n````\n\n---\n\n## Test\n`$ cargo test`\n\n````\n    Finished test [unoptimized + debuginfo] target(s) in 0.11s\n     Running unittests src\\main.rs (target\\debug\\deps\\hyperdb-11cc96418dbb140b.exe)\n\nrunning 12 tests\ntest hyper::tests::has_file ... ok\ntest hyper::tests::key_not_present ... ok\ntest hyper::tests::not_empty ... ok\ntest hyper::tests::it_clears ... ok\ntest hyper::tests::key_is_deleted ... ok\ntest hyper::tests::len_not_zero ... ok\ntest hyper::tests::key_is_stored ... ok\ntest hyper::tests::start_from_empty ... ok\ntest hyper::tests::start_len_zero ... ok\ntest hyper::tests::value_is_stored ... ok\ntest hyper::tests::saves_to_file ... ok\ntest hyper::tests::reloads_from_file ... ok\n\ntest result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s\n````\n\n---\n\n## Contributing\nAll contributions are welcome. Please create an issue first for any feature request\nor bug. Then fork the repository, create a branch and make any changes to fix the bug\nor add the feature and create a pull request. That's it!\nThanks!\n\n---\n\n## License\n**HyperDB** is released under the MIT License.\nCheck out the full license [here](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafaanbilal%2Fhyperdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafaanbilal%2Fhyperdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafaanbilal%2Fhyperdb/lists"}