diff options
| author | eunhhu <[email protected]> | 2026-09-26 10:46:30 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 10:46:30 +0100 |
| commit | d58e1d29cc3cbd5f1c9b271c0b7e25b9962fad4f (patch) | |
| tree | 47608cd54f1f38a534eb3313c765818b837e5704 /docs/design/008-module-format.md | |
| parent | 2827b23a1ec319d6a70eadccfa45cb5b7d8c83cc (diff) | |
| download | pure-d58e1d29cc3cbd5f1c9b271c0b7e25b9962fad4f.tar.gz pure-d58e1d29cc3cbd5f1c9b271c0b7e25b9962fad4f.zip | |
Charge lent answers to the payload budget
A read answered with extents of the store mapping was charged nothing,
so clients that stopped reading could keep any number of old file
versions mapped. The runtime core now takes resources a host sends in
pieces: body.data is NULL, body.size is charged like any other resource,
the outcome has no body to read and cannot be forwarded. pure-serve hands
the mapping reference over as such a resource, so a lent answer holds its
bytes of budget until it is in the socket and its ticket releases the
mapping; past the budget a read gets 503 payload_budget, as a copied one
would. The async core grows 52 bytes (5,776 of its 6,144).
Diffstat (limited to 'docs/design/008-module-format.md')
| -rw-r--r-- | docs/design/008-module-format.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index 7c9b50a..2ee4bec 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -216,8 +216,11 @@ text·리스트가 남을 때만 위치를 유지한다. - **샤드.** `--threads N`은 스레드마다 같은 포트의 리스너(`SO_REUSEPORT`), epoll, 런타임 코어, 앱, 저장소 핸들을 둔다. 키 없는 상태를 가진 모듈은 한 스레드로만 돈다(상태의 소유자는 하나다). - 저장된 문서를 읽는 GET 응답은 복사하지 않고 저장소 매핑의 익스텐트를 빌려준다. 보내는 동안 문서가 바뀌어도 - 읽은 버전이 나간다. 매핑이 담지 않는 응답만 예산에 계상되는 자원으로 복사한다. PUT 응답은 요청 본문에서 빌려야 - 하므로 `edit` 핸들러는 메시지 필드만 응답할 수 있다(`reply edit.insert`). 시작할 때 확인한다. + 읽은 버전이 나간다. 빌려준 응답도 복사한 응답처럼 예산에 계상된다. 매핑 참조는 조각으로 보내는 자원으로 + 런타임 코어에 넘어가, 응답이 소켓에 다 들어갈 때까지 예산을 차지하고 티켓과 함께 풀린다. 그래서 받지 않는 + 클라이언트가 붙잡을 수 있는 옛 버전은 예산을 넘지 않는다(넘으면 `503 payload_budget`). 매핑이 담지 않는 + 응답만 복사한다. PUT 응답은 요청 본문에서 빌려야 하므로 `edit` 핸들러는 메시지 필드만 응답할 수 + 있다(`reply edit.insert`). 시작할 때 확인한다. 성능과 비교는 [연구 075](../research/075-http-host-against-axum.md). 검증(aup `make check`): 무작위 요청에 기존 서버와 상태 코드·ETag·오류·본문이 같고, 동시 편집이 커밋을 나누어 쓰며, `kill -9` 뒤에도 확인 응답한 편집이 모두 남는다. |
