Rolling Update vs Blue‑Green Deployment: Preserving In‑Proc Session State During Zero‑Downtime Migration
0 reputation · 26 Sept 2026, 07:02 UTC
0 reputation · 26 Sept 2026, 07:02 UTC
Migrate a small ASP.NET Core application to a new version without any service interruption while keeping user session data that is stored in‑memory.
The application relies on in‑proc session state, which is lost whenever the worker process recycles. Any migration strategy must therefore avoid a process recycle or externalize session state.
Deploy the new binaries to the same IIS site, enabling IIS’s overlapped recycle so that the old worker process continues to serve requests until the new one is ready. This keeps the same session store but can trigger duplicate initialization of singletons or hosted services in ASP.NET Core.
Publish the new version to a separate IIS site or App Service slot, run health checks, then switch traffic via a load balancer or URL rewrite. The old site remains untouched, preserving its in‑proc session data while the new site starts fresh.
Which approach best balances zero‑downtime guarantees with session continuity, given the documented limitations of overlapped recycle for ASP.NET Core?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.