We are trying to migrate one of our web services (Java) to the cloud from the development server, here are the details:
There is a PHP interface that connects to a Java-based web service that is connected to the MySQL database (all requests to the database are sent from the web service, part of php is exchanged with Java back -end only, no direct connection to the database).
starting point
Dev Server - CentOS (cPanel), Operating System 765 MB-1.5 GB, 4CPU, Tomcat 7
* software runs fast , no performance issues, logs show normal CPU and memory usage
Script # 1
PHP interface on Elastic Beanstalk and Java web service with elastic beanstalk database
* software is about 80% slower , logs show normal CPU and memory usage
Scenario number 2
PHP front-end on VPS (same company / location with Jelastic) and Java web service with database on Jelastic
* software is about 70% slower , logs show normal CPU and memory usage
Scenario number 3
PHP front-end on VPS, Java web service with elastic beanstalk database and Jelastic (swithing)
* software is about 70-80% slower , logs show normal CPU and memory usage in both cloud environments
What I understood, regardless of where the external PHP interface is located, which will load quickly and do not look for anything here.
As soon as the Java source code moves from VPS to the cloud (it doesn't matter, Amazon or Jelastic), all the software slows down a lot. Based on the logs, and since we tried to work with two providers, this does not seem to be a resource problem.
This may not be a connectivity problem, since we tried to use PHP and Java in the same environment (scenario # 1).
This either the Java web service slows down extremely (for an unknown reason, because the logs show low resource usage), or it may be the connection between the Java application and the database (I doubt since in the first scenario all three components are on Amazon, in the same environment, location).
Has anyone had such a problem before? Any ideas? Thanks!
(note, I have no experience with cloud hosting)