[英]Where to store thousands of images in S3 or EFS of AWS?
I will make a project in the not too distant future, a project where we will be storing thousands of thousands of images in the course of time. 我将在不久的将来创建一个项目,这个项目将在一段时间内存储成千上万的图像。 I'm on a hard decision whether to use Amazon S3 or EFS to store those images.
对于使用Amazon S3还是EFS来存储这些图像,我有一个艰难的决定。 Both I think are a very good option, but my question goes to what would be the best service or what would be the best practice?
我认为两者都是很好的选择,但是我的问题是什么是最好的服务或什么是最佳实践?
My application will be done with Laravel and I already did the integration of both services. 我的应用程序将使用Laravel完成,并且我已经完成了这两种服务的集成。
Most of the characteristics of the project are: 该项目的大多数特征是:
What dou you recommend? 您推荐什么?
S3 is absolutely the right answer and practice. S3绝对是正确的答案和实践。 I have built numerous applications like you describe, some with 100s of millions of images, and S3 is superior.
我已经构建了许多您所描述的应用程序,其中一些应用程序具有数以亿计的图像,而S3更为出色。 It also allows for flexibility such as your API returning the images as pre-signed URLs which will reduce load to your servers, images can be linked directly via static web hosting, and it provides lifecycle policies to archive less used data.
它还提供了灵活性,例如您的API将图像作为预先签名的URL返回,这将减少服务器的负载,图像可以通过静态Web托管直接链接,并且提供了生命周期策略来存档较少使用的数据。 Additionally, further integration with other AWS services is easy using event triggers.
此外,使用事件触发器可以轻松地与其他AWS服务进行进一步集成。
As for storing/uploading, S3 multi-part upload is very useful to both increase performance and increase reliability. 对于存储/上传,S3分段上传对于提高性能和提高可靠性非常有用。
EFS would make sense for your type of scenario if you were doing some intensive processing where you had a cluster of severs that needed lower latency with a shared file system - think HPC. 如果您要进行一些密集的处理,而其中的服务器集群需要通过共享文件系统降低延迟,那么EFS对于您的方案类型来说是有意义的-请考虑一下HPC。 EFS would also come at a higher cost and doesn't provide as many extensibility options or built-in features as S3.
EFS的成本也更高,并且无法提供与S3一样多的可扩展性选项或内置功能。 Your scenario doesn't sound like it requires EFS.
您的方案听起来好像不需要EFS。
http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURL.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html http://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
For the scenario you proposed AWS S3 is the choice. 对于您建议的方案,选择AWS S3。 Why?
为什么?
AWS EFS can also be an option if it happens to frequently modify the images (Where EBS is also an option) 如果AWS EFS经常修改图像,则也可以选择使用AWS EFS(在EBS也可以使用的情况下)
You can also consider using AWS CloudFront with either the option to cache images. 您也可以考虑将AWS CloudFront与任一选项一起使用来缓存图像。
Note: At the end its not about using a single service. 注意:最后,它与使用单个服务无关。 Based on your upcoming requrements you can choose either one of them or both.
根据即将到来的需求,您可以选择其中之一,也可以选择两者。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.