akka-persistence-dynamodb icon indicating copy to clipboard operation
akka-persistence-dynamodb copied to clipboard

400KB snapshot limit

Open alexmnyc opened this issue 5 years ago • 6 comments

Short description

400KB snapshot state limit should be handled by sharding item payload across multiple dynamodb documents

Details

For example, if an 800KB snapshot state cannot fit into 400KB, it should be saved into 2 dynamodb items and joined back together by the snapshot journal....

alexmnyc avatar Jul 01 '19 20:07 alexmnyc

Is this a feature request? Shouldn't be really very difficult to add it.

teroxik avatar Jul 09 '19 21:07 teroxik

Correct, it would be a feature request. Thank you

alexmnyc avatar Jul 10 '19 00:07 alexmnyc

Interestingly a similar situation arose for an amazon library of an abstraction over dynamodb. In that case, the library persisted large blobs to an S3 bucket. All logical records were then physically implemented by a single dynamodb record plus, optionally, a single S3 record. Compared to the dynamic number of dynamodb records that would be required for a ddb only solution.

Not terribly difficult to manage the resulting N dynamodb records. A bit of a chore: have to make sure partial writes have expected behavior etc. Might be other advantages to N records tho.

coreyoconnor avatar Jul 29 '19 22:07 coreyoconnor

Yeah. That would make it agnostic of the payload size and would be a nice concern to eliminate.

alexmnyc avatar Jul 30 '19 18:07 alexmnyc

this design would result in the features being:

  • 400 kb limit for DDB only
    • prerequisites: IAM with DDB access; DDB table creation x 2
  • no limit for DDB + S3
    • prerequisites: IAM with DDB and S3 access; DDB table creation x 2; S3 bucket creation; S3 access policy (? might have ok default)

Always a concern when additional operations are required but the cost/benefit looks appropriate to me.

coreyoconnor avatar Jul 30 '19 18:07 coreyoconnor

Agreed

alexmnyc avatar Jul 30 '19 19:07 alexmnyc