Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
e579c90
Add Paozhu
hggq Nov 7, 2026
6dbdfc8
Add Poazhu
hggq Nov 7, 2026
15e347b
Add Paozhu http1 post chunked
hggq Nov 8, 2026
da7f6c3
Add paozhu
hggq Nov 8, 2026
e4a3cc0
Merge branch 'MDA2AV:main' into main
hggq Nov 8, 2026
5be39ce
Add Paozhu
hggq Nov 9, 2026
08b8f6f
Add Paozhu
hggq Nov 9, 2026
5cd63b2
Add paozhu
hggq Nov 9, 2026
1187d4f
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 9, 2026
a44b4ac
Merge branch 'MDA2AV:main' into main
hggq Nov 10, 2026
7053697
Edit mulit ioc
hggq Nov 10, 2026
6d4303c
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 10, 2026
efd9951
Add paozhu
hggq Nov 10, 2026
737060a
Add paozhu
hggq Nov 10, 2026
2ec885f
Add paozhu
hggq Nov 10, 2026
1e2e203
Add paozhu
hggq Nov 10, 2026
c7b539e
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 10, 2026
6602983
Add paozhu
hggq Nov 10, 2026
50f6d04
Add paozhu
hggq Nov 10, 2026
e7a8d4b
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 10, 2026
a1df593
Add paozhu
hggq Nov 11, 2026
81cefee
Add paozhu
hggq Nov 11, 2026
a4ddde4
Add paozhu
hggq Nov 11, 2026
fcb0655
Add paozhu
hggq Nov 11, 2026
fa07f5e
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 11, 2026
5075d16
Add paozhu
hggq Nov 11, 2026
61508df
Add paozhu
hggq Nov 11, 2026
1e9fb1d
Add paozhu
hggq Nov 11, 2026
1714fd6
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 11, 2026
d2357dc
Add paozhu
hggq Nov 11, 2026
287cdcc
Add paozhu
hggq Nov 11, 2026
27c58e9
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 11, 2026
9222b6c
Add paozhu
hggq Nov 11, 2026
eece81e
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 11, 2026
1821391
Add paozhu
hggq Nov 11, 2026
9a85c3a
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 11, 2026
2332d83
Fix h2 orm
hggq Nov 12, 2026
4b6ea10
Fix paozhu
hggq Nov 12, 2026
99c4b28
Fix orm init 55
hggq Nov 12, 2026
2d8b43b
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
70d115a
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
77c98ae
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
5dc1f75
Fix orm threads pool to 64
hggq Nov 12, 2026
3a62390
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
6f56f5c
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
3d87d9b
Add cache httppeer
hggq Nov 12, 2026
b267014
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 12, 2026
f8ab29e
Fix http2 send ring to 32 slot
hggq Nov 13, 2026
bd78573
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 13, 2026
4fe99b0
Fix minpool init
hggq Nov 13, 2026
5734d11
Fin minpool init
hggq Nov 13, 2026
bdbe109
Edit db.cpp
hggq Nov 13, 2026
68e71ac
Fix db.cpp
hggq Nov 13, 2026
4971231
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 13, 2026
81eada4
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 13, 2026
470e75a
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 13, 2026
aad6611
Add paozhu thread pool to 128
hggq Nov 14, 2026
8c0e89e
Add paozhu
hggq Nov 14, 2026
70c4ea0
Fix paozhu
hggq Nov 14, 2026
405eae5
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 14, 2026
9ed7810
Merge branch 'MDA2AV:main' into main
hggq Nov 14, 2026
22cfc37
Merge branch 'MDA2AV:main' into main
hggq Nov 14, 2026
0c734b8
Add websocket
hggq Nov 14, 2026
1e33515
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 14, 2026
d4c2742
Merge branch 'MDA2AV:main' into main
hggq Nov 15, 2026
81fe8fb
Fix br level
hggq Nov 15, 2026
2cca5ed
Fix orm conn
hggq Nov 15, 2026
91a71be
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 15, 2026
e3bd1e0
Merge branch 'MDA2AV:main' into main
hggq Nov 15, 2026
f39b2cc
Add 8gbit, static to cache
hggq Nov 15, 2026
4bf90af
Merge branch 'main' into main
hggq Nov 15, 2026
2345926
Merge branch 'MDA2AV:main' into main
hggq Nov 15, 2026
ce41ce5
Add sleep 3s
hggq Nov 15, 2026
ce87853
Add sleep 3s
hggq Nov 15, 2026
4a1bd27
Merge branch 'MDA2AV:main' into main
hggq Nov 15, 2026
98b3e06
Fix curl
hggq Nov 15, 2026
a73b1a0
Add static tls
hggq Nov 15, 2026
dd6f27f
Merge branch 'MDA2AV:main' into main
hggq Nov 16, 2026
a135781
Reset /static/:filename
hggq Nov 16, 2026
250fa32
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 16, 2026
4331a97
Fix compress
hggq Nov 16, 2026
890da32
Merge branch 'MDA2AV:main' into main
hggq Nov 16, 2026
f22b7e8
Merge branch 'MDA2AV:main' into main
hggq Nov 16, 2026
1a489d6
Merge branch 'main' into main
hggq Nov 16, 2026
e13a89f
Fix static file to dynamic
hggq Nov 16, 2026
8179862
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 16, 2026
d1cf7ec
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 16, 2026
9ef28cd
Merge branch 'MDA2AV:main' into main
hggq Nov 17, 2026
2cfa5a8
Fix latency-500k-8cpu
hggq Nov 17, 2026
fa2c6ad
Fix sqlite
hggq Nov 17, 2026
b833fa2
Fix sql
hggq Nov 17, 2026
49fe4f9
Use framework fun
hggq Nov 17, 2026
94664e5
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 17, 2026
44da3a0
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 17, 2026
3a42739
Fix threads
hggq Nov 17, 2026
c0362e6
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 17, 2026
3940d00
Fix orm pool get back
hggq Nov 17, 2026
d509c0c
Fix head body to asio::const_buffer
hggq Nov 17, 2026
b146c12
Fix ORM cache to 8k
hggq Nov 17, 2026
ea4eaae
Fix ORM cache_data to 8k
hggq Nov 17, 2026
3f5ce80
Fix msvc ci
hggq Nov 17, 2026
603f0de
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 17, 2026
5a0667b
Fix on stat to cache static files
hggq Nov 18, 2026
ac141bc
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 18, 2026
76a8878
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 18, 2026
6a55605
Fix static static-h2 64X4 threads
hggq Nov 18, 2026
2a59c20
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 18, 2026
673dfda
Fix threads
hggq Nov 18, 2026
15f1381
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 18, 2026
e626f68
Fix ring send
hggq Nov 18, 2026
6add11b
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 18, 2026
4c15a79
Fix http2 send wait
hggq Nov 19, 2026
b4fd147
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 19, 2026
0d586e4
Fix temp var
hggq Nov 20, 2026
3aba534
Fix http2 use httppeer pool
hggq Nov 20, 2026
3534065
fall back
hggq Nov 20, 2026
c4bd1cd
reset arena
hggq Nov 20, 2026
3c87963
Use new tag
hggq Nov 20, 2026
3620609
Fix back
hggq Nov 20, 2026
1288100
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 20, 2026
9cc7515
Fix last paozhu
hggq Nov 21, 2026
c3ffdc0
Fix last paozhu
hggq Nov 21, 2026
1635736
Fix start sleep 100 milliseconds
hggq Nov 21, 2026
6bf5102
Fix the startup sequence and sleep wait
hggq Nov 21, 2026
3fb8564
Fix chdir
hggq Nov 21, 2026
967f629
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 21, 2026
2643113
Merge branch 'MDA2AV:main' into main
hggq Nov 21, 2026
5652194
Merge branch 'main' into main
hggq Nov 21, 2026
2d11e1a
Update paozhu new commit
hggq Nov 21, 2026
88fa9e9
Fix pg conn
hggq Nov 21, 2026
737cede
Fix start sleep ms 150
hggq Nov 21, 2026
b083d28
Merge branch 'main' into main
hggq Nov 21, 2026
a2426d9
Merge branch 'main' into main
hggq Nov 21, 2026
09d7b30
Benchmark results: paozhu [skip ci]
github-actions[bot] Nov 21, 2026
f15eb8c
Merge branch 'MDA2AV:main' into main
hggq Nov 22, 2026
1a13aca
Fix orm relink
hggq Nov 22, 2026
299265c
Fix http link
hggq Nov 22, 2026
2d7d44d
Fix ORM relink, fix openssl4.1
hggq Nov 22, 2026
e328403
Merge branch 'MDA2AV:main' into main
hggq Nov 22, 2026
f135735
Merge branch 'MDA2AV:main' into main
hggq Nov 23, 2026
0c19601
New Test 1m conn
hggq Nov 23, 2026
faf9860
Test short-lived
hggq Nov 23, 2026
dd7986c
Add spec test,set accept num thread in server.conf
hggq Nov 23, 2026
8389977
Subtract ws
hggq Nov 23, 2026
83beb3d
Fix BENCHMARK
hggq Nov 23, 2026
ddba99b
Fix http1 BENCHMARK
hggq Nov 23, 2026
6f236d2
Fix http1 allow
hggq Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frameworks/paozhu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# Pinned so mini_project.sh, the controller generator and the CMake entry point
# stay in sync with the scaffold this entry was written against.
ARG PAOZHU_REF=ecc3e6c9bb219177d5b9e71cbc28753a2196448f
ARG PAOZHU_REF=2f8f3d3bbe15a507ecbf442c681bf7138315a0dd
WORKDIR /paozhu
# Prefer a source archive shipped in the build context (offline / slow-GitHub
# environments); otherwise fetch the pinned revision from codeload. The direct
Expand Down
17 changes: 15 additions & 2 deletions frameworks/paozhu/cost_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
#define CONST_HTTP1_KEEPALIVE_MAX_REQUESTS 1000

