I am trying to execute a set of commands (shell commands) on a number of other AWS Cloud Instances from our java based web platform hosted on the AWS Cloud instance itself. We observed that the time taken to execute a command is much higher when the application is deployed on the cloud instance, than what it is when the same web application is deployed on our local machine. I was actually expecting it to be the other way round.
We are using JCloud's SSH Client APIs to execute commands on the shell of the launched Instances.
How can we resolve the latency issue that we are facing when there are a number of commands executed from a cloud instance on another cloud instance?
Is there anyone else who has observed the same issue? All the instances are in the same Availability zones and so are the EBSes.
I tried pinging the EC2 instance from my local and from within another EC2 instance. I saw the ec2-ec2 instance ping is very fast as compared to ping from my local machine, then why are my shell commands executing slow from EC2 but much faster from my local machine?
Please help i am in real soup here :( ......