{"id":18010852,"url":"https://github.com/yokawasa/vs_httpd","last_synced_at":"2025-10-28T10:40:55.021Z","repository":{"id":888472,"uuid":"637550","full_name":"yokawasa/vs_httpd","owner":"yokawasa","description":"Very Simple HTTP Server that can deliver static files very fast.","archived":false,"fork":false,"pushed_at":"2017-01-26T00:56:42.000Z","size":15,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T17:06:03.719Z","etag":null,"topics":["c","high-performance","http","http-server","libevent","web-server"],"latest_commit_sha":null,"homepage":"","language":"C","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/yokawasa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2010-04-29T05:18:54.000Z","updated_at":"2023-01-21T20:38:05.000Z","dependencies_parsed_at":"2022-08-16T11:20:28.513Z","dependency_job_id":null,"html_url":"https://github.com/yokawasa/vs_httpd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yokawasa/vs_httpd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Fvs_httpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Fvs_httpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Fvs_httpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Fvs_httpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yokawasa","download_url":"https://codeload.github.com/yokawasa/vs_httpd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yokawasa%2Fvs_httpd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425557,"owners_count":26499031,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","high-performance","http","http-server","libevent","web-server"],"created_at":"2024-10-30T02:15:33.454Z","updated_at":"2025-10-28T10:40:54.993Z","avatar_url":"https://github.com/yokawasa.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vs_httpd\n\nVery Simple HTTP server that can deliver static files very fast\n\n## Install Prerequisiste Packages and Build\n\nPlease install Apache Portable Runtime (apr) core \u0026 its dev headers and Asynchronous event notification library (libevent) core \u0026 its dev headers if not yet installed on your environment\n\n```\n# for Ubuntu,Debian apt users\nsudo apt-get install libapr1 libapr1-dev\nsudo apt-get install libevent-dev\n\n# for CentOS,Fedora,Oracle Linux,Red Hat Enterprise Linux\nsudo yum install apr apr-devel\nsudo yum install libevent-devel\n```\n\nOnce all prerequisite packages are installed, you're ready to build vs_httpd. Just simply exec make like this:\n\n```\n$ make clean  (only if you have an existing vs_httpd binary)\n    rm -f *.o vs_httpd\n$ make\n    gcc   -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1.0  -I/usr/include   -c -o vs_httpd.o vs_httpd.c\n    gcc vs_httpd.o  -L/usr/lib/x86_64-linux-gnu -lapr-1 -levent -o vs_httpd   \n```\n\n## Usage\n\nAssuming all required packages are installed and rightly configured, you're ready to run vs_httpd\n\n```\n$ vs_httpd -h\n\nUsage: vs_httpd [-a address] [-p port] [-d documentroot]\n               [-D] [-v] [-h]\nOptions:\n  -a address      : define server address (default: \"0.0.0.0\")\n  -p port         : define server port (default: 8080)\n  -d documentroot : define document root with full path (default: \"./\")\n  -D              : daemonize option 0-off,1-on (default: 0)\n  -v              : verbose option 0-off,1-on (default: 0)\n  -h              : list available command line options (this page)\n```\n\nFor examples, you can run vs_httpd: \n```\n# Running with documentroot, and verbose  (default port: 8080)\n./vs_httpd -d /tmp/pages -v\n# send test request\ncurl localhost:8080/index.html\n\n# Running with port, documentroot, and daemonize option\n./vs_httpd  -p 9999 -d /tmp/pages -D\n# send test request\ncurl localhost:9999/index.html\n```\n\n## Benchmark with apache bench (ab -n 1000 -c 10)\n\n### Apache/2.4.12\n```\nConcurrency Level:      10\nTime taken for tests:   0.274 seconds\nComplete requests:      1000\nFailed requests:        0\nTotal transferred:      286000 bytes\nHTML transferred:       40000 bytes\nRequests per second:    3649.66 [#/sec] (mean)\nTime per request:       2.740 [ms] (mean)\nTime per request:       0.274 [ms] (mean, across all concurrent requests)\nTransfer rate:          1019.34 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        0    0   0.2      0       2\nProcessing:     1    3   2.8      2      86\nWaiting:        0    1   2.7      1      84\nTotal:          1    3   2.8      2      86\n\nPercentage of the requests served within a certain time (ms)\n  50%      2\n  66%      3\n  75%      3\n  80%      3\n  90%      3\n  95%      3\n  98%      4\n  99%     10\n 100%     86 (longest request)\n```\n\n### vs_httpd\n```\nConcurrency Level:      10\nTime taken for tests:   0.194 seconds\nComplete requests:      1000\nFailed requests:        0\nTotal transferred:      102000 bytes\nHTML transferred:       40000 bytes\nRequests per second:    5149.70 [#/sec] (mean)\nTime per request:       1.942 [ms] (mean)\nTime per request:       0.194 [ms] (mean, across all concurrent requests)\nTransfer rate:          512.96 [Kbytes/sec] received\n\nConnection Times (ms)\n              min  mean[+/-sd] median   max\nConnect:        1    1   0.3      1       5\nProcessing:     0    1   0.3      1       5\nWaiting:        0    0   0.3      0       1\nTotal:          1    2   0.4      2       6\n\nPercentage of the requests served within a certain time (ms)\n  50%      2\n  66%      2\n  75%      2\n  80%      2\n  90%      2\n  95%      2\n  98%      2\n  99%      3\n 100%      6 (longest request)\n```\n\n\n## Issues\n\n* [Current Issues, bugs, and requests](https://github.com/yokawasa/vs_httpd/issues)\n\n## Change log\n\n* [Changelog](CHANGELOG.md)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/vs_httpd.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyokawasa%2Fvs_httpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyokawasa%2Fvs_httpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyokawasa%2Fvs_httpd/lists"}