// ---- HTTP/2 单连接资源上限(http2_parse.cpp)----
// 对外承诺的单连接并发流上限(SETTINGS_MAX_CONCURRENT_STREAMS)。
// 超限时对触发上限的那条流回 RST_STREAM(REFUSED_STREAM),连接保留。
// Advertised per-connection concurrent stream limit. Exceeding it resets only the offending stream with REFUSED_STREAM.
#define CONST_HTTP2_MAX_CONCURRENT_STREAMS 100

// 单连接上「未完成头部块」+「已建流但 body 未结束」的流数量上限。
// server.cpp 的 steam_count 只统计「已派发」的流,客户端只发 HEADERS 不开 END_STREAM
// 时永远不会触发,因此这里必须再卡一道,否则 http_data/http_post_data 可被撑爆。
Expand Down Expand Up @@ -202,8 +207,16 @@
// grow per-connection encoder memory without bound. Separate from the decoder ceiling above.
#define CONST_HTTP2_ENCODER_TABLE_CAP 4096

// HPACK encoder dynamic table switch for response headers. Define to enable Indexed representation;
// comment out to fall back to Literal without Indexing (0000xxxx).
// HPACK encoder dynamic table switch for response headers. Define to enable Indexed
// representation; comment out to fall back to Literal without Indexing (0000xxxx) — that
// is still conformant HPACK (RFC 7541 §6.2.2), just larger header blocks, and it needs no
// dynamic table size update signal. The status line and the legacy item/item2 builders
// stay table-neutral in both modes (fixed 2026-11-23), so commenting this out is a full
// fallback.
// 响应头方向的 HPACK 编码器动态表开关。定义后可用 Indexed 表示;注释掉即整体回退到
// Literal without Indexing(0000xxxx)——那仍是合规编码,只是头块更大,且不再需要 Size Update
// 信号。状态行与旧 item/item2 在两种档位下都不碰动态表(2026-11-23 修复),所以注释掉本宏
// 就是完整回退。
#define PAOZHU_HPACK_ENCODER_DYNAMIC_TABLE 1

