We have a standard LAMP-stack web application running on a dedicated server at hosting company A.
After some analysis we have decided that we need to put the MySQL database and various background jobs that crunch data on it on a separate server, in the hopes that leaving the web app to run only PHP will speed up the entire system.
We are getting good prices for a dedicated server at hosting company B, much better than at company A.
So my question is whether it is feasible to put MySQL at hosting company B. This means of course that MySQL queries and results need to traverse the Internet. I'm more concerned with latency than with bandwidth. Is this feasible at all? Both the companies have good internet connectivity and speed, independently considered.
Generally with this situation we have only had the Application and Database servers within the same hosting datacenter, if not the same LAN, but I'm wondering if this is still necessary.