Skip to main content
Entirius
AI platform for e-commerce
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

ADR-017: KVM Virtualization for Service Hosting

Status

Status: Accepted Date: 2025-09-15 Authors: Development Team

Decision

KVM (Kernel-based Virtual Machine) virtualization is adopted as the recommended hosting approach for Entirius platform services.

Use: KVM hypervisor with libvirt for virtual machine management
Instead of: Docker containers, bare metal deployment, or cloud infrastructure
Reason: Provides strong VM-level isolation, near-native performance, and full infrastructure control while maintaining cost-effectiveness through open-source tooling.

Quick Reference

# List running VMs
virsh list

# Start/stop VM
virsh start vm-name
virsh shutdown vm-name

# Create VM snapshot
virsh snapshot-create-as vm-name snapshot-name

# Clone VM
virt-clone --original vm-name --name new-vm --auto-clone

VM Naming Convention

The Entirius platform uses the following VM naming pattern:

{company}-{environment}-{service}-{instance}

Components:

  • {company} - Company or client identifier
  • {environment} - Deployment environment (dev, test, staging, prod)
  • {service} - Service name or purpose (api-gateway, pim-service, n8n, database)
  • {instance} - Instance number (1, 2, 3) for horizontal scaling

Examples:

company-prod-n8n-1              # Production n8n automation server
company-prod-grafana-1          # Production monitoring dashboard
company-prod-api-gateway-1      # Production API gateway, first instance
company-prod-api-gateway-2      # Production API gateway, second instance (load balanced)
company-prod-pim-1              # Production PIM service
company-prod-database-1         # Production database server
company-stage-api-gateway-1     # Staging environment API gateway
company-dev-pim-1               # Development PIM service
company-test-pim-1              # Test PIM service

Context

The Entirius platform requires a hosting strategy that supports isolation between services, scalable resource allocation, easy deployment and disaster recovery, environment separation (dev/test/prod), and cost-effective infrastructure utilization.

Rationale

  • Primary benefit: Strong VM-level isolation with near-native performance provides security and stability for multi-tenant service hosting while maintaining full infrastructure control
  • Trade-offs: Requires virtualization-capable hardware and additional management overhead compared to bare metal or containers
  • Impact: Self-hosted open-source solution eliminates licensing and cloud costs, enables consistent dev/test/prod environments via VM templates, and provides robust backup through snapshots
  • ADR-001: KVM virtualization supports modular service deployment
  • ADR-014: n8n workflows can manage VM provisioning and deployment
  • ADR-016: Grafana can monitor VM resources and service health