{"id":28000745,"url":"https://github.com/sysprog21/cserv","last_synced_at":"2025-05-08T23:54:33.649Z","repository":{"id":40606729,"uuid":"370527363","full_name":"sysprog21/cserv","owner":"sysprog21","description":"An event-driven and non-blocking web server","archived":false,"fork":false,"pushed_at":"2023-08-01T03:38:03.000Z","size":67,"stargazers_count":82,"open_issues_count":1,"forks_count":27,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-08T23:54:28.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/sysprog21.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}},"created_at":"2021-05-25T01:15:15.000Z","updated_at":"2025-03-27T06:23:39.000Z","dependencies_parsed_at":"2023-02-09T21:00:58.014Z","dependency_job_id":null,"html_url":"https://github.com/sysprog21/cserv","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/sysprog21%2Fcserv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fcserv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fcserv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fcserv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysprog21","download_url":"https://codeload.github.com/sysprog21/cserv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166484,"owners_count":21864471,"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":"2025-05-08T23:54:33.284Z","updated_at":"2025-05-08T23:54:33.642Z","avatar_url":"https://github.com/sysprog21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cserv\n\n`cserv` is an event-driven and non-blocking web server. It ideally has one\nworker process per cpu or processor core, and each one is capable of handling\nthousands of incoming network connections per worker. There is no need to create\nnew threads or processes for each connection.\n\nI/O multiplexing is achieved using [epoll](http://man7.org/linux/man-pages/man7/epoll.7.html).\n\n## Features\n\n* Single-threaded, non-blocking I/O based on event-driven model\n* Multi-core support with processor affinity\n* Implement load balancing among processes\n* Hook and optimize blocking socket system calls\n* Facilitate coroutines for fast task switching\n* Efficient timeout handling\n* Builtin memcache service \n\n## High-level Design\n\nProcess Model\n```text\n    master process \u003c-----\u003e worker processes\n\n                    +--- non-blocking, event-driven processing engine ---+\n                    |                                                    |\n    TCP traffic --\u003e | HTTP state machine \u003c-+--\u003e static content           |\n                    |                      |                             |\n                    |                      +--\u003e cache                    |\n                    |                      |                             |\n                    |                      \\--\u003e logger                   |\n                    +----------------------------------------------------+\n```\n\n## Build from Source\n\nAt the moment, `cserv` supports Linux based systems with epoll system call.\nBuilding `cserv` is straightforward.\n```shell\n$ make\n```\n\n## Usage\n\nStart the web server.\n```shell\n$ ./cserv start\n````\n\nStop the web server.\n```shell\n$ ./cserv stop\n```\n\nCheck the configurations.\n```shell\n$ ./cserv conf\n```\n\nBy default the server accepts connections on port 8081, if you want to assign\nother port for the server, modify file `conf/cserv.conf` and restart the server.\n\n## License\n`cserv` is released under the MIT License. Use of this source code is governed\nby a MIT License that can be found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fcserv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysprog21%2Fcserv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fcserv/lists"}