简体   繁体   中英

Amazon AWS EC2 Storage Options

My company is building a SAAS product (PHP) that needs some disk space, at first 1TB should be enough, but it may need more disk space in the future.

1 - Looking into AWS options the EBS solution seems like an reliable option. But if I need more than 1TB? I now that you can use multiple EBS volumes but then again I would also need to manage where the files where stored, since most of my files are under a single folder.

2- S3 is probably the best solution but we would need to rewrite all the application file access to the S3 API...

3- Also, if I need to use multiple web servers for load balancing can I mount a EBS volume in multiple EC2 instances? I supose this is wrong...

4 - Is a good practice to store the source files under Instance Storage (faster then EBS I supose), and the content files on EBS? Or should everything be stored under EBS?

Answer to 3: No you can't mount an EBS volume on multiple instances at the same time. I believe also AWS is not NFS friendly either in case you want to mount them across NFS.

Answer to 4: Use Instance Storage just for information that you don't care if it's wiped out when you shutdown the instance. Of course it's faster but it's also more volatile.

For storage I believe you should architect your app using the following memory hierarchy (also recommended by Amazon) from fastest to slowest and from possibility of lower capacity to higher capacity.

Instance Store -> EBS -> S3 -> Glacier

Like @Mark Baker said, for long term large data growth I would just recommend to stick to S3 and allow users to access it through http (or https) and letting Amazon handler all the load balancing. EBS and Instance store (in that order) are more for shorter term.

If you are currently using EBS you can probably write some automation that moves data from EBS to S3 on a periodic basis.

Another approach that I've used in the past is mounting your S3 bucket using s3fs and moving some of the files on a periodic basis to S3 leaving only symlinks in the EBS volume.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM