{"id":27180026,"url":"https://github.com/ats1999/dakia","last_synced_at":"2025-04-09T14:06:13.638Z","repository":{"id":268281023,"uuid":"673470753","full_name":"ats1999/dakia","owner":"ats1999","description":"A high-performance API gateway built with Rust, designed for low-latency request processing. Dakia supports dynamic configuration updates, allowing seamless changes to routing rules, authentication settings, rate limits, and other gateway policies without requiring a restart.","archived":false,"fork":false,"pushed_at":"2025-03-18T03:35:29.000Z","size":13205,"stargazers_count":82,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-18T04:29:36.781Z","etag":null,"topics":["api","dakia","gate-way","http","load-balancer","proxy","rust","tcp","udp","websocket"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ats1999.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}},"created_at":"2023-08-01T17:42:40.000Z","updated_at":"2025-03-18T03:35:33.000Z","dependencies_parsed_at":"2024-12-15T19:27:35.677Z","dependency_job_id":"22cf6538-df69-4543-bb4e-f501ea8a8d6e","html_url":"https://github.com/ats1999/dakia","commit_stats":null,"previous_names":["ats1999/dakia"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ats1999%2Fdakia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ats1999%2Fdakia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ats1999%2Fdakia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ats1999%2Fdakia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ats1999","download_url":"https://codeload.github.com/ats1999/dakia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054224,"owners_count":21039952,"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":["api","dakia","gate-way","http","load-balancer","proxy","rust","tcp","udp","websocket"],"created_at":"2025-04-09T14:02:17.282Z","updated_at":"2025-04-09T14:06:13.616Z","avatar_url":"https://github.com/ats1999.png","language":"Rust","readme":"\u003c!--\n```text\n_______\n\\  ___ `'.                    .          .--.\n ' |--.\\  \\                 .'|          |__|\n | |    \\  '              .'  |          .--.\n | |     |  '     __     \u003c    |          |  |     __\n | |     |  |  .:--.'.    |   | ____     |  |  .:--.'.\n | |     ' .' / |   \\ |   |   | \\ .'     |  | / |   \\ |\n | |___.' /'  `\" __ | |   |   |/  .      |  | `\" __ | |\n/_______.'/    .'.''| |   |    /\\  \\     |__|  .'.''| |\n\\_______|/    / /   | |_  |   |  \\  \\         / /   | |_\n              \\ \\._,\\ '/  '    \\  \\  \\        \\ \\._,\\ '/\n               `--'  `\"  '------'  '---'       `--'  `\"\n```\n--\u003e\n\n\u003c!-- canva logo url -\u003e https://www.canva.com/design/DAGZAdY1d9c/YCHWZRD78H5j0CAWaaF6gw/edit --\u003e\n\n![1](https://github.com/user-attachments/assets/9348db35-f589-4dc4-9a03-24924d6d8f2d)\n\n# Dakia: An API gateway tailored for modern distributed systems\n\n**Dakia** is a high-performance API gateway built with Rust, designed for low-latency request processing. Dakia supports **dynamic configuration updates**, allowing seamless changes to routing rules, authentication settings, rate limits, and other gateway policies **without requiring a restart**. This ensures high availability and adaptability in rapidly evolving microservices architectures. Additional features include request routing, load balancing, caching, and fault tolerance, making it a robust solution for modern distributed systems.\n\n\u003e It's under construction 🦺 🪚 🏗️ 🚧 🔨\n\n## Feature highlights\n\n- **Configurable**: Easily manage API configurations using various formats like YAML, JSON, and HTTP API calls.\n- **Extensible**: Add new functionality with support for custom middleware and plugins, written in any programming language (Rust, Java, C++, etc.).\n- **Fully Programmable**: Tailor the API Gateway to your specific needs with custom plugins and middleware in multiple languages.\n- **Zero Downtime Upgrades**: Perform upgrades and restarts without affecting the availability of your services.\n- **Dynamic Middleware**: Add, remove, or modify middleware on the fly without disrupting service.\n- **Request and Response Management**: Modify requests before they reach the upstream or read/write responses to meet your application's needs.\n- **Real-Time Configuration**: Modify your gateway configuration in real time with no downtime, using HTTP API calls.\n\nDakia ensures your services stay performant, reliable, and highly customizable, giving you full control.\n\n## Limitations ☠️\n\n\u003e These limitations will be addressed over time as we continue to improve the dakia.\n\n- Currently supports only `UTF-8` character encoding.\n- Only the round-robin load balancing algorithm is available at the moment.\n- IPv6 addresses are not supported at this time; only IPv4 is supported.\n- Currently it supports only `HTTP` protocol\n\n## Reasons to use `Dakia`\n\n- **Security** - Built with Rust, Dakia ensures enhanced memory safety and reduces vulnerabilities compared to services written in C/C++.\n- **Performance** - Powered by [pingora](https://github.com/cloudflare/pingora), a battle tested protocol implemention, as it has been serving more than **_40M+_** internet requests per second for more than a few years.\n- **Customization** - You need ultimate customization, you can configure, extend and even further program in multiple languages.\n- **Asynchronous and Multi-Threaded** – Dakia is designed to handle tasks concurrently, ensuring efficient and high-performance request processing by default.\n\n**_Benchmark of Dakia on a Local Machine (8 CPU Cores, 16GB RAM)_**\n\n```txt\nPerformance test: 10s @ http://0.0.0.0:80\n  - 1 thread, 100 concurrent connections\n\n  Thread Statistics:\n    - Average Latency: 699.64µs (±125.23µs)\n    - Maximum Latency: 3.77ms\n    - Requests per Second: 76.09k (±3.98k)\n    - Peak Requests per Second: 81.89k\n\n  Total Requests: 764,590 in 10.10s\n  Data Transferred: 80.94MB\n  Throughput: 75,678.12 requests/sec\n  Transfer Rate: 8.01MB/sec\n```\n\n## Architecture\n\n![flow](https://github.com/user-attachments/assets/581b8dd2-c313-4a38-85a1-fd1429104f6a)\n\n## Getting started\n\n- See our [quick starting guide](/docs/quick_start.md)\n- See our [docs](/docs/README.md)\n\n## 📊 Progress Tracker\n\n[Dakia Configuration Sample](https://github.com/ats1999/dakia/blob/main/docs/config.sample.yaml)\n\n| Task                                                                                                                                                                   | Status         |\n| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |\n| Configurable(YAML + JSON)                                                                                                                                              | Done ✅        |\n| Virtual Host                                                                                                                                                           | Done ✅        |\n| Wild card host matching ([Wiki](https://en.wikipedia.org/wiki/Matching_wildcards))                                                                                     | Done ✅        |\n| Wild card route ([Wiki](https://en.wikipedia.org/wiki/Matching_wildcards))                                                                                             | Done ✅        |\n| Proxy                                                                                                                                                                  | Done ✅        |\n| HTTP Protocol Suport                                                                                                                                                   | Done ✅        |\n| [Upstream SSL support](https://en.wikipedia.org/wiki/Server_Name_Indication)                                                                                           | Done ✅        |\n| Load Balancer                                                                                                                                                          | Done ✅        |\n| Filter (MongoDB like query support)                                                                                                                                    | Done ✅        |\n| Dakia CLI                                                                                                                                                              | Done ✅        |\n| [PCRE](https://www.pcre.org/) support for pattern matching                                                                                                             | Done ✅        |\n| Extension, Interceptor \u0026 Interceptions Phases (Inbuilt Rust)                                                                                                           | Done ✅        |\n| Declarative filter support [(Allows to use MongoDB like query syntax for filtering HTTP requests)](https://github.com/ats1999/dakia/blob/main/docs/config.sample.yaml) | Done ✅        |\n| [FFI](https://en.wikipedia.org/wiki/Foreign_function_interface) Support for interceptor                                                                                | Pending        |\n| [UDS Support](https://man7.org/linux/man-pages/man7/unix.7.html)                                                                                                       | Pending        |\n| Load Balancer Algorithms (Least connection, Least response time, IP/Url hash)                                                                                          | Pending        |\n| SSL Support                                                                                                                                                            | Pending        |\n| Certbot Integration                                                                                                                                                    | Pending        |\n| Controller (API to manage dakia over REST)                                                                                                                             | Done ✅        |\n| TCP/UDP Proxy                                                                                                                                                          | Pending        |\n| Web Socket Proxy                                                                                                                                                       | Pending        |\n| gRPC Proxy                                                                                                                                                             | Pending        |\n| Docs                                                                                                                                                                   | In-Progress 🚀 |\n\n### Load Balancing Algorithm\n\n| Algorithm           | Status  |\n| ------------------- | ------- |\n| Round robin         | Done ✅ |\n| Least connection    | Pending |\n| Least response time | Pending |\n| IP/URL hash         | Pending |\n\n### Interceptor\n\n| Interceptor                                 | Description                                                                                                                                                        | Status  |\n| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |\n| Server Version                              | Append server version into http response header. E.g `Dakia/1.0.1`                                                                                                 | Done ✅ |\n| Request ID                                  | Append request id(UUID) into upstream request and downstream response headers.                                                                                     | Done ✅ |\n| Basic Auth                                  | [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)                                                                                  | Done ✅ |\n| Basic Auth ( External Storage Integration ) | Use external storage for storing user name and password, support hashing.                                                                                          | Pending |\n| JWT Auth                                    | [Support JWT authentication](https://jwt.io/)                                                                                                                      | Pending |\n| Use File                                    | Read data from a file and return its contents as the response. If the file is not found, respond with a 404 error.                                                 | Done ✅ |\n| Use File ( Path rewrite support )           | Allow to rewrite HTTP request path                                                                                                                                 | Pending |\n| Try File                                    | Read data from a file and return its contents as the response. If the file is not found, make request to upstream, write response to file and then serve response. | Pending |\n| Controller                                  | Allow to update dakia configuration in **_YAML/JSON_** format via REST endpoint without restarting the gateway                                                     | Done ✅ |\n| Rate Limiter                                | Token bucket rate limiter algorithm                                                                                                                                | Done ✅ |\n| Prometheus Integration                      | Expose server interval metric using prometheus (New TCP connection, Reused TCP connection, TCP connection failure, etc)                                            | Pending |\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fats1999%2Fdakia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fats1999%2Fdakia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fats1999%2Fdakia/lists"}