Docs · Guides

Cost optimization

Most CloudNx bills can drop 20–40% in one afternoon without touching application performance. Walk through this list quarterly — overspend creeps in via abandoned resources, oversized instances, and forgotten snapshots.

1. Right-size every instance

Run a week, then look at the actual CPU / RAM usage in Monitoring. Rule of thumb:

  • Average CPU under 20% over 7 days → drop one size (large → medium).
  • Peak RAM under 40% → switch from m family to c (1:2 vCPU:RAM) for the same vCPU at lower cost.
  • Sustained CPU above 70% and bursty → switch from c to m for more headroom without paying for unused RAM.

Resize takes ~60s of downtime. Schedule during your lowest-traffic window. CLI:

cloudnx instance resize web-01 --type cnx.m1.medium

2. Stop instances you don’t need 24×7

Dev / staging / CI runners often only need to be up during business hours. Stopped instances cost nothing for compute — only attached storage continues to bill. Schedule with cron from any always-on host:

# 21:00 IST shutdown, 09:00 IST start, Monday–Friday only.
0 21 * * 1-5  cloudnx instance stop dev-01
0  9 * * 1-5  cloudnx instance start dev-01

A cnx.m1.large stopped at night + weekends costs ₹1,750/mo instead of ₹5,475/mo — 68% saving on idle environments.

3. Audit snapshots monthly

Snapshots bill at ₹2/GB/month. They’re cheap individually but accumulate fast — every nightly host snapshot for 30 days × 100 GB = ₹6,000/mo if you forget to prune.

# List snapshots older than 30 days:
cloudnx snapshot list --older-than 30d

# Bulk-delete those that aren't tagged "keep":
cloudnx snapshot list --older-than 30d --output json \
  | jq -r '.[] | select(.tags.keep != "true") | .id' \
  | xargs -n1 cloudnx snapshot delete

Tag the snapshots you really need (release rollbacks, compliance retention) with keep=true and let the rest auto-expire.

4. Delete detached volumes

Volumes keep billing while detached. After a VM is destroyed, the data volume often lingers. Find and prune:

# All volumes not attached to anything:
cloudnx volume list --filter status=available

# Review, then delete the ones you don't need:
cloudnx volume delete <volume-id>

Set yourself a quarterly calendar reminder to run this. A 1 TB detached volume forgotten for a year = ₹60 000 wasted.

5. Object Storage lifecycle policies

Most buckets contain logs, backups, or build artefacts that age quickly. Configure a lifecycle policy to delete (or move to cheaper tiers when those land):

# Delete objects in s3://my-builds older than 90 days:
aws s3api --endpoint-url https://s3.cloudnx.in put-bucket-lifecycle-configuration \
  --bucket my-builds \
  --lifecycle-configuration '{
    "Rules": [{
      "ID": "expire-old-builds",
      "Status": "Enabled",
      "Filter": { "Prefix": "" },
      "Expiration": { "Days": 90 }
    }]
  }'

6. Use Elastic IPs only when attached

EIPs cost a small monthly fee even when unattached. Release any reserved-but-idle IPs you’re not using:

cloudnx eip list --filter status=allocated   # idle
cloudnx eip release <eip-id>

7. Commit annually for 20% off (when GA)

Annual commitment pricing is gated on hitting our self-imposed reliability bar (multi-AZ in v1.1) so we don’t lock customers in before we’re sure we can deliver. Once available, 20% off the list rate for a 12-month commit. Until then, the postpaid path with a 30-day net invoice often beats prepaid for customers with consistent spend.

8. Watch for surprise bandwidth

Egress past the included quota bills per GB. Look at Monitoring for unusual spikes:

  • Backup jobs uploading to a non-CloudNx S3 — switch to CloudNx Object Storage (egress within the platform is free).
  • Container pulls from public Docker Hub on every CI run — push your image to CloudNx Registry instead.
  • Customer-facing CDN on a competing provider — move to CloudNx CDN, the Bunny-backed markup is cheaper than direct AWS CloudFront.

The 80/20 of CloudNx cost

Over hundreds of accounts, 80% of savings come from three steps: right-sizing (step 1), scheduled stop on dev/staging (step 2), and deleting forgotten volumes/snapshots (steps 3+4). The rest is fine-tuning.

If your bill is >₹50,000/mo, email [email protected]with your account UUID — we’ll do a free 30-min review and send you the top 5 things to change. Most reviews find 25–35% in immediate savings.