Deploy Lifecycle And Long-Lived Connections
BeamUp deploys are connection-aware, but SLC v1 does not provide transparent TCP, WebSocket, or SSE state migration. Clients must handle reconnects.
Activation Lifecycle
Section titled “Activation Lifecycle”beamup deploycreates an immutable deployment.- BeamUp builds the source and stores the artifact.
- The worker starts a candidate runtime.
- The runtime receives platform-owned
PORT,PATH, and configured env/secret values as strings. - BeamUp checks
PORTbinding and the configured health path. - Only a healthy candidate can become active.
- The app active pointer moves to the candidate in one committed update.
- The previous active deployment becomes superseded and its runtime enters the drain/cleanup path.
Unhealthy deployments never replace a healthy active deployment.
Drain And Shutdown
Section titled “Drain And Shutdown”Private SLC production runs one steady-state runtime instance per app. During a healthy replacement, a second runtime may exist temporarily for activation and drain.
After a successful route switch:
- BeamUp deregisters the previous target from new traffic.
- The connection-drain window runs for 30 seconds.
- After the drain point, BeamUp sends
SIGTERMto the Erlang runtime. - Supported OTP receives this as a normal shutdown opportunity.
- BeamUp waits a bounded 10-second OTP shutdown grace.
- BeamUp force terminates only if the runtime has not exited after that grace period.
Status and cockpit surfaces may show runtime states such as draining,
stopping, and stopped, plus shutdown outcomes:
graceful: the runtime exited during the OTP shutdown grace.forced: BeamUp terminated it after the grace period.failed: cleanup did not complete and retry is pending.
Unexpected instance or VM failure remains possible. Do not use runtime instance memory, actor state, ETS state, or local files as durable storage.
Ingress Limits
Section titled “Ingress Limits”The AWS-verified private SLC ingress settings are:
- ALB idle timeout: 60 seconds.
- HTTP client keepalive: 3,600 seconds.
- Target deregistration delay: 30 seconds.
Use application-level WebSocket/SSE heartbeat intervals shorter than the 60-second idle timeout. The verified private SLC fixture used SSE heartbeats every 2 seconds. That connection stayed active during healthy redeploy and the 30-second drain window, and reconnect after drain reached the new active deployment.
Manual rollback routing was also verified with an existing SSE connection during drain and a reconnect after the switch.
What Is Not Promised
Section titled “What Is Not Promised”BeamUp SLC v1 does not promise:
- Transparent connection migration.
- No reconnects.
- TCP handoff.
- Hot code upgrades.
:sys.change_code-style deploys.- Preserving in-memory BEAM state across redeploy or unplanned failure.
- A specific WebSocket/SSE connection capacity.
- Unmetered connection pricing.
Long-lived clients should reconnect with normal backoff and tolerate a route switch.
