AWS analytics feels slow by default
Hey ๐๐ฝ
We've been running Plausible for the analytics on awsfundamentals.com. Good software, no complaints. We still wanted the data to be ours: our retention, our schema, nobody's script in the visitor's browser.
So we built the dashboard ourselves. Twice, on two different backends, fed by the same CloudFront logs.
Then we measured both instead of arguing about them.
In this issue: what AWS-native analytics actually costs in seconds and in dollars, and where it holds up fine.
SQL in, REST API out
Stream events into Tinybird, write a SQL pipe, publish it. That's your API: ClickHouse underneath, no serving layer to write, nothing to keep warm. Schemas and pipes are files in your repo, and you test a schema change on a branch of real production data before it ships.
Sponsored by Tinybird. This issue's deep dive was done in collaboration with them, and every number in it is measured from our own setup.
๐ This Week's Deep DiveOne dashboard, two backends, the same CloudFront real-time logs feeding both. The AWS-native side: Kinesis, a writer Lambda, JSON on S3, a Glue crawler keeping the catalog current, Athena on top. The other side: the same Kinesis stream, a forwarder Lambda, a Tinybird Data Source, and four SQL pipes published as endpoints. One frontend queries both and renders them next to each other, so every number came out of the same UI.
Then we stopped guessing at Athena's reputation and measured it: the same four dashboard queries against both backends, every ~80 seconds for 15 minutes. 48 calls each side, nothing warmed up, nothing cached. Athena never answered in under 11 seconds. Not on the first call, not on the 48th. The band sat between 11.3s and 16.1s the entire run and averaged 12.5s. Tinybird stayed under 2s throughout, averaging about 1.0s, on the free tier. Part of that Athena number is our own file layout, not Athena, and we break that down honestly on the blog. Along with the identical schema change run on both sides with a stopwatch, what a Glue crawler costs once you want fresh data, and the one thing that made AWS-native competitive again. |
The honest takeaway: AWS-native isn't broken, it's just cold every single time. You can fix that yourself with a cache layer and Partition Projection, and then you own a cache layer.
See you next week! ๐
Tobi & Sandro