haywire

所属分类:Node.js
开发工具:C
文件大小:1839KB
下载次数:0
上传日期:2020-12-06 06:48:31
上 传 者sh-1993
说明:  Haywire是一个用C编写的异步HTTP服务器框架,使用基于事件循环的libuv平台构建...
(Haywire is an asynchronous HTTP server framework written in C that s built using the event loop based libuv platform layer that node.js is built on top of.)

文件列表:
.travis.yml (231, 2016-11-30)
CMakeLists.txt (2287, 2016-11-30)
LICENSE.txt (11608, 2016-11-30)
benchmark (0, 2016-11-30)
benchmark\benchmark.sh (112, 2016-11-30)
benchmark\pipelined_get.lua (277, 2016-11-30)
benchmark\pipelined_get_headers.lua (525, 2016-11-30)
bin (0, 2016-11-30)
bin\win-bash (0, 2016-11-30)
bin\win-bash\GPL.txt (18009, 2016-11-30)
bin\win-bash\bash.exe (3313496, 2016-11-30)
bin\win-bash\cat.exe (15360, 2016-11-30)
bin\win-bash\cp.exe (20992, 2016-11-30)
bin\win-bash\cygwin1.dll (971080, 2016-11-30)
bin\win-bash\cygwinb19.dll (393728, 2016-11-30)
bin\win-bash\echo.exe (44032, 2016-11-30)
bin\win-bash\ls.exe (23552, 2016-11-30)
bin\win-bash\mkdir.exe (32768, 2016-11-30)
bin\win-bash\mv.exe (16384, 2016-11-30)
bin\win-bash\mvdir.exe (20480, 2016-11-30)
bin\win-bash\pwd.exe (2560, 2016-11-30)
bin\win-bash\rm.exe (65024, 2016-11-30)
bin\win-bash\uname.exe (57412, 2016-11-30)
bin\win-bash\win32gnu.dll (104448, 2016-11-30)
build.bat (103, 2016-11-30)
build.sh (2484, 2016-11-30)
clean.bat (40, 2016-11-30)
clean.sh (616, 2016-11-30)
common.cmake (2138, 2016-11-30)
common.gypi (7723, 2016-11-30)
compile_dependencies.sh (1498, 2016-11-30)
compile_make.sh (73, 2016-11-30)
compile_xcode.sh (166, 2016-11-30)
docs (0, 2016-11-30)
docs\benchmarking.md (489, 2016-11-30)
... ...

