> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repocloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Elastic Autoscaling

> Pay only for the resources you actually use with RepoCloud's dynamic scaling system

## Elastic Hourly Autoscaling

RepoCloud's Elastic Hourly Autoscaling is an intelligent resource management system that automatically adjusts your application's resources based on actual usage, helping you optimize performance while minimizing costs.

## How Autoscaling Works

Traditional cloud hosting requires you to choose a fixed resource tier and pay for those resources 24/7, regardless of actual usage. With RepoCloud's autoscaling:

<Steps>
  <Step title="Real-time Monitoring">
    Our system continuously monitors your application's resource utilization (CPU, RAM, and storage).
  </Step>

  <Step title="Dynamic Resource Allocation">
    When demand increases, additional resources are instantly allocated to maintain performance.
  </Step>

  <Step title="Automatic Optimization">
    During periods of lower activity, resources scale down automatically to reduce costs.
  </Step>

  <Step title="Hourly Billing">
    You're billed hourly based on the actual resources consumed, rather than a fixed monthly amount.
  </Step>
</Steps>

## The Autoscaling Advantage

<CardGroup cols={2}>
  <Card title="Cost Efficiency" icon="money-bill-wave">
    Pay only for what you use, reducing waste from idle resources
  </Card>

  <Card title="Performance Optimization" icon="gauge-high">
    Automatically handle traffic spikes without manual intervention
  </Card>

  <Card title="Resource Efficiency" icon="leaf">
    Stop paying for idle servers during low-traffic periods
  </Card>

  <Card title="Simplified Management" icon="sliders">
    No need to predict exact resource requirements in advance
  </Card>
</CardGroup>

## Understanding Resource Scaling

RepoCloud's autoscaling works by dynamically adjusting three primary resources:

### CPU Scaling

<AccordionGroup>
  <Accordion title="How CPU Scaling Works">
    * CPU usage is monitored in real-time
    * When CPU utilization exceeds thresholds, additional CPU cores are allocated
    * During low CPU utilization, resources are reduced to the minimum needed
    * Scaling occurs without interruption to your application
  </Accordion>

  <Accordion title="Benefits of CPU Scaling">
    * Handle processing-intensive tasks efficiently
    * Maintain application responsiveness during peak loads
    * Reduce costs during periods of low computational demand
    * Avoid over-provisioning CPU resources
  </Accordion>
</AccordionGroup>

### Memory (RAM) Scaling

<AccordionGroup>
  <Accordion title="How RAM Scaling Works">
    * Memory usage is continuously monitored
    * When RAM utilization approaches capacity, additional memory is allocated
    * When memory needs decrease, allocation is reduced
    * Scaling ensures your application always has sufficient memory without waste
  </Accordion>

  <Accordion title="Benefits of RAM Scaling">
    * Prevent out-of-memory errors during traffic spikes
    * Support memory-intensive operations when needed
    * Optimize costs based on actual memory requirements
    * Scale memory independently from CPU resources
  </Accordion>
</AccordionGroup>

### Storage Scaling

<AccordionGroup>
  <Accordion title="How Storage Scaling Works">
    * Storage usage is monitored
    * Additional storage is automatically allocated as needed
    * You're billed only for the storage you actually use
    * Scaling occurs without application downtime
  </Accordion>

  <Accordion title="Benefits of Storage Scaling">
    * Never run out of disk space unexpectedly
    * Pay only for the storage you utilize
    * Accommodate growing data needs without manual intervention
    * Optimize costs for applications with variable storage requirements
  </Accordion>
</AccordionGroup>

## Real-World Savings Examples

### Example 1: Blog with Variable Traffic

A blog typically receives most of its traffic during business hours and very little overnight:

* **Fixed Tier Approach**: Would require provisioning for peak traffic (4GB RAM, 2vCPU) at \$12/month
* **With Autoscaling**: Average resource usage might be only 1.5GB RAM and 0.8vCPU across 24 hours
* **Resulting Billing**: Approximately \$4.50/month (62.5% savings)

### Example 2: Business Application with Weekend Drop-offs

An internal business application used primarily Monday to Friday:

* **Fixed Tier Approach**: Requires 8GB RAM, 4vCPU at \$24/month
* **With Autoscaling**: Resources scale down by 80% during weekends (28.6% of the month)
* **Resulting Billing**: Approximately \$18.50/month (about 23% savings)

### Example 3: E-commerce with Seasonal Peaks

An e-commerce store with significant traffic during holiday seasons:

* **Fixed Tier Approach**: Would need to provision for peak season (16GB RAM, 8vCPU) at \$48/month year-round
* **With Autoscaling**: Resources might average 4GB RAM, 2vCPU during regular periods
* **Resulting Billing**: Averaged across the year, approximately \$18/month (62.5% savings)

<Tip>
  Applications with highly variable usage patterns typically see the greatest savings from autoscaling, sometimes reaching 70-90% cost reduction compared to fixed-tier pricing.
</Tip>

## Setting Up Autoscaling

Autoscaling is enabled on the deployment page and is switched on by default:

