You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm optimizing Dynamo writes for a write-heavy workload, and I wanted to make a case for adding support for WriteUnits to the stats API parameter. The OneTable documentation (stats param) suggests this is only for find/query/scan operations for now, and it would be great to have it for Write operations (e.g. DeleteItem, PutItem, UpdateItem, BatchWriteItem).
Motivation
Why this may be helpful to others:
Writes cost more than reads, per unit
Write Units may not be intuitive, especially for deletions or update expressions
Writing a 1 character field writes the whole entry (ie 1 byte may cause > 1 WCU write)
Indexes affect overall write usage
Estimations are helpful, but not as precise as empirical measurements with AWS counts
Or if someone can guide me to the place in the codebase where the change should be made, and it's quick enough, maybe I/someone else can find some time to submit a Pull Request.
Code Sample
Example Output with ConsumedCapacity when calling DeleteItem and PutItem:
/** Output via raw Dynamo lib, of the code snippet below: * Starting: dynamoWriteExperiments.ts * Deletion: { ConsumedCapacity: { TableName: 'example', CapacityUnits: 2 } } * Creation { ConsumedCapacity: { TableName: 'example', CapacityUnits: 2 } } */
Hey team!
Summary
I'm optimizing Dynamo writes for a write-heavy workload, and I wanted to make a case for adding support for WriteUnits to the
stats
API parameter. The OneTable documentation (stats param) suggests this is only forfind/query/scan
operations for now, and it would be great to have it for Write operations (e.g. DeleteItem, PutItem, UpdateItem, BatchWriteItem).Motivation
Why this may be helpful to others:
Or if someone can guide me to the place in the codebase where the change should be made, and it's quick enough, maybe I/someone else can find some time to submit a Pull Request.
Code Sample
Example Output with ConsumedCapacity when calling DeleteItem and PutItem:
Code sample using underlying AWS SDK:
The text was updated successfully, but these errors were encountered: