0

I need to plot trend charts on the react app based on user inputs such as timestamps, devices, etc. I have related time series data in DynamoDB and S3 (which I can query using Athena).

Returning all those millions of data points for a graph seems unreasonable and is super laggy.

I guess one option is "binning" where I decide the number of bins based on how big the time range is and take averages of the readings in that bin. However, concerned about how well it will show the drops and high we need to show them accurately.

Athena queries and DDB queries (due to the 1MB limit) - both seem fairly slow so far.

Of course the size of the response payload is another concern as API and Lambda both limit it to 10 and 6Mb respectively.

Any ideas?

systemdebt
  • 4,589
  • 10
  • 55
  • 116

1 Answers1

1

I can't suggest anything smarter than "binning", but if you are concerned that the bucket interval might become too wide and performance might suffer, you can fixate the interval. Then create more than one table. For example, the interval can be 1 hour and you can have a new table for each week.

This is what we did when we had to deal with time series in dynamo. At some point, we decided to switch to Amazon Timestream

Borislav Stoilov
  • 3,247
  • 2
  • 21
  • 46