Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulse

A single-process HTTP/1.1 server for Linux, written in C++20.

The event loop uses edge-triggered epoll and drains sockets until EAGAIN. Static responses use sendfile; connections support keep-alive, incremental request parsing, output resumption after short writes, and idle timeouts. Multiple workers bind with SO_REUSEPORT and do not share application state.

Build and test

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

Run the server against a document root:

./build/pulse --port 8080 --doc-root ./www --workers 1

architecture.md documents the connection state machine, descriptor ownership, buffer lifetime, and the handling of EAGAIN on reads and writes.

Benchmark

A local loopback run with one worker served approximately 41,000 requests per second. This is a development-machine measurement, not a claim about networked or production performance. run.sh contains the wrk and ab commands used to repeat the test.

Current scope

  • Linux only (epoll, accept4, sendfile)
  • static files only
  • no TLS or HTTP/2
  • one event loop per worker

About

C++20 HTTP/1.1 server using epoll, nonblocking sockets, sendfile, and idle timers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages