Learn How to Deploy & Scale on CloudNexus
A comprehensive, step-by-step guide to provisioning infrastructure, deploying modern applications, and optimizing performance across our global network.
Overview
CloudNexus provides a unified platform for hosting, container orchestration, managed databases, and edge networking. This guide walks you through the complete lifecycle: from initial setup to production-grade deployment, scaling, and monitoring.
nx init --wizardPrerequisites
- Active CloudNexus account with verified billing
- CLI v2.4+ installed (
curl -sSL https://nx.dev/install | bash) - SSH key pair generated and added to your profile
- Docker or container registry access for app deployment
Deploy Your Application
Applications can be deployed via the dashboard, CLI, or Terraform provider. We'll cover the CLI approach as it offers the most flexibility for CI/CD pipelines.
Initialize the Project
Navigate to your project directory and create a nx.config.yaml manifest:
name: my-app
region: us-east-1
runtime: node:20-slim
build:
command: "npm run build"
output: ./dist
env:
NODE_ENV: production
Provision Infrastructure
Use the CLI to spin up a VPC, load balancer, and compute nodes:
nx infra create \n --type app-cluster \n --size standard-4 \n --replicas 3 \n --network isolated
Push & Deploy
Deploy your container image to the provisioned cluster:
nx deploy \n --image ghcr.io/user/my-app:latest \n --strategy rolling \n --health-check /health
Configure Auto-Scaling
Optimize cost and performance by letting CloudNexus automatically adjust compute resources based on real-time metrics.
scale:
type: target-tracking
policy:
target: avg-cpu
value: 65
cooldown: 300
limits:
min: 2
max: 20
Use Prometheus-compatible metrics or custom HTTP endpoints for scaling decisions.
scale:
type: custom
metric: http_requests_per_second
threshold: 500
scale_up: +2
scale_down: -1
Perfect for predictable traffic patterns (e.g., business hours, batch jobs).
schedules:
- cron: "0 9 * * 1-5"
replicas: 10
- cron: "0 18 * * 1-5"
replicas: 3
Database Management
CloudNexus offers fully managed PostgreSQL, MySQL, and Redis instances with automated failover and point-in-time recovery.
Provisioning a Managed DB
nx db create \n --engine postgres:15 \n --tier business-2 \n --region us-east-1 \n --backups daily \n --retention 30d
Backup & Restore
Backups run automatically. To restore to a specific point:
nx db restore \n --instance prod-db-01 \n --point-in-time 2025-11-10T14:30:00Z \n --new-name prod-db-restored
Security & Compliance
Enterprise security is built-in. Configure network isolation, encrypt data at rest and in transit, and enforce access policies.
- VPC Isolation: Run workloads in private subnets with NAT gateway outbound access
- SSL/TLS: Automatic Let's Encrypt integration or upload custom certificates
- WAF Rules: Enable OWASP Core Rule Set v4.0 for application-layer protection
- Compliance: SOC 2 Type II, HIPAA, and GDPR ready environments available
Monitoring & Alerts
Gain full visibility with built-in metrics, logs, and tracing. Integrate with Prometheus, Grafana, or Datadog via our exporters.
Setting Up Alerts
alerts:
- name: high-latency
metric: http_request_duration_ms
condition: p95 > 500
duration: 5m
notify:
- slack:ops-channel
- pagerduty:critical
Troubleshooting
Common issues and solutions when working with CloudNexus infrastructure.
Deployment Fails with "OOMKilled"
Cause: Container exceeds memory limits.
Fix: Increase memory_limit in your config or optimize your application's memory usage. Enable swap if necessary:
resources:
limits:
memory: 2Gi
requests:
memory: 1Gi
SSL Certificate Not Provisioning
Cause: DNS records not propagated or ACME challenge failing.
Fix: Verify DNS points to your CloudNexus load balancer IP. Run nx cert debug --domain example.com for detailed diagnostics.
High Network Latency Between Regions
Cause: Cross-region data transfer routing.
Fix: Enable global-optimizer mode or deploy a read replica closer to your user base.