// Connection-level error COMPRESSION_ERROR (RFC 9113 §7 / RFC 7541). GOAWAY with this code
Expand Down
6 changes: 5 additions & 1 deletion frameworks/paozhu/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"display_name": "paozhu",
"language": "C++",
"type": "experimental",
"type": "flagship",
"mode": "standard",
"completeness": {
"routing": true,
Expand All @@ -13,13 +13,17 @@
"description": "Paozhu C++20 web framework on standalone Asio, built from the upstream mini_project.sh clean scaffold. Annotated controller routes answer /baseline11, /baseline2, /pipeline, /echo, /json/{count}?m={multiplier}, /delay/{ms}, /async-db?min=&max=&limit= and /fortunes; the dataset is parsed once at startup and serialized per request, /echo returns the raw request body byte-for-byte, and the DB routes use paozhu's own async Postgres driver. /static/* is served by the framework's native static path from the mounted /data/static (wwwpath=/data) with an on-disk compression cache pre-warmed at startup. Two server instances share the image: plaintext HTTP/1.1 on :8080 and ALPN h2 on :8443, plus a second instance whose TLS listener on :8081 advertises only http/1.1 for json-tls, 8gbit and static-tls and whose cleartext :8082 listener serves h2c prior-knowledge for baseline-h2c and json-h2c.",
"repo": "https://github.com/hggq/paozhu",
"enabled": true,
"resilience": true,
"spec": ["h1", "h2", "ws"],
"tests": [
"baseline","async","latency-1m", "latency-10k",
"pipelined",
"limited-conn",
"json-comp",
"json-tls",
"8gbit",
"connections-1m",
"connections-1m-tls",
"baseline-h2",
"static-h2",
"static-tls",
Expand Down
1 change: 1 addition & 0 deletions frameworks/paozhu/src/conf/server-h1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[default]
threadmax = 1024
threadmin = 5
socket_accept_num = 4 ;hardware_concurrency()/16
cothreadnum = 0 ; 0 = auto (host cores)
per_ioc_thread_num = 1 ;
orm_ioc_num = 4 ;ORM io_context num;
Expand Down
1 change: 1 addition & 0 deletions frameworks/paozhu/src/conf/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[default]
threadmax = 1024
threadmin = 5
socket_accept_num = 4 ;hardware_concurrency()/16
cothreadnum = 0 ; 0 = auto (host cores)
per_ioc_thread_num = 1 ;
orm_ioc_num = 4 ;ORM io_context num;
Expand Down
50 changes: 50 additions & 0 deletions frameworks/paozhu/src/controller/src/arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,56 @@ asio::awaitable<std::string> arena_echo(std::shared_ptr<httppeer> peer)
co_return "";
}

// HttpArena protocol-compliance route (h1/h2 suites).
// GET/HEAD: fixed text body >= 5 bytes (h2spec skips a flow-control test below 5).
// POST: byte-for-byte raw body echo, through the same parser API as /echo.
// OPTIONS: 200 with Allow; the core closes the connection if a body was sent
// rather than leave unread bytes that could be parsed as a second request.
//@urlpath(null,spec)
asio::awaitable<std::string> arena_spec(std::shared_ptr<httppeer> peer)
{
peer->status(200);
if (peer->method == static_cast<unsigned char>(HEAD_METHOD::HEAD) ||
peer->method == static_cast<unsigned char>(HEAD_METHOD::GET))
{
peer->type("text/plain");
peer->output = "spec ok";
}
else if (peer->method == static_cast<unsigned char>(HEAD_METHOD::POST))
{
peer->type("application/octet-stream");
peer->output = raw_body(peer);
}
else if (peer->method == static_cast<unsigned char>(HEAD_METHOD::OPTIONS))
{
peer->set_header("Allow", "GET, HEAD, POST, OPTIONS");
peer->type("text/plain");
peer->output.clear();
}
co_return "";
}

// Header echo: one `Name: Value` line per received header, in any order/case.
// Read the body even though it is discarded, so POST bodies go through the
// normal parser path and any >2MB spilled temp file is cleaned up.
//@urlpath(null,spec/headers)
asio::awaitable<std::string> arena_spec_headers(std::shared_ptr<httppeer> peer)
{
raw_body(peer);
peer->status(200);
peer->type("text/plain");
std::string out;
for (const auto &kv : peer->header)
{
out += kv.first;
out += ": ";
out += kv.second;
out.push_back('\n');
}
peer->output = std::move(out);
co_return "";
}

//@urlpath(null,baseline11)
asio::awaitable<std::string> arena_baseline11(std::shared_ptr<httppeer> peer)
{
Expand Down
Loading