How to create realtime dashboards with AWS/S3/Athena/Spectrum/Redshift

We currently have a working data pipeline solution where Kinesis Firehose writes detailed JSON data to S3 in realtime, and we can access that data from Athena or Redshift Spectrum.

We currently run a process every 15mins which recreates an aggregate table in Athena, then have Tableau dashboard refresh it’s data. I want to get that 15mins down to 1 minute, and the current approach won’t work. (Potentially I could be issuing queries against my entire athena dataset every minute, which is ridiculously expensive.)

It seems to me that there are fundamentally 2 approaches to low latency dashboards:

  1. You try and extend the traditional pipeline approach, and have something issuing sql queries every minute to rebuild tables, then have a dashboard refresh its data. This may work for an hour or 15 mins, it does not work for 1 minute.

  2. You write to some kind of streaming datastore, and have a streaming optimised dashboard read from it. Is this what ElasticSearch and Kibana do?

Given the S3 Datalake solution, what are some good ways of creating a realtime (or low latency 1-2mins) dashboard on AWS? Preferably with the components I’m already using, but I’m open to ideas to get it done.


Related discussions:

If you have JSON formatted time-series data, you can store it in Elasticsearch and visualize it with Kibana. The costs for doing this in AWS Elasticsearch can be cheap depending on how much data you have. You can find tons more data by researching time-series datastores on Google.

ELK stack works great for timeseries data. If you have any sort of OLAP workload (which presumably this is) it’s not a great fit.

It sounds like you’re completely rebuilding your aggregate table from scratch every time. Totally makes sense if you’ve been doing it completely in Athena until now. Can you put your aggregate table into Redshift proper (query out of Spectrum into Redshift with Create Table As Select) and then change your recurring job to do an incremental update? This is the generalized next step you would take in any sort of data warehouse. You just can’t really do it in Athena alone.

With firehose you can write directly in parquet, which is way better for Athena performance than using json. Then you can use cloudwatch to monitor for the new files on S3 and trigger lambdas to manually add them to your Glue tables to get near real-time data in Athena. I’m planning to set this up for one of my projects soon, so I can’t give you advice on the costs.

Yes agreed. But not sure if kibana is as mature as tableau. Or does he/she have to use tableau, as part of reqs.

Check out some custom solution in AWS Answers, you can get some hints about how to architect such solutions
https://aws.amazon.com/answers/big-data/

The above link is general but has some links for such implementations.
Moreover, AWS Solutions can be a way to go for this [ https://aws.amazon.com/solutions/ ]

When you use Firehose’s parquet conversion you can no longer compress your data before pushing it in to Firehose. At large scales this makes Firehose obscenely expensive.

Start storing aggregate chunks. It should be trivially inexpensive to “query your entire dataset every minute” if your dataset is just a series of 1 minute aggregates.

Look into Confluent and KSQL. I believe they have a Kinesis connector. We’re using Confluent/Debezium/S3 to do exactly what you describe for moving transactional data.

Ah I didn’t know that, thank you for the heads up. As long as it works out cheaper than running a Glue job almost constantly I don’t mind that.