Deployment modes overview
Available options
Metric Store supports three deployment modes:- Always on - Service runs continuously
- On demand - Service starts when needed
- Scheduled - Service runs on a time-based schedule
Always on deployment
Overview
Always on deployment keeps your Cube service running continuously, providing constant availability for queries and API access. Characteristics:- ✅ Service runs 24/7
- ✅ Immediate availability for queries
- ✅ No startup delays
- ✅ Consistent performance
- ⚠️ Higher compute costs
- ⚠️ Resources always allocated
When to use
Production environments:- Critical business applications
- High-traffic dashboards
- Real-time analytics requirements
- SLA-driven use cases
- Executive dashboards
- Customer-facing analytics
- Operational reporting
- Time-sensitive queries
Configuration
-
Access project settings
- Click “Settings” button in header
- Or click project name → “Edit project”
-
Select deployment mode
- Choose “Always on” from deployment options
- Save changes
-
Service starts
- Service starts immediately
- Heartbeat status reaches “RUNNING”
- Available for queries right away
Production recommendationAlways on deployment is recommended for production environments where consistent availability and performance are critical.
On demand deployment
Overview
On demand deployment starts the Cube service when it’s needed and stops it when idle, optimizing resource usage and costs. Characteristics:- ✅ Cost-effective for low usage
- ✅ Automatic start on first request
- ✅ Automatic stop when idle
- ⚠️ Startup delay on first request
- ⚠️ Cold start time required
When to use
Development and testing:- Development environments
- Testing and QA
- Experimentation
- Non-critical workloads
- Occasional analytics needs
- Ad-hoc reporting
- Personal dashboards
- Cost-sensitive use cases
Configuration
-
Access project settings
- Go to project settings
- Navigate to deployment options
-
Select deployment mode
- Choose “On demand” from options
- Save changes
-
Service behavior
- Service starts when first query arrives
- Runs while active
- Stops automatically after idle period
- Restarts on next request
Startup timeOn demand deployment requires a startup time (typically 30-60 seconds) when the service starts. Users may experience a delay on the first request after an idle period.
Scheduled deployment
Overview
Scheduled deployment runs your Cube service on a specific schedule, such as business hours or specific days of the week. Characteristics:- ✅ Runs during specified times
- ✅ Stops automatically outside schedule
- ✅ Cost optimization for time-based needs
- ✅ Predictable availability windows
- ⚠️ Not available outside schedule
- ⚠️ Requires schedule configuration
When to use
Business hours operations:- Office hours analytics
- Business day reporting
- Time-zone specific needs
- Cost-optimized production
- Daily reports
- Weekly analytics
- Monthly dashboards
- Batch processing windows
Configuration
-
Access project settings
- Go to project settings
- Select “Scheduled” deployment mode
-
Configure schedule
- Choose schedule type:
- Weekdays - Monday-Friday with time range
- Whole week - Monday-Sunday with time range
- Custom - Cron-based scheduling
- Choose schedule type:
-
Set time range
- Start time - When service should start (e.g., 09:00)
- End time - When service should stop (e.g., 18:00)
- Timezone - Auto-detected or manually selected
-
Save configuration
- Schedule is saved and activated
- Service starts/stops according to schedule
Schedule types
- Weekdays
- Whole week
- Custom
Monday-Friday schedule:
- Runs Monday through Friday
- Configure start and end times
- Example: 09:00 - 18:00 Monday-Friday
- Stops automatically on weekends
- Business hours operations
- Office hours analytics
- Workday reporting
Timezone configuration
Auto-detection:- System automatically detects browser timezone
- Uses detected timezone for schedule
- Convenient default for most users
- Override auto-detected timezone
- Select from available timezones
- Useful for remote teams or specific regions
- IANA timezone format (e.g.,
America/New_York) - Supports all major timezones
- Handles daylight saving time automatically
Comparing deployment modes
Quick comparison
| Feature | Always On | On Demand | Scheduled |
|---|---|---|---|
| Availability | 24/7 | When needed | On schedule |
| Startup time | None | 30-60 seconds | None (within schedule) |
| Cost | Highest | Lowest | Medium |
| Use case | Production | Development | Business hours |
| Performance | Consistent | Cold starts | Consistent (within schedule) |
Choosing the right mode
Select Always On if:- Production environment with high availability needs
- Real-time analytics requirements
- Consistent performance is critical
- Cost is not a primary concern
- Development or testing environment
- Low-traffic or occasional use
- Cost optimization is important
- Startup delays are acceptable
- Business hours operations
- Predictable usage patterns
- Cost optimization for time-based needs
- Availability during specific windows is sufficient
Best practices
Deployment strategy
Environment separation
Different modes per environmentUse Always On for production, On Demand for development, and Scheduled for staging.
Cost optimization
Right-size deploymentChoose deployment mode based on actual usage patterns, not just availability needs.
Monitor usage
Track patternsMonitor usage patterns to optimize deployment mode and schedule configuration.
Plan for growth
Scale appropriatelyStart with On Demand or Scheduled, upgrade to Always On as usage grows.
Configuration tips
- Test deployment changes - Verify service starts/stops correctly
- Monitor heartbeat status - Ensure service is running when expected
- Set appropriate schedules - Align with actual usage patterns
- Consider timezones - Configure schedules for your team’s timezone
- Review periodically - Adjust deployment mode as needs change
Troubleshooting
Common issues
Service not starting
Service not starting
Possible causes:
- Deployment mode configuration issues
- Schedule not configured correctly
- Environment or resource constraints
- Service startup errors
- Verify deployment mode is set correctly
- Check schedule configuration (if scheduled)
- Review environment configuration
- Check server logs for errors
- Try changing deployment mode
Service stops unexpectedly
Service stops unexpectedly
Possible causes:
- Schedule configuration (if scheduled)
- Idle timeout (if on demand)
- Resource constraints
- Service errors
- Check schedule configuration and timezone
- Verify on demand idle timeout settings
- Review resource limits
- Check service logs for errors
- Consider switching to Always On
Schedule not working
Schedule not working
Possible causes:
- Incorrect schedule configuration
- Timezone mismatch
- Cron expression errors
- Service not respecting schedule
- Verify schedule type and time range
- Check timezone configuration
- Validate cron expressions (if custom)
- Test schedule configuration
- Review schedule in project settings