fix(router): stream request bodies through to backend UDS #57
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_router!57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_stream_proxy_body"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces
axum::body::to_bytes(body, 16 MiB).unwrap_or_default()+Full<Bytes>buffering inservice_proxy_root/service_proxy_pathwith a streamingaxum::body::Bodypassed straight into thehyper+hyperlocalclient. Router memory no longer grows with body size, and there is no longer a router-level upload ceiling.Related Issue
#55
Changes
crates/hero_router/src/server/routes.rs—proxy_to_socket+service_proxy_innertakeaxum::body::Bodyinstead of&axum::body::Bytes;Client<UnixConnector, axum::body::Body>built viaClient::builder(TokioExecutor); twoto_bytesbuffering calls removed.Test Results
cargo check -p hero_router✓,cargo clippy -p hero_router -- -D warnings✓,cargo fmt --check -p hero_router✓,cargo test -p hero_router✓.Manual verification
Deployed locally on herodev and re-ran PUT uploads against hero_foundry through the router: 20 MB (0.07 s), 100 MB (0.52 s), 500 MB (2.45 s), 1 GB (4.77 s) — all 200. Router VmRSS baseline 27 MB, peaked at 28.9 MB during the 1 GB upload (constant-memory proxying vs. the prior 16 MB buffered ceiling). All 7 office e2e tests in hero_os still pass.
Note for reviewers
This PR removes the only router-level body size ceiling. Backend services are now the sole authority for their own upload limits.