<Steps>
  <Step title="Choose Your Application">
    Select an application from the marketplace and click "Deploy Now"
  </Step>

  <Step title="Keep the Autoscale Toggle Enabled">
    Leave the "Autoscale compute and storage resources" toggle switched on (it's the default). To use a fixed server size instead, switch it off and pick a tier.
  </Step>

  <Step title="Deploy">
    Click "Deploy App". Your instance will scale between resource tiers automatically from then on, with no further configuration required.
  </Step>
</Steps>

<Note>
  Once deployed, an autoscaling instance shows "Autoscaling" as its Server Size on the management page. There are no scaling knobs to tune—the platform handles resource adjustments for you.
</Note>

## Monitoring Autoscaling

RepoCloud gives you full visibility into how your instance has been scaling:

<CardGroup cols={2}>
  <Card title="Usage Chart" icon="chart-line">
    Click "View Usage Chart" on your instance's management page to see which resource tier (from 1 GB RAM / 1 vCPU up to 32 GB RAM / 16 vCPU) your application occupied hour by hour
  </Card>

  <Card title="Usage History" icon="file-csv">
    Download a detailed usage history from the Billing tab to reconcile exactly what you were charged for
  </Card>
</CardGroup>

## Billing with Autoscaling

With autoscaling enabled, your billing works differently from fixed-tier pricing:

1. **Hourly Metering**: Resource usage is measured on an hourly basis
2. **Hourly Rate**: Each hour is billed at the rate of the resource tier your instance used during that hour
3. **Credit Deduction**: Hourly charges are deducted from your prepaid account credit
4. **Baseline Cost**: An instance that runs continuously all month costs at least the Tier 1 rate (\$3.00 per month); pausing an instance reduces billing to 25% of the normal rate

<Note>
  Billing for autoscaled applications is transparent. The usage chart and downloadable usage history show you exactly what you're being charged for.
</Note>

## Autoscaling Limitations

While autoscaling is powerful, there are some limitations to be aware of:

* **Platform Apps**: Autoscaling is not available for [Platform Apps](/platforms/introduction) (Coolify and Dokploy), because it doesn't apply to backends requiring dedicated IPv4 and root access
* **One-Way Switching**: A fixed-size instance can be switched over to autoscaling at any time, but an autoscaled instance cannot be switched back to a fixed server size
* **Resource Constraints**: Some applications may have minimum resource requirements to function properly
* **Scaling Delays**: There may be a brief delay (typically seconds) in responding to sudden, extreme spikes in demand

## When to Choose Fixed Resources

While autoscaling works well for most applications, fixed resources might be better in some scenarios:

<AccordionGroup>
  <Accordion title="Predictable Workloads">
    If your application has very consistent resource needs with minimal variation, a fixed tier might provide more predictable billing.
  </Accordion>

  <Accordion title="Budget Certainty">
    When you need absolute certainty about your monthly costs for budgeting purposes, fixed tiers provide guaranteed pricing.
  </Accordion>

  <Accordion title="Performance Guarantees">
    Applications requiring guaranteed resources at all times, regardless of actual usage, may benefit from fixed allocation.
  </Accordion>

  <Accordion title="Resource-Intensive Applications">
    Applications that consistently use near-maximum resources won't benefit as much from autoscaling.
  </Accordion>
</AccordionGroup>

## Optimizing for Autoscaling

To get the most from autoscaling, consider these best practices:

1. **Monitor Usage Patterns**: Review your instance's usage chart to understand its typical resource footprint
2. **Design for Variability**: Structure your application to efficiently handle variable resources
3. **Pause Idle Instances**: Pause instances you aren't using to reduce their billing to 25% of the normal rate
4. **Test Performance**: Verify that your application performs well at different resource levels

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="How quickly does autoscaling respond to traffic spikes?">
    Autoscaling typically responds within seconds to changes in resource needs. For most applications, this is fast enough to handle even sudden traffic spikes without noticeable performance degradation.
  </Accordion>

  <Accordion title="Will my application experience downtime during scaling?">
    Most scaling operations occur without any downtime. In some cases, applications might experience a brief period (seconds) of reduced performance during scaling, but complete downtime is rare.
  </Accordion>

  <Accordion title="How is billing calculated with autoscaling?">
    Resource usage is metered hourly, and each hour is billed at the rate of the tier your instance occupied during that hour. Charges are deducted from your prepaid account credit.
  </Accordion>

  <Accordion title="Can I cap my spending?">
    The hard ceiling for any single instance is the top tier's rate (\$96.00/month equivalent). For strict cost control, deploy with a fixed server size instead of autoscaling—your instance then never bills above that tier's rate. Because billing draws from prepaid credit, spending also can't exceed the credit you've purchased unless Auto Recharge is enabled.
  </Accordion>

  <Accordion title="What happens if my credit balance runs out?">
    Billing is prepaid, so you'll need to keep your balance topped up for instances to keep running. Enable Auto Recharge in the Billing tab to automatically purchase credit whenever your balance drops below a threshold you set.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup>
  <Card title="Resource Tiers" icon="layer-group" href="/pricing/tiers">
    Explore our fixed resource tier options
  </Card>

  <Card title="Price Comparison" icon="scale-balanced" href="/pricing/comparison">
    Compare RepoCloud pricing with other cloud providers
  </Card>
</CardGroup>
