Skip to content

Fix slow serverless wake with stable container MACs#130

Merged
arjunkomath merged 1 commit into
mainfrom
feat/stable-container-macs
Jul 11, 2026
Merged

Fix slow serverless wake with stable container MACs#130
arjunkomath merged 1 commit into
mainfrom
feat/stable-container-macs

Conversation

@arjunkomath

Copy link
Copy Markdown
Member

Summary

  • Derive a deterministic, locally administered MAC address from each static container IPv4 address.
  • Pass that MAC to Podman with --mac-address when creating static-IP containers.
  • Add regression coverage for MAC derivation and Podman run arguments.

Root cause

Podman generated a different MAC whenever a stopped serverless container rejoined the bridge. The proxy retained the old IP-to-MAC neighbor entry, so Linux waited for neighbor discovery to fail before resolving the new MAC. This produced the repeatable attempts=12, roughly 8.9-second wake latency.

Impact

New and redeployed static-IP containers retain the same MAC across sleep/wake cycles, removing the stale-neighbor delay. Existing containers need one controlled redeploy to receive the creation-time MAC. Health-check and readiness behavior are unchanged.

Validation

  • go test ./...
  • OrbStack integration test with Podman 5.4.2 across two sleep/wake cycles:
    • wake latency dropped from roughly 8.9 seconds to 626ms and 1.166s
    • container ID and MAC stayed unchanged
    • neighbor state transitioned normally without FAILED
    • both direct-IP and loopback upstream probes succeeded

@arjunkomath arjunkomath marked this pull request as ready for review July 11, 2026 00:21
@arjunkomath arjunkomath merged commit 81af89e into main Jul 11, 2026
11 checks passed
@arjunkomath arjunkomath deleted the feat/stable-container-macs branch July 11, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant