Dextrac
clientHow I turned minute-long analytics into one-second loads for a blockchain indexer that processed 10M+ transactions a month.
Dextrac is one of the earliest and most important node operators for the Chainlink ecosystem. The founder came up with the idea to create a monitoring and analytics platform for chainlink infrastructure providers.
I initially was tasked with building the frontend for this platform but over time had to contribute to the indexer itself and various data processing pipelines so we could ensure E2E delievery of the product.
I won’t be able to talk about the whole project or everything I’ve shipped here over the course of the almost 2 years we’ve worked together in this small project piece.
But I can tell you a fun little story.
At one point, before our attendance to Chainlink’s SmartCon in Barcelona in 2023, some analytics views grew complex enough to take minutes to load. Millions of rows of aggregated data across multiple tables does that.
We had a pretty tight deadline so I did some patchwork. I cached the heavy views in Redis on a long TTL (simply cache aside / lazy loading). Every morning before going to the conference I’d wake up a little earlier and manually warm the most-used ones so I could present without a stall.
Obviously this was not gonna hold because every time the TTL would expire some poor user would incurr the cost.
After some experimentation spikes I converged on having background jobs pre-compute daily aggregates per metric type (network, operator, etc). This meant a query that used to scan millions of rows (“read daily successful transactions over 90 days for Dextrac on Polygon” for example) now touches only a few hundred rows.
The current-day reports would refresh every few minutes so the live tail would feel fresh enough.
Load times went from minutes to a second or two & data at worst five minutes stale, which was exactly what those analytical views needed.
← all projects