Serverless Containers: Scaling & Lifecycle Management
This guide explains how to scale, change, and retire Serverless Container applications in a safe, predictable, and production-ready way. It focuses on compute scaling, redeploy behavior, billing impact, and data lifecycle based on how the CloudRaya platform actually operates.
Scaling Model Overview
Serverless Containers use a package-based compute scaling model.
When you resize an application, you change:
- CPU allocation
- Memory (RAM) limits
Storage size does not change.
Each application includes a fixed-size, platform-managed storage volume (50GB). Resizing a package affects performance and concurrency, but it does not increase or decrease disk capacity.
This model keeps scaling simple and predictable:
- Scale up when performance changes
- Keep data stable across package changes
Package changes are upgrade-only, there is currently no option to move to a smaller package. Start with the smallest package that fits your workload, and upgrade later as needed.
Compute vs Storage Model
It is important to understand which parts of your application can be scaled and which cannot.
Compute (CPU & Memory)
- Scaled by resizing the package
- Affects how many requests your app can handle and how fast it responds
- A short service interruption may occur
Storage (Disk)
- Fixed per application (50GB)
- Preserved across redeploys and package changes
- Deleted when the application is deleted
If your application slows down under load, scale compute.
If you need:
- Larger datasets
- Long-term backups
- Shared or external access to data
Consider integrating with StorageRaya (CloudRaya Object Storage) or backup services.
📄 See: StorageRaya
How to Resize an Application
- Open My Apps from the Marketplace
- Select the application you want to scale
- In the General tab, click Upgrade Package
- The dialog shows your current package, and only lets you choose a package larger than it, there's no way to select a smaller one
- Selecting a package shows Due Now (the prorated difference between your current and new package price for the remaining days in the billing cycle) and Next Billing (the new package's full monthly rate)
- If your credit balance is insufficient, the dialog warns you and blocks the upgrade until you top up
- Click Upgrade to confirm
If you're already on the largest available package, the dialog shows Maximum Package Reached instead of a package list, there's nowhere further to upgrade to.
The application will enter a redeploying / terminating state while the new compute limits are applied. Once complete, the status returns to Running.
What Happens When You Redeploy
Redeploying an application restarts its containers and applies the latest platform and configuration changes.
A redeploy may occur when you:
- Resize the package (CPU/RAM)
- Update environment variables
- Apply platform-level updates
You can also trigger a redeploy manually at any time, without changing any configuration, using the Redeploy action on the app's General tab. You'll be asked to confirm before it proceeds.
During redeploy:
- Containers are restarted
- The application may be temporarily unavailable
- Attached storage is preserved
- The app shows a redeploying status while in progress, then confirms whether the redeploy succeeded or failed
Use redeploy as a controlled change action, especially for production workloads.
Data Behavior and Persistence
Serverless Containers can support both lightweight and data-driven applications.
Data-Persistent Applications
Some applications store data on the platform-managed storage volume, such as:
- Content management systems
- Internal databases
- Learning platforms
This data:
- Persists across redeploys
- Is tied to the lifecycle of the application
Lightweight or Non-Persistent Applications
Some workloads do not rely on stored data, such as:
- APIs
- Automation tools
- Demo or test environments
These can be resized or redeployed with minimal risk.
If your workload requires:
- Large or growing datasets
- External backups
- Data sharing across systems
Consider integrating with StorageRaya (CloudRaya Object Storage) or backup services.
📄 See: StorageRaya
Billing Impact
Serverless Containers use a monthly, usage-based billing model, with billing cycles running from the 1st to the end of each calendar month.
Deploying or upgrading mid-cycle charges you immediately: the Due Now amount shown in the package dialog is deducted from your credit balance right away, not held until the end of the cycle. Next Billing is the full monthly rate that takes effect from the next cycle onward.
What This Means for You
- You can upgrade at any time; Due Now only covers the prorated difference between your current and new package price for the remaining days in the cycle, not the new package's full price
- If you upgrade multiple times within the same cycle, each upgrade only charges the incremental difference for the days left
- Across a full cycle, this adds up to the same total as being billed per day for whichever package was active that day
Account Balance and Service Availability
Each deploy or upgrade deducts its Due Now amount immediately, so make sure your account has sufficient balance before confirming. Insufficient balance blocks the action until you top up.
Example: How Prorated Billing Works
Here is a simple example for a 30-day month:
| Day Range | Package Size | Billed For |
|---|---|---|
| Day 1–10 | Nano | 10 days of Nano |
| Day 11–20 | Small | 10 days of Small |
| Day 21–30 | Medium | 10 days of Medium |
Monthly Total:
- Nano → 10 days
- Small → 10 days
- Medium → 10 days
This matches the total of the Due Now amounts you'd already pay at each upgrade, CloudRaya deducts each one immediately rather than waiting to bill the total at month's end.
Data Retention and Deletion
Each Serverless Container application includes a platform-managed storage volume.
As a safety measure, the delete confirmation dialog asks you to type the exact confirmation text it shows before the Delete Now action becomes available.
When you delete an application:
- The application and its storage are removed together
- Stored data is permanently deleted
- Billing already due for the current period is still charged, deleting early does not refund or cancel it
Before deleting an app:
- Export important data
- Back up content to external storage or backup services
Once deleted, data recovery is not supported.
Safe Change Practices
For production environments, follow these best practices:
- Resize during low-traffic periods to reduce user impact
- Change one thing at a time (package size or configuration, not both)
- Verify application health after each redeploy
- Back up data before major changes
These practices help reduce risk and make troubleshooting easier if issues occur.
When to Use Serverless Containers
Serverless Containers are best suited for:
- Business applications and internal tools
- Lightweight production workloads
- Rapid deployment and scaling needs
For workloads that require:
- Large-scale persistent storage
- Advanced networking
- Fine-grained infrastructure control
Consider deploying directly on Virtual Machines or KubeRaya clusters.
Next Steps
-
Learn how to Monitor and Troubleshoot Applications
-
Review Domain & Access Management for custom domains and HTTPS
-
Explore Configuration & Environment Variables for advanced setup and secrets management
📄 Serverless Containers: Configuration & Environment Variables
These sections help you operate Serverless Containers safely and efficiently in production environments.