A friend of mine have set up a host for webdev purpuses and after my advice used fresh PVE instead of initialluy choosen Hyper-V.
The host is at datacenter, and they provided only one IPv4 address, and renting more is a bit tricky there.
So, my friend installed nginx at Proxmox host itself, which proxy-passing the requests to VMs where data of each of his sites located.
The scheme is quite simple:
1. vmbr0 at PVE host is WAN interface, so public IPv4 is at it.
2. vmbr1 at PVE host is Backend network interaface, with private IP.
3. Each VM has an interface in vmbr1-backed network, and assigned an IP from the same subnet.
It works, but strangely sometimes sites are expirence a bit slow response. Say, one site used to answer within 100ms, but rarely it can wait for maybe 2 seconds - which is quite big response time.
And the problem is, the host itself is mainly free (up to 10% of CPU, up to 30% of RAM are used in high hours only).
So the question is, how to catch where is the problem. Seems like somewhere in network between Nginx (at PVE host) and Apache (at VM), but this can't be, this is virtual network!
The host is at datacenter, and they provided only one IPv4 address, and renting more is a bit tricky there.
So, my friend installed nginx at Proxmox host itself, which proxy-passing the requests to VMs where data of each of his sites located.
The scheme is quite simple:
1. vmbr0 at PVE host is WAN interface, so public IPv4 is at it.
2. vmbr1 at PVE host is Backend network interaface, with private IP.
3. Each VM has an interface in vmbr1-backed network, and assigned an IP from the same subnet.
It works, but strangely sometimes sites are expirence a bit slow response. Say, one site used to answer within 100ms, but rarely it can wait for maybe 2 seconds - which is quite big response time.
And the problem is, the host itself is mainly free (up to 10% of CPU, up to 30% of RAM are used in high hours only).
So the question is, how to catch where is the problem. Seems like somewhere in network between Nginx (at PVE host) and Apache (at VM), but this can't be, this is virtual network!