How to make the EC2 instance call another instance?

advertisements

I have two EC2 instances. I want that if one finish a job, it will sign the other one to do other stuff.
So, how to make the communication? I don't want to use CURL.. coz it seems like expensive. I think AWS should have some simple solution but I still can't find relevant help in the documentation.

:(

also, how to send data between two instances without giong through SSH in a fast way? I know ssh can be done. but it seems slow. once again, any tool that EC2 provide to do that?


Actually, I need two methods:

1) Instance A tells Instance B to grab the data from Instance A.

  • This is answered by Adrian that I can use SQS. I will try that.

2) Once Instance B get the signal, then the data (EBS) data in Instance A needs to transfer to Instance B. The amount of data can be big even I zip it. It is around 50 MB. And I need Instance B to get the data fast so that Instance B will have enough time to process the data before next interval comes in.

So, I am thinking of either these methods:

a) Instance A has the data dump from DB, upload to S3. Then signal Instance B. Instance B gets the data from S3.

b) Instance A has the data dump from DB. Then signal Instance B. Instance B establish SSH (or any connection) to Instance A and grabs the data.

The data may need to be stored permanently but it is not a concern at this moment. It is mainly for Instance B to process.

This is a simple scenario. I'm thinking of what if I scale it with multiple instances, what the proper approach is. :)

Thanks.


How fast do you need this communication to be? SSH is pretty darn fast. The only thing that I can think of that might be faster is raw sockets (from within whatever program is running the jobs).