Aug 8, 2011
tom

Bonding Virtual Server with an Apache Proxy Gateway

Question

I have two situations. Individually they work great, but together, the system will not resolve my websites. A general overview of my test environment: Proxmox VE server that has multiple VMs for different websites and a gateway VM that will redirect a user’s connection to a different server based on the domain name used. Without the Bonding in Proxmox (balanced-rr) this Apache Proxy Gateway works fine. However, when I enable Round Robin, the user cannot access the websites. If I bypass the Apache Proxy Gateway and point the port 80 to a specific internal IP address, it works. Something between Bonding and the Gateway do not like each other.

Interfaces of the Proxmox Server in Round Robin Mode:

iface eth0 inet manual
iface eth1 inet manual
auto bond0
    iface bond0 inet manual
        slaves eth0 eth1
        bond_miimon 100
        bond_mode balance-rr
auto vmbr0
iface vmbr0 inet static
        address  192.168.1.4
        netmask  255.255.255.0
        gateway  192.168.1.1
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

So obviously, the IP address of my Proxmox server is 192.168.1.4. The IP address of my Gateway server is 192.168.1.2.

The httpd.conf file looks like this:

<VirtualHost *:80>
DocumentRoot /var/www/wordpress.domain.me
ServerName wordpress.domain.me
ProxyRequests Off
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>
ProxyPass / http://192.168.1.61/
ProxyPassReverse / http://192.168.1.61/

<VirtualHost *:80>
DocumentRoot /var/www/wiki.domain.me
ServerName wiki.domain.me
ProxyRequests Off
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>
ProxyPass / http://192.168.1.62/
ProxyPassReverse / http://192.168.1.62/
</VirtualHost>

So again, my question is, why is it that when I set the Proxmox server to Round Robin (bonding two nics) am I unable to route my domains like I was before. Everything works perfectly fine if I bond the two nics on the Proxmox to active-backup. And again, the Gateway server is a VM within the Proxmox server as well as the two other web servers.

If you’re wondering why I am trying to do this then I will go ahead and get that out of the way. Basically I’m testing a few different projects at the same time at home. The easiest way for me to test and build some of these things is in a virtual environment. However, at home I am given only 1 external ip address. When I make the presentation to my clients, I would like to have the subdomain properly point to another local server and not use something like port 81,88,8080, etc.

Answer

The solution was that once the Proxmox environment recovers after configuring the bond, the Gateway machine needed to be rebooted again. The speeds between the Virtual Machines have jumped from about 75MB/s to about 140-165MB/s. The hardware NICs do affect the transfer rates of the locally hosted VMs. Numbers win again, yay.

Related posts:

  1. HTTP proxy with zimbra zcs
  2. Linux VPN – what to do after getting connected
  3. Running a virtual machine on a CentOS server
  4. Random temporary network freeze on kvm guest machines
  5. how to use Apache mod_proxy to provide access to Tomcat webapp

Leave a comment