使用 S3 作为数据库与数据库(例如 MongoDB) [英] Using S3 as a database vs. database (e.g. MongoDB)
问题描述
由于设置简单且成本低,我正在考虑使用 AWS S3 存储桶而不是 NoSQL 数据库来将简单的用户设置保存为 JSON(大约 30 个文档).
Due to simple setup and low costs I am considering using AWS S3 bucket instead of a NoSQL database to save simple user settings as a JSON (around 30 documents).
我研究了不使用与我的用例无关的数据库的以下缺点:
I researched the following disadvantages of not using a database which are not relevant for my use case:
- 列出存储桶/文件会花费您金钱.
- 无更新 - 您无法更新文件,只需替换即可.
- 没有索引.
- 版本控制将花费您 $$.
- 没有搜索
- 没有交易
- 无查询 API(SQL 或 NoSQL)
使用 S3 存储桶代替数据库还有其他缺点吗?
Are there any other disavantages of using a S3 bucket instead of a database?
推荐答案
您正在考虑使用 AWS S3 存储桶而不是 NoSQL 数据库",但事实是 Amazon S3 实际上是一个 NoSQL数据库.
You are "considering using AWS S3 bucket instead of a NoSQL database", but the fact is that Amazon S3 effectively is a NoSQL database.
这是一个非常大的键值存储.Key 是文件名,Value 是文件的内容.
It is a very large Key-Value store. The Key is the filename, the Value is the contents of the file.
如果您的需求只是用这个键存储一个值"和用这个键检索一个值",那么它就可以正常工作!
If your needs are simply "Store a value with this key" and "Retrieve a value with this key", then it would work just fine!
事实上,Amazon.com 上的旧订单(超过一年)显然已存档到 Amazon S3,因为它们是只读的(无退货,无更改).
In fact, old orders on Amazon.com (more than a year old) are apparently archived to Amazon S3 since they are read-only (no returns, no changes).
虽然比 DynamoDB 慢,但 Amazon S3 的存储成本肯定要低得多!
While slower than DynamoDB, Amazon S3 certainly costs significantly less for storage!
这篇关于使用 S3 作为数据库与数据库(例如 MongoDB)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!