A black-and-white photograph of two diesel generator units in a private power house, dense with engine block, gauge cluster, and generator housings
Infrastructure

Proxmox vs Cloud: Why Private Infrastructure Wins

•10 min read•By Joseph Edmonds•Image: NPS/HABS, public domain, via Wikimedia Commons

A practical comparison of Proxmox private cloud infrastructure versus public cloud solutions for PHP applications, based on cost, performance, and control rather than formal benchmarks.

Years of running Proxmox-based private cloud infrastructure have made me a strong advocate for it over public cloud, for most workloads. Public cloud has its place, but for many PHP applications, especially those with predictable workloads and specific performance requirements, private infrastructure offers superior cost-effectiveness, performance, and control.

Let me break down the comparison based on technical analysis and infrastructure considerations.

The Case for Proxmox Private Cloud

Cost Predictability

Public cloud costs can spiral out of control, whereas with Proxmox you know exactly what you're paying:

  • Hardware costs: One-time purchase, depreciated over 3-5 years
  • Electricity: Predictable monthly costs
  • Maintenance: Planned hardware refresh cycles
  • No surprise bills: No bandwidth charges, no storage tier surprises

Organisations often find significant cost savings when migrating from public cloud to private infrastructure, particularly for predictable workloads with consistent resource requirements.

Performance Control

With Proxmox, you control the entire stack:

# Proxmox VM configuration for high-performance PHP
cores: 8
memory: 32768
scsi0: local-lvm:vm-100-disk-0,size=100G,ssd=1
net0: virtio,bridge=vmbr0,firewall=1
# CPU affinity for predictable performance
numa: 1
cpu: host

This level of control is hard to get anywhere close to on public cloud, where you're sharing resources with noisy neighbours.

Data Sovereignty

Your data stays on your hardware, in your location. This is crucial for:

  • GDPR compliance
  • Industry regulations (healthcare, finance)
  • Sensitive business data
  • Customer privacy concerns

Setting Up Proxmox for PHP Applications

Hardware Selection

For PHP applications, I recommend:

  • CPU: AMD EPYC or Intel Xeon with high clock speeds
  • RAM: 128GB+ for database caching and PHP opcache
  • Storage: NVMe SSDs for database and application storage
  • Network: 10GbE for inter-node communication

Proxmox Cluster Configuration

# /etc/pve/corosync.conf
totem {
    version: 2
    secauth: on
    cluster_name: php-cluster
    transport: udpu
}

nodelist {
    node {
        ring0_addr: 192.168.1.10
        nodeid: 1
    }
    node {
        ring0_addr: 192.168.1.11
        nodeid: 2
    }
    node {
        ring0_addr: 192.168.1.12
        nodeid: 3
    }
}

quorum {
    provider: corosync_votequorum
    expected_votes: 3
}

logging {
    to_syslog: yes
}

PHP-Optimised VM Templates

Create standardised templates for your PHP applications:

# VM template for PHP applications
agent: 1
boot: c
bootdisk: scsi0
cores: 4
cpu: host
memory: 8192
name: php-template
net0: virtio,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-template-disk-0,size=40G
scsihw: virtio-scsi-pci
smbios1: uuid=auto
sockets: 1
vmgenid: auto

When Public Cloud Makes Sense

I'm not blindly against public cloud. It's appropriate for:

  • Highly variable workloads: Seasonal spikes, unpredictable traffic
  • Global distribution: Need for edge locations worldwide
  • Small teams: Lack of infrastructure expertise
  • Rapid prototyping: Quick deployment for testing
  • Regulatory requirements: Need for specific compliance certifications

Why Private Infrastructure Tends to Win on Performance

Database Performance

No formal benchmarks here, just the reasoning behind why MySQL on Proxmox tends to outperform AWS RDS for a given spec:

  • Dedicated resources: No noisy neighbour effects
  • Optimised storage: Direct NVMe access without virtualisation overhead
  • Network latency: Local network communication
  • Custom tuning: Database and application optimisation for specific workloads

PHP Application Performance

The same reasoning applies to the PHP application tier. PHP applications often perform better on private infrastructure due to:

  • CPU affinity: Dedicated CPU cores for consistent performance
  • Memory optimisation: Tuned opcache and buffer pool settings
  • Storage performance: Local NVMe storage for session data and file operations
  • Network latency: Reduced database connection overhead

Migration Strategy

Gradual Migration

