-2

I know many people have asked how to sync multiple ec2 instances and it seems the usual answer is to store all the assets in S3. Would this still make sense if the only thing I am trying to share between instances are blank text files?

Let me give a little background as to what I am trying to accomplish. Instead of having the user query the database to check for updated information every time, it compares the last modified date by touching a specific blank text file to a date stored on the device (iphone). This allows it to only query the database when something has been updated. My thinking was the less queries to the database the better. Would the best way to do this still be to store these blank text files in S3 or is there a solution to sync these blank text files across multiple instances every 1-5 mins?

3
  • 1
    The best way in your case would be to use a proper database.
    – ceejayoz
    Commented Oct 4, 2013 at 16:31
  • What do you mean a proper database? Right now the EC2 instance has php scripts that make calls to RDS to grab a particular filename and then grabs that file from S3. I want to limit the amount of unnecessary calls to RDS by comparing 2 last modified dates in a blank text file first but I need those text files to be synced across multiple Ec2 instances Commented Oct 4, 2013 at 17:06
  • You don't need S3 at all here. Just store the timestamp directly in the database and save yourself a lot of trouble. Commented Aug 23, 2014 at 18:42

1 Answer 1

3

If you are attempting to prevent DB access and can live with non-persistent storage, why not use a cache.

Memcache could fill the bill, is fast, and is simple to setup and program for. Redis and several others can do much the same while providing some persistence.

Not the answer you're looking for? Browse other questions tagged .