Looking for a clarification and guidance on the best practice.
Where should we store images, CSS and log files of the application? Application server or S3?
We will be storing user related images and thumbnails on S3. We will not be using CloudFront at this stage until there is a real need.
Another set of questions I have is related to EBS. Should the application server use EBS volume? What is the benefit of doing this? Would we pay extra for using EBS.
Thanks.
Yes EBS costs extra. The advantage to EBS is that is simple to access, it shows up as a drive on your server, versus S3 which you have to go through their API. Also, EBS content is permanent. Anything you store in your instance (not inside S3 and not inside an EBS volume) is not permanent, and can disappear if your machine is restarted.
S3 is a bad idea for log files, since you cannot append to an object in S3. User data that doesn't change too often (like only a couple times a day or less) makes sense in S3. Something that changes all the time might make more sense in a database (stored on EBS).
You could use an Amazon EBS backend instance for all your needs.
EBS is a product oriented to increase disk access performance and availability. The ephimeral storage is suboptimal for I/O operations. Using EBS, you can still access your data if you can't access your instance. Is perfect to store critical data or a database.
Store all
css
,js
,css
related images using CloudFront. To do this you have to store the files first in S3, then apply CloudFront to your bucket. Make use of the special header (Expires, Cache-Control), so the users only download this element one time.Also you can backup your logs to S3 for permanent storage using s3cmd or duplicity. Is a cheap option and you don't run out of disk space.