# LotusCloud Hardware & Datacenter Blueprint

## Datacenter Topology

```
LotusCloud Datacenter (per site)
   │
   ├── Edge Layer
   │    ├── DDoS Protection
   │    ├── WAF
   │    ├── Edge Load Balancer
   │    └── CDN Cache
   │
   ├── Core Network
   │    ├── Spine Switch x2
   │    └── Leaf Switch x4-8
   │
   ├── Compute Fabric
   │    ├── Compute Nodes (KVM)
   │    ├── GPU Nodes (optional)
   │    └── Kubernetes Workers
   │
   ├── Storage Fabric
   │    ├── Ceph MON x3
   │    ├── Ceph OSD x5-12
   │    └── Ceph RGW x2
   │
   └── Control Plane Cluster
        ├── Control Node x3
        ├── OpenStack Controllers
        └── Cloud Services (K8s)
```

## Deployment Options

### Option 1: Minimal (Development / PoC)

```
Total: 1 rack (42U)

Control Plane:        3 servers
Compute:              3 servers
Storage:              3 servers
Network:              2 switches (ToR)
Firewall:             1 unit (HA optional)

Total servers:        9
Estimated cost:       250M - 400M VND
```

### Option 2: Medium (Production Single-Site)

```
Total: 2-3 racks (42U)

Control Plane:        3 servers
Compute:              6-10 servers
Storage (Ceph):       5-8 servers
GPU (optional):       1-2 servers
Network:              4 leaf + 2 spine
Firewall:             HA pair
Load Balancer:        HA pair

Total servers:        15-25
Estimated cost:       800M - 1.5B VND
```

### Option 3: Enterprise (Multi-Site Hyperscaler)

```
Total: 4-8 racks per site, 2+ sites

Control Plane:        3 servers per site
Compute:              20-40 servers per site
Storage (Ceph):       12-20 servers per site
GPU:                  4-8 servers per site
Network:              8 leaf + 4 spine per site
Firewall:             HA pair per site
Load Balancer:        HA pair per site

Total servers:        50-100 per site
Estimated cost:       3B - 10B VND per site
```

## Server Hardware Specifications

### Control Plane Node

```
Purpose:    OpenStack controllers, K8s control plane, cloud services
CPU:        AMD EPYC 7543 (32 core) or Intel Xeon 8358 (32 core)
RAM:        128 GB DDR4 ECC
Boot:       NVMe SSD 480GB (RAID1)
Data:       NVMe SSD 960GB
NIC:        2x 25GbE (bonded)
IPMI:       1x 1GbE management
OS:         Ubuntu 22.04 LTS / Rocky Linux 9
```

### Compute Node

```
Purpose:    KVM hypervisor, VM hosting, K8s worker
CPU:        AMD EPYC 9654 (96 core) or Intel Xeon 8468 (48 core)
RAM:        256 GB - 1 TB DDR5 ECC
Boot:       NVMe SSD 480GB (RAID1)
Data:       NVMe SSD 2TB (local VM ephemeral)
NIC:        2x 25GbE (bonded) or 1x 100GbE
IPMI:       1x 1GbE management
Hypervisor: KVM via libvirt / OpenStack Nova
```

### GPU Node

```
Purpose:    AI/ML workloads, GPU compute
CPU:        AMD EPYC 9454 (48 core) or Intel Xeon 8468
RAM:        512 GB - 1 TB DDR5 ECC
GPU:        4-8x NVIDIA A100 80GB or H100
Boot:       NVMe SSD 480GB
Data:       NVMe SSD 4TB
NIC:        2x 100GbE
InfiniBand: 200Gbps (optional, for GPU clustering)
```

### Storage Node (Ceph OSD)

```
Purpose:    Ceph Object Storage Daemon
CPU:        AMD EPYC 7443 (24 core) or Intel Xeon 6330 (28 core)
RAM:        128 GB DDR4 ECC
Boot:       NVMe SSD 480GB
Cache:      NVMe SSD 1.6TB x2 (WAL + DB)
Data:       HDD 12TB 7200RPM x12 (or NVMe SSD for all-flash)
NIC:        2x 25GbE (bonded)
RAID:       JBOD (no hardware RAID, Ceph handles replication)
```

### Ceph Monitor Node

```
Purpose:    Ceph MON + MGR
CPU:        16 core
RAM:        64 GB
Boot:       NVMe SSD 480GB
Data:       NVMe SSD 240GB (MON database)
NIC:        2x 10GbE
Note:       Can be co-located on control plane nodes
```

## Network Architecture

### Spine-Leaf Topology

```
           ┌──────────┐     ┌──────────┐
           │ Spine-01  │     │ Spine-02  │
           │  100G/400G│     │  100G/400G│
           └──┬──┬──┬──┘     └──┬──┬──┬──┘
              │  │  │           │  │  │
    ┌─────────┘  │  └─────────┐│  │  └─────────┐
    │            │            ││  │             │
┌───┴───┐  ┌────┴──┐  ┌──────┴┴──┴──┐  ┌──────┴──┐
│Leaf-01│  │Leaf-02│  │  Leaf-03    │  │ Leaf-04 │
│ 25G   │  │ 25G   │  │  25G       │  │  25G    │
└───┬───┘  └───┬───┘  └────┬───────┘  └────┬────┘
    │          │           │               │
  Rack 1     Rack 2      Rack 3          Rack 4
  Control    Compute     Compute         Storage
```

