{"id":13836667,"url":"https://github.com/rsms/afcgi","last_synced_at":"2025-03-22T10:31:17.604Z","repository":{"id":64286896,"uuid":"432360","full_name":"rsms/afcgi","owner":"rsms","description":"Asynchronous/multiplexing FastCGI for nginx (incl. ref server implementation)","archived":false,"fork":false,"pushed_at":"2009-12-13T17:19:05.000Z","size":97,"stargazers_count":102,"open_issues_count":1,"forks_count":10,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-15T21:17:04.117Z","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/rsms.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":"2009-12-13T14:00:14.000Z","updated_at":"2024-08-05T14:37:18.000Z","dependencies_parsed_at":"2023-01-15T08:15:52.519Z","dependency_job_id":null,"html_url":"https://github.com/rsms/afcgi","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/rsms%2Fafcgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fafcgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fafcgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsms%2Fafcgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsms","download_url":"https://codeload.github.com/rsms/afcgi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198350,"owners_count":20414444,"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":"2024-08-04T15:00:52.159Z","updated_at":"2025-03-22T10:31:17.305Z","avatar_url":"https://github.com/rsms.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# afcgi\n\nAsynchronous FastCGI.\n\nPrimarily a modified version of the [Nginx FastCGI module](http://wiki.nginx.org/NginxHttpFcgiModule) which implements multiplexing of connections, allowing a single FastCGI server to handle many concurrent requests.\n\nThis paves the way for long-lived connections in web apps without wasting resources -- i.e. optimally you only need to run one server process per CPU (or one server with one thread per CPU) instead of one process per request.\n\n## Files\n\n- `nginx/` contains the modified `ngx_http_fastcgi_module.c` along with a \"prefix\" (conf, logs, etc) for running a test server.\n\n- `servers/` contains a set of asynchronous FastCGI server implementations, most notably the original libevent-based server written with the purpose to test afcgi.\n\n[\u003cimg src=\"http://hunch.se/s/cx/e1rg8i8bkgwks.png\" width=\"500\"\u003e](http://hunch.se/s/cx/e1rg8i8bkgwks.png)\n\n## Building\n\n### Nginx module\n\nThe nginx module is built by *replacing* the original `ngx_http_fastcgi_module.c`:\n\n\twget http://sysoev.ru/nginx/nginx-0.8.29.tar.gz\n\ttar xzf nginx-0.8.29.tar.gz\n\tcd nginx-0.8.29/src/http/modules\n\tmv ngx_http_fastcgi_module.c ngx_http_fastcgi_module.c.dist\n\tcp /path/to/afcgi/nginx/src/http/modules/ngx_http_fastcgi_module.c .\n\tcd ../../..\n\t./configure\n\tmake\n\nThis module has been developed for and tested with nginx version 0.8.29 and is still in an experimental stage. No warranties, no guarantees -- use at own risk ;)\n\n### Server reference implementation\n\nThe FCGI server reference implementation in `servers/afcgitest` is built by using regular make and linking against [libevent](http://monkey.org/~provos/libevent/):\n\n\tcd /path/to/afcgi/servers/afcgitest\n\tmake\n\t./afcgitest 127.0.0.1:5000\n\n\u003e The last line assumes a FastCGI client (i.e. nginx) is connecting to port `5000` on `127.0.0.1`.\n\nAt the moment the `Makefile` is prepared for Mac OS X and contains a few lines which will not work in other environments. Simply remove or comment-out these lines when building on another platform:\n\n\t# If Mac OS X:\n\tCFLAGS += -arch i386\n\tLDFLAGS += -arch i386\n\nbecomes:\n\n\t# If Mac OS X:\n\t#CFLAGS += -arch i386\n\t#LDFLAGS += -arch i386\n\n\u003e **OS X users:** This assumes libevent is built for the i386 architecture. Your libevent library might use another architecture and then you should change the `-arch` argument value to match the architecture of libevent.\n\n## License \u0026 redistribution\n\nMost parts of this software is licensed under the MIT license (see the `LICENSE` file for details) while the nginx module is licensed under the nginx license (details in the file `nginx/LICENSE`).\n\nIn short; you are free to use this software for commercial and non-commercial applictions as long as the license(s) and copyright notice(s) are properly reproduced. Read the LICENSEs files for details.\n\n## Authors\n\n- Rasmus Andersson \u003chttp://hunch.se/\u003e\n\n- Igor Sysoev (author of the original, synchronous fastcgi module)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fafcgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsms%2Fafcgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsms%2Fafcgi/lists"}