Don't migrate everything at once - start with:

  1. Development environments: Low risk, learning opportunity
  2. Internal tools: Non-critical applications
  3. Staging environments: Performance testing
  4. Production databases: Biggest performance gains
  5. Application servers: Final migration

Hybrid Approach

Use the best of both worlds:

  • Proxmox: Core applications, databases, consistent workloads
  • Public cloud: CDN, backup storage, disaster recovery
  • Edge computing: Public cloud for global presence

Operational Considerations

Monitoring and Alerting

Monitoring is worth setting up properly, but there's a wrinkle: the Proxmox API returns JSON rather than Prometheus's text-exposition format, so scraping it directly doesn't work, and you need to route requests through prometheus-pve-exporter instead, which translates the API into real metrics:

# Prometheus configuration for Proxmox. The Proxmox API returns JSON, not
# Prometheus's text-exposition format, so scraping it directly won't work -
# route through prometheus-pve-exporter, which translates the API into
# real metrics.
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'proxmox'
    static_configs:
      - targets: ['proxmox1:8006', 'proxmox2:8006', 'proxmox3:8006']
    metrics_path: '/pve'
    params:
      module: [default]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: pve-exporter:9221

Backup Strategy

Automated backups are crucial:

#!/bin/bash
# Proxmox backup script
vzdump --mode snapshot --compress lzo --storage backup-storage --all --mailto [email protected]

# Offsite backup to cloud storage
rclone sync /backup-storage/dump/ remote:backups/$(date +%Y-%m-%d)/

High Availability

Configure HA for critical services:

# Create an HA group across the cluster nodes
ha-manager groupadd web-servers --nodes proxmox1:1,proxmox2:1,proxmox3:1 --restricted 1

# Add a VM as an HA-managed resource within that group
ha-manager add vm:101 --group web-servers --max_restart 3 --max_relocate 3

Security Advantages

Network Isolation

Complete control over network topology:

  • VLANs for different environments
  • Firewall rules at the hypervisor level
  • No shared network with other tenants
  • Custom routing and load balancing

Physical Security

It's your hardware, so you set the rules:

  • Controlled access to servers
  • Hardware-level encryption
  • Secure disposal of storage
  • No multi-tenancy risks

Common Challenges and Solutions

Hardware Failures

Plan for failures with redundancy:

  • RAID configurations for storage
  • Redundant power supplies
  • Hot-swappable components
  • Cluster configuration for failover

Scaling Challenges

Scaling requires planning:

  • Design for horizontal scaling from the start
  • Use load balancers and auto-scaling scripts
  • Plan hardware refresh cycles
  • Implement proper monitoring for capacity planning

ROI Calculation

Consider these factors when calculating ROI:

<?php

// TCO comparison framework: illustrative example figures, replace with your own numbers

// Private infrastructure costs
$hardwareCost = 45000; // initial investment (GBP)
$electricityPerYear = 6000;
$maintenancePerYear = 4000;
$staffTimePerYear = 8000;
$years = 5;

$totalPrivate = $hardwareCost + ($electricityPerYear + $maintenancePerYear + $staffTimePerYear) * $years;

// Public cloud costs
$monthlyCloudCost = 3500;
$months = $years * 12;

$totalCloud = $monthlyCloudCost * $months;

// Break-even analysis: months until the hardware investment is offset by the
// monthly saving versus cloud spend
$monthlyPrivateOperatingCost = ($electricityPerYear + $maintenancePerYear + $staffTimePerYear) / 12;
$breakEvenMonths = $hardwareCost / ($monthlyCloudCost - $monthlyPrivateOperatingCost);

Choosing Between Proxmox and Public Cloud

The infrastructure choice comes down to workload shape, not fashion:

  • Choose Proxmox if your workload is predictable, you have (or can build) in-house ops capability, and data residency or compliance requirements favour keeping hardware under your own control.
  • Choose public cloud if your workload is genuinely spiky, you need global points of presence, or your team is too small to own hardware lifecycle and on-call.
  • Choose a hybrid split if you have a stable core, such as databases and application servers, alongside genuinely elastic edges like CDN, backup, and disaster recovery; the two aren't mutually exclusive.

The key is matching the infrastructure to your specific needs. For many PHP applications, especially those with steady workloads and clear performance requirements, Proxmox private cloud is the more cost-effective, more controllable choice.

Don't follow the crowd into public cloud just because it's trendy. Evaluate your specific needs, run the numbers, and choose the infrastructure that best serves your business requirements.

Need infrastructure that's actually run this way?

Get in touch