We’re excited to announce the open beta of zero-downtime deployments on Upsun. This feature lets you deploy your applications without interrupting your live traffic—no more maintenance pages or brief service interruptions during deployments.Documentation Index
Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
Use this file to discover all available pages before exploring further.
What’s available in beta
This beta feature focuses on application deployments, not services. You can now deploy application code changes, updates to environment variables, and configuration changes without any downtime for your users.How it works
The zero-downtime deployment process uses a rolling strategy with three key steps:1. Clone and route traffic
Upsun creates a temporary clone of your current application and routes all live traffic to this clone while keeping the original running in the background.
2. Upgrade the original
While traffic is being served by the clone, the original application gets upgraded with your new code, configuration, or environment changes.3. Switch back and cleanup
Once the original is fully upgraded and healthy, traffic switches back to the original application. The temporary clone is then removed.
Important considerations
Applications only
This feature applies to applications, not services. Services like databases, Redis, or other data storage systems stay intact and uninterrupted throughout the deployment. To upgrade services, you need to restart the application.Temporary resource increase
During the zero-downtime deployment, both the original and cloned applications run simultaneously for a brief period. This means:- You’ll temporarily use more resources while both versions are active
- Additional costs during this time are proportional to your application’s resource usage and deployment duration
- The impact is minimal for typical deployments, especially for smaller applications
Connection handling
Long-lived connections like WebSockets or Server-Sent Events (SSE) are dropped during any deployment. We recommend implementing reconnection logic in your applications. To ensure your application only starts receiving traffic when it’s steady and ready, we recommend using thepost_start hook. This helps prevent 502 errors that can occur if traffic is routed to your application before it’s fully initialized. For more information, see the application startup documentation.
How to try it
Zero-downtime deployments are available on Upsun Flex.Recommended: Enable manual deployments
The recommended way to use zero-downtime deployments is to enable manual deployments on your environment. This gives you full control over when and how deployments happen. Once enabled, you can trigger deployments via the CLI:Alternative: Using CLI push
If you don’t want to enable manual deployments, you can use the latest CLI to deploy directly with zero-downtime strategy:Use cases
Zero-downtime deployments are ideal for:- Code pushes: Deploy new features or bug fixes without service interruption
- Configuration changes: Update environment variables or application settings
- High-traffic applications: Keep critical services available during updates
- Database schema migrations (except when fully backward and forward compatible)
- Stateful service updates