{"id":34988884,"url":"https://github.com/knightchaser/mkvss-async","last_synced_at":"2026-05-25T05:01:47.838Z","repository":{"id":326501646,"uuid":"1105750449","full_name":"KnightChaser/mkvss-async","owner":"KnightChaser","description":"High-Performance asynchronous Key-Value store server written in Rust. (From KnightChaser/mkvss)","archived":false,"fork":false,"pushed_at":"2025-11-28T07:39:55.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T17:17:02.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/KnightChaser.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,"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-11-28T05:25:14.000Z","updated_at":"2025-11-28T07:40:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/KnightChaser/mkvss-async","commit_stats":null,"previous_names":["knightchaser/mkvss-async"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/KnightChaser/mkvss-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightChaser%2Fmkvss-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightChaser%2Fmkvss-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightChaser%2Fmkvss-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightChaser%2Fmkvss-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KnightChaser","download_url":"https://codeload.github.com/KnightChaser/mkvss-async/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightChaser%2Fmkvss-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33461090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T02:24:28.008Z","status":"ssl_error","status_checked_at":"2026-05-25T02:23:23.339Z","response_time":57,"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":"2025-12-27T01:47:34.640Z","updated_at":"2026-05-25T05:01:47.832Z","avatar_url":"https://github.com/KnightChaser.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkvss-async\n\n\u003e High-Performance Async Key-Value Store Server written in Rust. (Asynchronous implementation of [`KnightChaser/mkvss`](https://github.com/KnightChaser/mkvss.git).)\n\n`mkvss-async` is an educational implementation of a non-blocking, multi-threaded REST API server.\n\nUnlike standard web projects that rely on frameworks like Axum or Actix, this project implements minimum HTTP/1.1 protocol parser, Routing logic, and Connection Handling manually. It demonstrates the raw power of Rust's `async/await` ecosystem by achieving 85k+ Requests Per Second(RPS) on local benchmarks.\n\nAPI references and other usages are exactly same with the original repository; [`KnightChaser/mkvss`](https://github.com/KnightChaser/mkvss.git).\n\n## Architecture\n\nThe server has evolved from a synchronous \"Thread-Per-Request\"(`mkvss`) model to a modern Asynchronous Event Loop architecture(`mkvss-async`).\n\n### Core Components\n* Runtime: [`Tokio`](https://tokio.rs/) (Multi-threaded Work Stealing Scheduler).\n* Database: [`SQLx`](https://github.com/launchbadge/sqlx) (Async SQLite with WAL mode).\n* Memory Management: extensive use of `Arc\u003cstr\u003e` for zero-copy string passing.\n* Protocol: Custom implementation of `AsyncBufRead` for parsing HTTP headers and bodies without blocking.\n\n### The \"Async\" Difference\nInstead of spawning a heavy OS thread for every connection, `mkvss-async` spawns a lightweight Tokio Task.\n1.  **I/O is Non-Blocking:** When the database is queried, the CPU immediately switches to handling the next incoming HTTP request.\n2.  **Low Overhead:** Thousands of connections can be handled by a few OS threads.\n\n## Getting started\n\n### Prerequisites\n* Rust (latest stable)\n* SQLite3 (bundled)\n\n### Installation \u0026 Run\n```bash\n# Clone the repository\ngit clone https://github.com/KnightChaser/mkvss-async.git\ncd mkvss-async\n\n# Run the server (Initializes DB automatically)\ncargo run --release\n```\n\n## Performance\n\nBenchmarked using `oha` (Oha HTTP Load Generator) on my PC:\n\n- Concurrency: 50\n- Duration: 10 sec\n- Database: SQLite in WAL mode\n\n\u003cimg width=\"783\" height=\"1070\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2799ff9d-b2f8-48b4-8cce-96d405527b27\" /\u003e\n\u003cbr\u003e\n\n|                | `mkvss`   | `mkvss-async` | Improvement            |\n|----------------|-----------|---------------|------------------------|\n| Throughput     | 24,257    | 85,925        | 3.54x higher           |\n| Avg. Latency   | 2.0562ms  | 0.5790ms      | 3.54x faster           |\n| P99 Latency    | 4.9463ms  | 1.6252ms      | ~ 3x faster            |\n| P99.9 Latency  | 6.0222ms  | 2.6841ms      | ~ 2.24x faster         |\n| P99.99 Latency | 7.0840ms  | 3.7726ms      | ~ 1.88x faster         |\n| Success rate   | 99.99093% | 99.99581%     | 2.16x less error-prone |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknightchaser%2Fmkvss-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknightchaser%2Fmkvss-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknightchaser%2Fmkvss-async/lists"}