{"id":15047919,"url":"https://github.com/wenzhang-dev/httpserver","last_synced_at":"2025-04-10T01:10:34.189Z","repository":{"id":40665895,"uuid":"228597736","full_name":"wenzhang-dev/HttpServer","owner":"wenzhang-dev","description":"A webserver developed using modern c++","archived":false,"fork":false,"pushed_at":"2019-12-19T08:15:01.000Z","size":1802,"stargazers_count":47,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T01:10:29.449Z","etag":null,"topics":["cplusplus-11","http","linux","raii","webserver"],"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/wenzhang-dev.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":"2019-12-17T11:03:59.000Z","updated_at":"2025-04-03T04:55:52.000Z","dependencies_parsed_at":"2022-07-14T05:00:34.326Z","dependency_job_id":null,"html_url":"https://github.com/wenzhang-dev/HttpServer","commit_stats":null,"previous_names":["wenzhang-dev/httpserver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenzhang-dev%2FHttpServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenzhang-dev%2FHttpServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenzhang-dev%2FHttpServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wenzhang-dev%2FHttpServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wenzhang-dev","download_url":"https://codeload.github.com/wenzhang-dev/HttpServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"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":["cplusplus-11","http","linux","raii","webserver"],"created_at":"2024-09-24T21:06:06.310Z","updated_at":"2025-04-10T01:10:34.169Z","avatar_url":"https://github.com/wenzhang-dev.png","language":"C++","readme":"HttpServer Project\n==========\nA webserver developed using modern c++\u003cbr\u003e\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n# Introduction\n该项目参考muduo实现了一个多线程静态的web服务器。HttpServer采用c++11编写，支持Http中head、post和get\u003cbr\u003e\n请求，使用epoll ET边沿触发来提高实时性。HttpServer支持短连接、长连接，并采用timerfd实现了应用层心跳。\u003cbr\u003e\n\n# Environment\nUbuntu 16.04 i5-8G\u003cbr\u003e\ngcc-5.4 g++-5.4\u003cbr\u003e\n\n# Usage\n* 编译\u003cbr\u003e\n    make -j4\u003cbr\u003e\n    cd webbench \u0026\u0026 make\u003cbr\u003e\n* 运行\u003cbr\u003e\n    ./run.sh\u003cbr\u003e\n    ./webbench.sh\n    \n# Architecture\n该项目采用经典的reactor+NIO+thread pool+epoll ET模型设计而成。利用多核的优势，可显著提升实时响应能力。\u003cbr\u003e\n![architecture](pic/1.png)\n\n# Performance Test\n使用linux压测工具webbench，分别测试10k连接下，keepAlive和non-keepAlive请求。\u003cbr\u003e\n60s本地压力测试，响应能力为15 million requests/min, 传输速度为34.64 M/s 。\u003cbr\u003e\n60s同网段内测试，响应能力为0.75 million requests/min, 传输速度为1.67 M/s。\u003cbr\u003e\n\n# Others\n* 代码统计\u003cbr\u003e\n![code](pic/code.png)\n\n* 内存泄露检测\u003cbr\u003e\n使用valgrid中memcheck工具，检测HttpServer内存泄露情况。\u003cbr\u003e\n测试方法: ./memcheck.sh\u003cbr\u003e\n\n* 资源监控\u003cbr\u003e\n使用top命令和/proc/${PID}/中内省，检测HttpServer运行时CPU利用率，内存以及文件描述符使用情况。\u003cbr\u003e\n使用方法: ./monitor.sh\u003cbr\u003e\n  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenzhang-dev%2Fhttpserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwenzhang-dev%2Fhttpserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwenzhang-dev%2Fhttpserver/lists"}