在DynamoDB中同时(同一秒)发生多个读取或写入请求时,会发生什么情况?

时间:2018-08-10 09:24:12

标签: amazon-web-services amazon-dynamodb

1个RCU是每秒1个请求,这是每个请求4KB /秒,以实现强一致性,每个(4x2)8KB /秒,以实现最终一致性。

如果应用程序每秒收到10个强一致性读取请求,并且RCU为1,在这种情况下会发生什么? DynamoDB每秒只能响应1个请求? RCU为10时会怎样? DynamoDB每秒可以响应10个请求?

如果我每秒对表有成千上万的请求,对我的应用程序会发生什么?

1 个答案:

答案 0 :(得分:1)

您的请求将受到限制。 看到这里:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ProvisionedThroughput.html

If your read or write requests exceed the throughput settings for a table,
DynamoDB can throttle that request. DynamoDB can also throttle read requests 
exceeds for an index. 
Throttling prevents your application from consuming too many capacity units.
When a request is throttled, it fails with an HTTP 400 code (Bad Request) and 
a ProvisionedThroughputExceededException. 
The AWS SDKs have built-in support for retrying throttled requests (see Error 
Retries and Exponential Backoff), so you do not need to write this logic 
yourself.