Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

haywire

> 编程语言
Open source

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.

1.1K stars0 likes0 views
WebsiteGitHub

About

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.

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 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

bash
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

…

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 Python handlers for Haywire.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言