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?

closed as off-topic by Ward, kasperd, mdpc, MadHatter, HopelessN00b Aug 28 '14 at 17:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Ward, kasperd, mdpc, MadHatter, HopelessN00b
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    The best way in your case would be to use a proper database. – ceejayoz Oct 4 '13 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 – user2093708 Oct 4 '13 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. – Michael Hampton Aug 23 '14 at 18:42

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 or ask your own question.