maximum size of attributes on AWS SimpleDB

前端 未结 5 1563
清酒与你
清酒与你 2021-02-06 01:49

I am in the process of building an mobile application (iPhone/Android) and want to store the application data onto Amazon\'s SimpleDB, because we do not want to host our own ser

5条回答
  •  鱼传尺愫
    2021-02-06 02:14

    SimpleDb is, well, simple. Everything in it is a string. The documentation is very straight-forward. And there are lots of usage restricts. Such as:

    • You can only do a SELECT * FROM ___ WHERE ItemName() IN (...) with 20 ItemNames in the IN.
    • You can only PUT (update) to 25 records at a time.
    • All reads are based on computation time. So if you do a SELECT with a LIMIT of 1000 it may return something like 800 (or even nothing) along with a nextToken in which you need to make an additional request (with the nextToken). This means that the next SELECT may actually return the limit count, so the sum of returned rows from the two SELECTs may be greater than your original limit. This is a concern if you are selecting a lot. Also, if you do a SELECT COUNT(*) you will hit a similar problem. It will return you a count, along with a nextToken. And you need to keep iterating over those nextTokens and sum the returning counts to get the true (total) count.
    • All of these computation times will be largely affected by larger data in the store.
    • If you end up having a large number of records you will likely have to shard your records across multiple domains
    • Amazon will throttle your requests if you make too many on a single domain

    So, if you plan to use large amounts of string-data, or have a lot of records, then you may want to look elsewhere. SimpleDb is very very reliable, and works as documented, but it can cause lots of headaches.

    In your case I'd recommend something like MongoDb. It has its own share of problems as well, but may be better for this case. Though, if you have lots of records (millions and upward) and then try to add indexes to too many records you may break it if it's on spindels and not SSDs.

提交回复
热议问题