Skip to content
项目

关于

用汇编语言编写的极简、多进程、超高速 HTTP 服务器。

系统与基础设施

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

relayouter

High-performance non-blocking static file serving web server implementation written in FASM, mostly inspired by tiny-nginx.

image

Naturally with this being x86 assembly using raw syscalls, it won't work on anything other than a Linux x86-64 machine.

Overview

Relayouter is a very small (currently ~5.3 KiB) nginx-like http server that is:

  • written in x86 assembly without libc (or any linking at all),
  • parallelized across multiple processes bound to each CPU core,
  • utilizing epoll for efficient I/O multiplexing,
  • using only a single arena allocation for sharing data between processes (everything else is stack allocated),
  • able to decode URLs and detect MIME types properly.

[!NOTE] There are some critical bugs I need to fix with this. It's also very easily exploitable so don't use this in anything important.

Usage

# clone the repo
git clone "https://github.com/peachey2k2/relayouter.git"
cd ./relayouter

make build # build
make run   # build and run

It'll be hosted on http://localhost:8080/ and serve from ./public

Todo

  • recover from more errors
  • switch to edge-triggered
  • redo jumps with consideration for branch predictions
  • reorganize the files
  • configuration system

探索相关项目

加载中…