This afternoon at #srecon, Adam Mckaig and Tahia Khan from @datadoghq about the evolution of their metrics backend
The high-level architecture looks very familiar to me. The slightly more detailed less so — many parts!
For scale, break up incoming data, put into kafka.
hash(customer_id) -> partition_id
… but then one kafka topic gets overloaded, so…
hash(customer_id) -> topic_id, partition_id
to send to topics in different clusters.
Later, some customers are too big.
So for those customers:
hash(metric_id) -> topic, partition
Since metrics are queried individually, @datadoghq can split up data to that fine grain and each query will still only need to hit one partition. #SREcon
Partitions still get unbalanced. Some customers, and some metrics, are way bigger than others.
So @datadoghq got smart with its partitioning, implementing Slicer based on a paper from Google. #srecon
The storage layer knows nothing about the partitioning scheme.
Intake and Query need the mapping from (customer, metric) to (cluster, partition) so they can send to & query from the same node.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Today at #srecon, @allspaw and @ri_cook give deep insight on real tools, incident timelines, and clumsy automation.
But not in person. 😭
Great tools (as opposed to machines) are near to hand and conform to the person who wields them. Like a hammer, or `top`. Yeah.
They are opinionated, but not prescriptive.
(machines do what they do, and you conform to them)
In software, tools like `top` help us see what’s going on in the digital space. @ri_cook et al see our work taking place on two sides of a divide. There’s meatspace (where we are) and digital space (where the software runs). You can’t reach out and feel digital stuffs.
What can we learn from ALL the incidents? @courtneynash at @verica_io compiles reports from lots of companies into the VOID: Verica Open Incident Database. #SREcon
While every incident and every company is different, the distributions have the same shape. They are “positively skewed:” more short incidents than long ones.
People.
There is a difference between a backend and an API.
Taking the endpoints that you wrote for your site, slapping some documentation on them and publishing it
does not make an API.
An API needs designing. It needs a conscious language and consistent conventions.
Standard auth.
Paging.
Careful error codes and messages.
Versioning.
A backend is whatever your front end needs. It should change when your front end needs it to change.
Don’t restrict it to historical behavior because other systems have grown dependent on it.