AWS DynamoDB is a fully managed, serverless document store that offers single-digit millisecond performance at any scale.
Designing the schema well in DynamoDB is crucial to avoid significant cost implications and degraded performance.
In a high-volume surge and inactivity application like orchestration, it is important to use on-demand pricing.
Splitting data into smaller documents and storing them in separate tables can significantly optimize the write-heavy application and reduce costs.
In scenario 1, storing the request and upstream responses in the same document resulted in a cost of $2,875 per day for 1 million requests.
In scenario 2, splitting the response data from the document and storing it in a separate table yielded a 50% reduction in cost to $1,437.5 per day.
In scenario 3, separating response data even further into separate tables for each upstream service led to a further cost reduction of 78.26% compared to scenario 2.
Thus, proper schema design plays an important role in cost optimization for DynamoDB, and smaller items with minimal document sizes are essential for optimizing write-heavy applications.