### Switch Specifications

| Role | Model Examples | Ports | Speed |
|------|---------------|-------|-------|
| Spine | Arista 7050X4, Cisco Nexus 9364C | 64x 100G | 100G/400G |
| Leaf | Arista 7050X3, Cisco Nexus 93180YC | 48x 25G + 6x 100G | 25G/100G |
| Management | Any L2/L3 switch | 48x 1GbE | 1GbE |

### Network Speeds

```
Server → Leaf:         25GbE (bonded 2x 25G = 50G)
Leaf → Spine:          100GbE
Spine → Spine:         400GbE (optional)
Management:            1GbE (IPMI/BMC)
Cross-site (WAN):      10Gbps dedicated fiber
```

### VLAN Layout

| VLAN ID | Name | CIDR | Purpose |
|---------|------|------|---------|
| 10 | management | 10.10.0.0/24 | IPMI, switch management |
| 20 | control-plane | 10.20.0.0/24 | OpenStack API, K8s API |
| 30 | overlay-transport | 10.30.0.0/24 | VXLAN tunnel endpoints |
| 40 | storage | 10.40.0.0/24 | Ceph cluster network |
| 50 | storage-public | 10.50.0.0/24 | Ceph public network |
| 100 | provider-external | 203.x.x.0/24 | Public floating IPs |

## Firewall & Security

### Firewall HA

```
ISP → Firewall (HA pair) → Spine switches

Model examples:
  Fortinet FortiGate 600E/900E
  Palo Alto PA-3400
  pfSense (open source option)
```

### Security Zones

```
UNTRUST (internet)
    │
    ▼
  Firewall
    │
    ├── DMZ (edge services, LB, WAF)
    ├── TRUST (control plane, API)
    ├── COMPUTE (tenant VMs)
    └── STORAGE (Ceph cluster)
```

## Rack Layout (42U Standard Rack)

### Rack 1: Control Plane

```
U42  Cable management
U41  Patch panel
U40  Management switch (1GbE)
U39  Leaf switch 01 (25GbE)
U38  Leaf switch 02 (25GbE)
U37  Firewall 01 (active)
U36  Firewall 02 (standby)
U35  ---
U34  Control node 01 (2U)
U32  Control node 02 (2U)
U30  Control node 03 (2U)
U28  ---
U27  PDU A
U26  PDU B
```

### Rack 2-3: Compute

```
U42  Cable management
U41  Patch panel
U40  Leaf switch (25GbE)
U39  ---
U38  Compute node 01 (2U)
U36  Compute node 02 (2U)
U34  Compute node 03 (2U)
U32  Compute node 04 (2U)
U30  Compute node 05 (2U)
U28  GPU node 01 (4U, optional)
U24  ---
U23  PDU A
U22  PDU B
```

### Rack 4: Storage

```
U42  Cable management
U41  Patch panel
U40  Leaf switch (25GbE)
U39  ---
U38  Ceph MON/MGR 01 (1U)
U37  Ceph MON/MGR 02 (1U)
U36  Ceph MON/MGR 03 (1U)
U35  ---
U34  Ceph OSD 01 (2U)
U32  Ceph OSD 02 (2U)
U30  Ceph OSD 03 (2U)
U28  Ceph OSD 04 (2U)
U26  Ceph OSD 05 (2U)
U24  ---
U23  PDU A
U22  PDU B
```

## Vietnamese IDC Providers

| Provider | Tier | Locations | Notes |
|----------|------|-----------|-------|
| Viettel IDC | Tier 3+ | HN, HCM, DN | Largest infra |
| VNPT IDC | Tier 3 | HN, HCM | Government partner |
| FPT Telecom | Tier 3 | HN, HCM | Enterprise focus |
| CMC Telecom | Tier 3 | HN, HCM | Competitive pricing |
| VNG DC | Internal | HCM | VNG infrastructure |

## Colocation Cost Estimates

| Item | Minimal | Medium | Enterprise |
|------|---------|--------|-----------|
| Rack space | 15M/month | 25M/month | 50M+/month |
| Power (per kW) | 3.5M/kW/month | 3.5M/kW/month | 3M/kW/month |
| Internet (10G) | 25M/month | 50M/month | 100M+/month |
| Cross-connect | 3M/port | 3M/port | 3M/port |
| Initial setup | 250M | 800M | 3B+ |
| **Monthly** | **~50M** | **~100M** | **~250M+** |

## Performance Targets

| Metric | Target |
|--------|--------|
| VM start time | < 20 seconds |
| Intra-zone latency | < 1ms |
| Cross-zone latency | < 5ms |
| Cross-region latency | < 30ms |
| Storage IOPS (NVMe) | > 50,000 |
| Storage IOPS (HDD) | > 5,000 |
| Network throughput | 25Gbps per server |
| Object storage durability | 99.999999999% (11 nines) |
| Compute SLA | 99.99% |
