A meaty issue for the networking gurus out there. I am using my development and production environments over a VPN that I have set up between two office locations. The issue is that my production application instance runs as fast as I could want, but the development environment is extremely slow, like "click a link and get some coffee" slow. Both instances are plain vanilla from the manual, they both run on Ubuntu 10.04LTS and both use a MySQL back end. The main difference is that the development instance runs on a WebBrick server and the Production instance runs on Apache2 with Passenger Phusion. All of the servers are on the same subnet and in fact, the boxes sit right next to each other on the same Gigabit bridge. The development database is actually on a separate machine from the web server whereas the Production Web Server and Database run on separate Virtual Machines on the same server. The real nub is that when I am on the same subnet, I can hardly tell the difference between the two instances - they run pretty much at the same speed. It's only when I am running on a separate subnet over the VPN that the performance difference is so drastic.
Any ideas? Does WebBrick send out a lot more data to the browser than Apache? I run the development instance (Rails Server) in a terminal in the foreground on the development box so I can see the log file when I need to and kill the server easily. Should I run it in the background? Is there any communication between the browser and the foreground process? I'm just trying to figure out what is being sent over the VPN since that seems to be the bottleneck.