Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extreme slowdown Cloud vs VPS (Amazon, Jelastic)

We are trying to move one of our web-services (Java) to the cloud from a development server, here are the details:

There is a PHP front-end, connecting to a Java-based web-service that is connected to a MySQL database (all requests to the database are sent from the web-service, the php part is communicating with the Java back-end only, no direct connection to the database).

Start Point

Dev Server - CentOS (cPanel), 765MB-1.5GB RAM, 4CPU, Tomcat 7

*the software is running fast, no speed issues, logs show normal CPU and memory usage

Scenario #1

PHP front-end on Elastic Beanstalk and Java web-service with database on Elastic Beanstalk

*the software is about 80% slower, logs show normal CPU and memory usage

Scenario #2

PHP front-end on VPS (same company/location with Jelastic) and Java web-service with database on Jelastic

*the software is about 70% slower, logs show normal CPU and memory usage

Scenario #3

PHP front-end on VPS, Java web-service with database on Elastic Beanstalk and Jelastic (swithing)

*the software is about 70-80% slower, logs show normal CPU and memory usage on both cloud environments

What I figured out, no matter where the PHP front-end is located, that will load fast, nothing to search here.

As soon as the Java back-end is moved from the VPS to the cloud (doesn't matter if Amazon or Jelastic), the whole software slows down extremely. Based on the logs and since we tried with two providers, this doesn't seem like a resource issue.

It cannot be a connection issue since we tried to have the PHP and Java in the same environment (Scenario #1).

It is either the Java web-service slowing down extremely (for unknown reason as logs show low resource usage) or it could be the connection between the Java application and the database (I doubt since in the first scenario, all three components are on Amazon, same environment, location).

Anyone ever had such an issue before? Any ideas? Thank you!

(note, I have zero experience with cloud hosting)

like image 250
Yatko Avatar asked Oct 18 '13 12:10

Yatko


2 Answers

It might be related to specific parameters in configuration files, mostly for DB. Please double check that they are the same in each test. Also it is not clear how you measure performance and what "slower" exactly means. And you have not specified size of resources on Jelastic and EB. Please double check that resources are equal as well.

like image 89
Ruslan Avatar answered Oct 19 '22 10:10

Ruslan


For high performance Java cloud backend, you can try Jelastic implementation by Elastx - see the performance research that CloudSpectator did on them (they also used Amazon and Rackspace cloud in the study): http://blog.jelastic.com/wp-content/uploads/2013/09/Elastx-Fueld-by-SolidFire-9-5-13+Jelastic.pdf

Also, I do not know who your current Jelastic provider is, but if you contact them by clicking Help / Contact Support in Jelastic dashboard, I am sure that they will be happy to troubleshoot the issue! If this does not help - please ping me offline.

like image 38
DSotnikov Avatar answered Oct 19 '22 09:10

DSotnikov