Repository navigation
Description
Description
Make Axum a supported self-hosted runtime with explicit lifecycle, configuration/storage, bounded HTTP handling, safe diagnostics and tested application-container recipes. Main at cf2c57b1cf0e139d3b86f128218c798027d7978b still uses the development runner; crates/edgezero-adapter-axum/src/dev_server.rs:46 exposes bind and Ctrl-C settings rather than a production lifecycle contract.
PR #275 supplies the unmerged portable HTTP foundation (#436). Runtime stack #406 → #407 → #409 supplies lifecycle/configuration, JSON caps and diagnostics. PR #401 supplies container/CI/documentation preparation. Preparation and local tests do not establish integrated production acceptance.
Steps to reproduce
Inspect the generated Axum entrypoint and runner on the pinned main revision. Compare its startup, SIGTERM/draining, body conversion, outbound transport and storage behavior with #392–#400. Run each owning acceptance scenario against the eventual integrated application image; source review alone is not a runtime result.
Expected behavior
An application runs outside its source checkout in a non-root, read-only-root Linux amd64/arm64 container with explicit mounts, readiness, bounded shutdown and documented HTTP/proxy limits. Applications own images, release policy and domain configuration.
Impact
Current runtime and packaging gaps block supported self-hosted deployments. Successful routing or a Docker HTTP smoke does not prove overload safety, graceful process shutdown, persistent state recovery or provider qualification.
Proposed fix
Integrate accepted #275 contracts, then #392/#396 lifecycle and configuration first, followed by residual #393/#394/#395/#397 checks. Continue #398/#399 packaging preparation in parallel; complete #400 using proven behavior.
Keep non-Send/WASM contracts and BestEffort/Unsupported declarations. Do not invent workload-independent concurrency/deadline defaults or claim multi-writer redb. Initial scope is TLS behind an operator-managed proxy, native amd64/arm64 application images, Docker/Kubernetes and one selected managed-container recipe. Direct TLS, operators, a general cloud-provisioning CLI and public EdgeZero application images remain outside this epic.
Done when
- PR feat: implement portable outbound HTTP and request lifecycle contracts #275 integration is complete and runtime issues implement only residual work, with unsupported/BestEffort guarantees preserved.
- All linked sub-issues meet their scoped acceptance criteria.
- A generated application uses portable dependencies and its own committed lockfile and declared toolchain, then builds/runs outside the source checkout in a non-root read-only-root container.
- The container recipe passes native amd64/arm64 CI; publication guidance preserves tested artifact identity and keeps privileged release operations separate from untrusted PR builds.
- Required-config failure, mounted state restart, readiness, SIGTERM/draining, buffered-body limits, incremental streaming, relevant outbound semantics, and safe diagnostics are exercised through the integrated runtime.
- Deferred workload-specific admission/deadline/overload policy is explicitly documented rather than silently assigned to Axum: enforce configurable buffered request-body limits #393 or claimed as proven process memory safety.
- Axum: document Docker, Kubernetes, and managed-cloud deployments #400 documents and verifies the agreed Docker/Kubernetes/managed-container scope, including storage, TLS/proxy, probes, shutdown, upgrades, and rollback.
- EdgeZero publishes no application image as a completion requirement; downstream image/config/signing/release ownership is clear.
- Existing workspace tests, lint/format checks, and WASM compatibility gates still pass.
Related
- Sub-issues: Axum: define a production server lifecycle with bounded graceful shutdown #392, Axum: enforce configurable buffered request-body limits #393, Axum: preserve incremental streaming with bounded backpressure #394, Axum: reuse outbound clients and preserve proxy HTTP semantics #395, Axum: make production configuration and local storage explicit #396, Axum: add safe production diagnostics and trusted-proxy handling #397, Axum: scaffold hardened production application Dockerfiles #398, Axum: validate multi-platform containers and provide an application publishing workflow #399, Axum: document Docker, Kubernetes, and managed-cloud deployments #400, Add native AWS configuration, secret, and ordinary KV store providers #410.
- HTTP foundation: Implement portable outbound HTTP and request lifecycle contracts #436 / PR feat: implement portable outbound HTTP and request lifecycle contracts #275. Runtime implementation: PRs Add Axum production startup and bounded shutdown #406, Add configurable Axum buffered JSON body limits #407, feat(axum): add safe diagnostics and trusted proxy metadata #409.
- Packaging and deployment preparation: PR Scaffold hardened Axum application Docker recipes #401; final Axum: scaffold hardened production application Dockerfiles #398–Axum: document Docker, Kubernetes, and managed-cloud deployments #400 acceptance remains open.
- Native providers: Add native AWS configuration, secret, and ordinary KV store providers #410 / PR Add native AWS store providers #414, Add native celld configuration and KV store providers #437 / PR Add native celld config and KV store providers #422, Axum: add protected CloudFront Geo metadata provider #432 / PR Add pluggable native Geo providers and protected CloudFront ingress #439; optional local GeoIP Axum: follow up with an explicit local GeoIP provider #438.
- Related framework work: Dynamic Backend Abstraction #79, Backend TLS options #81, Backend timeout options #82, Axum backend factory #85, Axum ClientInfo #92, Complete streaming and compression across adapters #107, Provide a core streaming response helper #110, Complete portable request observability #118–Support distributed trace propagation #122, Provide default GitHub workflows for format, test, Dependabot, CodeQL and Docker #161, Implement local provisioning across all adapters #288, Make ordinary config values readable consistently on Fastly #324.
- Downstream application image/release/installer: Trusted Server #897; configuration #1141, stores #1139, health #1142, secrets #843 and Geo/policy #1134 remain application-owned.
Activity