在哪里可以把共享文件的亚马逊AWS设计失败的架构? [英] Where to put shared files on amazon AWS design for failure architecture?

查看:201
本文介绍了在哪里可以把共享文件的亚马逊AWS设计失败的架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AWS上一个简单的LAMP网站。我想至少有2个实例,将连接到RDS,我将有一个负载平衡器。 简单的问题,在网络上没有回答是:你在哪里把共享用户上传,如图像文件

I have a simple LAMP website on AWS. I want at least 2 instances, that will connect to RDS, and I'll have a load balancer. The simple question, not answered on the web is: Where do you put the shared user uploaded files like the images?

NFS应该是一个答案。我的意思是,像创建另一个实例,通过NFS共享文件夹和其他实例安装它们。但它是一个故障点。

NFS should be one answer. I mean,something like create another instance, sharing a folder through NFS and the other instances mount them. But it is a failure point.

实例之间¿Rsync的文件夹?!!

Rsync folders between instances ¿?!!

我发现最好的答案就是使用s3fs,和我所有的情况下安装一个S3桶。但我不喜欢用不支持亚马逊的东西。

The best answer I found is to use s3fs, and mount an s3 bucket on all my instances. But I don't like to use things not supported by Amazon.

什么是正确的解决方案?

What is the right solution?

谢谢!

解决方案:

我试过s3fs,但我经历了很多的问题(即与最终一致性)。

I tried s3fs but I experienced many issues (ie with Eventual Consistency).

所以,最后我实现了AWS SDK和使用S3库直接上传到S3。 然后指着一个域名,直接在S3存储。

So, finally I implemented the AWS SDK and used the S3 library to upload directly to S3. Then pointed a domain to the s3 bucket directly.

感谢所有

推荐答案

为什么不把在S3中的文件?你不需要使用像s3fs - 只需使用常规的S3 API来将文件上传到S3

Why not put the files in S3? You don't need to use something like s3fs - just use the regular s3 apis to upload the files to s3.

用户还可以上传文件直接到S3不通过你的服务器去,如果使用的后API

Users can also upload the files straight to s3 without going via your server if use the post api

这篇关于在哪里可以把共享文件的亚马逊AWS设计失败的架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