[![Join us on #haywire on Freenode](https://kiwiirc.com/buttons/chat.freenode.net/haywire.png)](https://kiwiirc.com/client/chat.freenode.net:+6697/#haywire) [![Build Status](https://travis-ci.org/haywire/haywire.svg?branch=master)](https://travis-ci.org/haywire/haywire) Haywire ======= Haywire is an asynchronous HTTP server framework written in C. The goal of Haywire is to learn how to create a server with a minimal feature set that can handle a high rate of requests and connections with as low of latency and resource usage as possible. Haywire uses the event loop based [libuv](https://github.com/joyent/libuv) platform layer that node.js is built on top of (also written in C). libuv abstracts IOCP on Windows and epoll/kqueue/event ports/etc. on Unix systems to provide efficient asynchronous I/O on all supported platforms. Haywire isn't very useful yet but I wanted to open source it from the very beginning. I started experimenting with a HTTP server for Dazzle queries and I decided I would split it into its own project. ## Features - Cross platform (Windows, Linux, OSX) - HTTP keep-alive - HTTP pipelining - Non-blocking I/O - SO_REUSEPORT multi-process and multi-threaded load balancing across CPU cores. ## Plans or Ideas - HTTP handler routing - SPDY support - Export an API that is easily consumable by other languages like on the JVM (Java, etc) and the CLR (C#, etc) ## Contributions Feel free to join in if you feel like helping progress Haywire. I'm open to new ideas and would love to work with some people instead of by myself! ## Dependencies ``` apt-get install git gcc make cmake automake autoconf libssl-dev libtool ``` ## Compiling on Linux ./make.sh ## Compiling on Mac OSX ``` brew install automake brew install libtool brew install openssl ./make.sh ``` ## Compiling on Windows These instructions are old but may still work. We need to make Windows support in `make.sh`. Open the Developer Command Prompt for Visual Studio build.bat ## Benchmarks Bare metal Rackspace instance Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz 20 physical cores #### Throughput ``` ../bin/wrk/wrk --script ./pipelined_get.lua --latency -d 5m -t 40 -c 760 http://server:8000 -- 32 Running 5m test @ http://server:8000 40 threads and 760 connections Thread Stats Avg Stdev Max +/- Stdev Latency 2.04ms 5.38ms 389.00ms 92.75% Req/Sec 233.38k 48.72k 458.99k 86.19% Latency Distribution 50% 1.26ms 75% 1.96ms 90% 4.09ms 99% 0.00us 2781077938 requests in 5.00m, 409.23GB read Requests/sec: 9,267,161.41 Transfer/sec: 1.36GB ``` #### Latency distribution with coordinated omission at 3.5 million requests/second ``` ../bin/wrk2/wrk --script ./pipelined_get.lua --latency -d 10s -t 80 -c 512 -R 3500000 http://server:8000 -- 32 Running 10s test @ http://server:8000 80 threads and 512 connections Thread Stats Avg Stdev Max +/- Stdev Latency 1.82ms 3.00ms ***.86ms 94.17% Req/Sec -nan -nan 0.00 0.00% Latency Distribution (HdrHistogram - Recorded Latency) 50.000% 1.18ms 75.000% 1.62ms 90.000% 2.34ms 99.000% 16.75ms 99.900% 33.12ms 99.990% 44.70ms 99.999% 52.99ms 100.000% ***.89ms ----system---- ----total-cpu-usage---- ------memory-usage----- --io/total- -dsk/total- -net/total- ---system-- -pkt/total- ----tcp-sockets---- time |usr sys idl wai hiq siq| used buff cach free| read writ| read writ| recv send| int csw |#recv #send|lis act syn tim clo 03-12 18:58:10| 0 0 99 0 0 0| 712M 95.3M 1203M 124G|0.05 0.22 | 684B 10k| 0 0 |5066 1368 | 0 0 | 3 2 0 0 0 03-12 18:58:11| 0 0 100 0 0 0| 711M 95.3M 1203M 124G| 0 0 | 0 0 |5538B 1588B| 425 975 |92.0 2.00 | 3 2 0 0 0 03-12 18:58:12| 5 2 92 0 0 1| 725M 95.3M 1203M 124G| 0 0 | 0 0 | 85M 285M| 220k 112k| 127k 226k| 3 482 0 0 1 03-12 18:58:13| 10 4 85 0 0 1| 724M 95.3M 1203M 124G| 0 2.00 | 0 32k| 166M 556M| 427k 173k| 243k 438k| 3 482 0 0 1 03-12 18:58:14| 10 4 85 0 0 1| 725M 95.3M 1203M 124G| 0 0 | 0 0 | 165M 555M| 435k 172k| 243k 438k| 3 482 0 0 1 03-12 18:58:15| 10 4 85 0 0 1| 723M 95.3M 1203M 124G| 0 0 | 0 0 | 166M 555M| 440k 172k| 243k 438k| 3 482 0 0 1 03-12 18:58:16| 10 4 86 0 0 1| 724M 95.3M 1203M 124G| 0 0 | 0 0 | 166M 555M| 415k 172k| 243k 438k| 3 482 0 0 1 03-12 18:58:17| 10 4 85 0 0 1| 723M 95.3M 1203M 124G| 0 0 | 0 0 | 165M 555M| 404k 172k| 243k 438k| 3 482 0 0 1 03-12 18:58:18| 10 4 85 0 0 1| 724M 95.3M 1203M 124G| 0 5.00 | 0 24k| 165M 555M| 404k 171k| 243k 438k| 3 482 0 0 1 03-12 18:58:19| 10 4 85 0 0 1| 724M 95.3M 1203M 124G| 0 0 | 0 0 | 166M 555M| 411k 171k| 243k 438k| 3 482 0 0 1 03-12 18:58:20| 10 4 85 0 0 1| 723M 95.3M 1203M 124G| 0 0 | 0 0 | 166M 555M| 412k 170k| 244k 438k| 3 482 0 0 1 03-12 18:58:21| 10 4 85 0 0 1| 722M 95.3M 1203M 124G| 0 0 | 0 0 | 166M 555M| 411k 171k| 244k 438k| 3 482 0 0 1 03-12 18:58:22| 5 2 93 0 0 1| 724M 95.3M 1203M 124G| 0 0 | 0 0 | 76M 256M| 190k 81k| 113k 202k| 3 2 0 0 391 ``` ## Users of Haywire There's a production system running Haywire that serves `700 million requests a day` from an Aerospike cluster with `2ms or lower` response times. [pyrs](https://github.com/skogorev/pyrs) Python handlers for Haywire.

近期下载者

相关文件


收藏者