{"id":13415648,"url":"https://github.com/3541/short-circuit","last_synced_at":"2026-01-18T03:15:23.362Z","repository":{"id":38012233,"uuid":"309254630","full_name":"3541/short-circuit","owner":"3541","description":"High-performance web server for Linux, built on io_uring.","archived":false,"fork":false,"pushed_at":"2024-05-04T02:15:19.000Z","size":885,"stargazers_count":20,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"trunk","last_synced_at":"2024-07-31T21:54:19.473Z","etag":null,"topics":["http","io-uring","iouring","linux","server","uring","web"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3541.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":"2020-11-02T04:09:53.000Z","updated_at":"2024-02-12T08:03:47.000Z","dependencies_parsed_at":"2023-12-08T11:27:00.879Z","dependency_job_id":"6053f9d6-2438-4d79-b1fa-6ce5b99edf01","html_url":"https://github.com/3541/short-circuit","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/3541%2Fshort-circuit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3541%2Fshort-circuit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3541%2Fshort-circuit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3541%2Fshort-circuit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3541","download_url":"https://codeload.github.com/3541/short-circuit/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663348,"owners_count":20327299,"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":["http","io-uring","iouring","linux","server","uring","web"],"created_at":"2024-07-30T21:00:51.070Z","updated_at":"2026-01-18T03:15:23.345Z","avatar_url":"https://github.com/3541.png","language":"C","funding_links":[],"categories":["Software"],"sub_categories":[],"readme":"# Short Circuit\n\n[![.github/workflows/build.yml](https://github.com/3541/short-circuit/actions/workflows/build.yml/badge.svg)](https://github.com/3541/short-circuit/actions/workflows/build.yml)\n\nA lightweight and performant web server for Linux, built on top of io_uring. Capable of ~~60,000~~\n~~80,000~~ ~~120,000~~ ~~135,000 requests per second on static files~~. Suffice it to say, it is\nfast, and getting faster. Actual, more rigorous benchmarks will come once the project gets closer to\ncompletion.\n\n[io_uring](https://kernel.dk/io_uring.pdf?source=techstories.org) is a new asynchronous I/O system\non Linux which offers a significant performance advantage (and, subjectively, a much nicer\ninterface) over its competitors (POSIX `aio`, `epoll`, etc...).\n\n_NOTE_: Most development lately has been on the [co branch](https://github.com/3541/short-circuit/tree/co),\nwhich converts the server to use a coroutine-based IO model. It isn't yet up to feature parity with\n`trunk`, but it is likely to supersede the main branch eventually.\n\n## Building\nDependencies:\n* A C compiler supporting C11.\n* Meson 0.55 or later.\n* [liburing](https://github.com/axboe/liburing).\n* Linux 5.7 or later.\n\nTo build, first ensure all submodules have been downloaded (`git submodule update --init\n--recursive`), and then run `meson setup \u003cBUILDDIR\u003e` to configure the build system in `BUILDDIR`.\nAlternatively, a script to generate various build configurations is provided (`./configure`).\n\nSome versions of Meson (before 0.56) may refuse to pull in transitive dependencies, and produce error messages of\nthe form `WARNING: Dependency highwayhash not found but it is available in a sub-subproject.`. If\nthis occurs, simply run the command `meson wrap promote\nsubprojects/a3/subprojects/highwayhash.wrap`.\n\nAfter, run `meson compile -C \u003cBUILDDIR\u003e` to build the project. This produces a binary `sc`, which\ncan be run directly. By default, the server listens on port `8000`. `sc --help` will show the\navailable options and parameters.\n\nNote: on most Linux distributions, you may see warnings about the locked memory and open file\nresource limits. See [here](#queue-size) for more information.\n\n## Notes and disclaimer\nThis is _very_ new software, which is nowhere near feature complete, let alone stable. There are\ncritical bugs, known and unknown. At this time it should not under any circumstances be used in\nproduction or for anything which matters even a little bit.\n\n### Queue size\nOn most distributions, the locked memory limit is too low to open an `io_uring` queue of the size\nthat Short Circuit does by default. This can be fixed either (preferably) by increasing this limit\n(usually in `/etc/security/limits.conf`), or by lowering `URING_ENTRIES` in `config.h`. It probably\nneeds to be at least halved to work with the default limit.\n\n### Open file limit\nTo serve static files, Short Circuit uses `IO_URING_OP_PIPE`. For performance purposes, these pipes\nare cached across requests. As a result, under high load (particularly when it is generated by many\nsimultaneous connections), many systems will hit the open file limit. This can be fixed by raising\nthe open file limit, or by decreasing `CONNECTION_POOL_SIZE` in `config.h`. The former can be done\nin `/etc/security/limits.conf`. A good number is a bit over three times the maximum expected number\nof concurrent connections, since each connection requires an open file for the socket and two for\nthe pipe.\n\n### `ulimit`s\nBoth of these only require that the hard limit be changed, as Short Circuit will automatically raise\nits own soft limits at runtime.\n\n## Licensing\n\nShort Circuit is licensed under the GNU Affero GPL, the terms of which are described\n[here](https://github.com/3541/short-circuit/blob/trunk/LICENSE).\n\nShort Circuit depends on the following other projects:\n\n### liba3\n[liba3](https://github.com/3541/liba3) is licensed under the [3-clause BSD\nlicense](https://github.com/3541/liba3/blob/trunk/LICENSE).\n\n`liba3` also links with and otherwise uses other software projects, as detailed\n[here](https://github.com/3541/liba3/blob/trunk/README.md#licensing).\n\n### liburing\n[liburing](https://github.com/axboe/liburing) is licensed under the [MIT\nlicense](https://github.com/axboe/liburing/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3541%2Fshort-circuit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3541%2Fshort-circuit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3541%2Fshort-circuit/lists"}