简体   繁体   English

卓:我想将所有数据存储在EBS分区上。 这是一个好习惯还是应该存储在S3上

[英]AWS: i want to store all my data on EBS partition. Is it a good practise or should store on S3

I am new to AWS and trying to understand it. 我是AWS的新手,正在尝试了解它。

Presently i have a small Django App. 目前,我有一个小的Django应用。

I am planning to have an EC2 instance of type t3.small (2 cpus and 2 GB ram) 我计划有一个类型为t3.small的EC2实例(2个cpus和2 GB内存)

I will have the following EBS storages: 我将拥有以下EBS存储:

1) EBS root system: 10GB (mainly used for OS and other config files) 1)EBS根系统:10GB(主要用于OS和其他配置文件)

2) Attached EBS: 20GB (mainly used to store all the code and images and videos etc) 2)附加的EBS:20GB(主要用于存储所有代码,图像和视频等)

I will keep taking snapshot of both the EBS volumes daily. 我将继续每天拍摄这两个EBS卷的快照。

I want my images and videos only accessible from the EC2 instance. 我希望只能从EC2实例访问我的图像和视频。

So Is this approach a good approach. 那么,这种方法是一种好方法吗? or i have to use S3/ 或者我必须使用S3 /

I'll go for storing in S3 for many reasons : 由于多种原因,我将继续存储在S3中:

  • Duarbility : S3 is 99,99999999 (11x9). 耐久性:S3为99,99999999(11x9)。 Data is replicated in all AZ of the selected region. 数据将复制到所选区域的所有AZ中。 You can also easily setup a Cross Region Replication for better data durability and security. 您还可以轻松设置跨区域复制,以提高数据的持久性和安全性。
  • Price: You pay only for the disk space you're using it. 价格:您只需为正在使用的磁盘空间付费。 You don't have to specify a volume size like with EBS. 您不必像EBS一样指定卷大小。
  • Scalibility : You add data as you go and the bucket will scale to infinite. 可扩展性:随手添加数据,存储桶将扩展为无限。 If your application become successful and you have more traffic you should go to a horizontal scaling using AutoScaling and LoadBalancer and that means multiple EC2 instances. 如果您的应用程序成功并且您有更多流量,则应该使用AutoScaling和LoadBalancer进行水平扩展,这意味着多个EC2实例。 In that case it will be so easier to access Data on S3 instead on an EBS attached to an instance. 在这种情况下,在S3上而不是在附加到实例的EBS上访问数据将变得更加容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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