The provided content does not include the tech blog post itself. It mainly contains Datadog’s navigation menu and a promotional link announcing its Gartner Magic Quadrant leadership, so there is not enough article content to summarize accurately.
Please provide the blog post’s full text or the relevant sections.
Wouter de Bie describes upgrading his 1992 Hunter Legend sailboat, *Second Wind*, into a connected, data-driven vessel. His goals were to unify onboard instruments, improve safety with vessel tracking, add accurate wind measurements, and collect data for later analysis. The central solution was an NMEA 2000 network, which allowed compatible devices to share data and power over a single backbone.
## Building a Unified Instrument Network
- The boat originally had a depth sounder, speedometer, autopilot, chartplotter, and GPS, but the systems were not centrally connected.
- The existing Raymarine equipment used SeatalkNG, which is compatible with NMEA 2000 despite having different cables and connectors.
- The older speed and depth displays used NMEA 0183 rather than NMEA 2000.
- Instead of adding protocol converters, Wouter replaced the older displays with new NMEA 2000-compatible instruments.
- Once connected to the backbone, speed and depth data appeared on the chartplotter.
## Why NMEA 2000 Was Chosen
- NMEA 2000 is similar to the CAN bus used in automobiles.
- Devices connect to a shared backbone and broadcast small data messages for other equipment to consume.
- The network operates at 250 kbit/s, which is sufficient for marine instruments.
- Its cables carry both power and data, reducing wiring complexity.
- Most marine electronics vendors support the standard.
## Improving Safety with AIS
- Wouter added an Automatic Identification System (AIS) transponder to detect nearby vessels.
- AIS broadcasts a vessel’s name, identifier, speed, heading, and coordinates over VHF radio.
- The system only detects AIS-equipped vessels within line of sight, but offers a lower-cost alternative to radar.
- After installing the transponder and routing its antenna cable to the stern, nearby ships appeared on the chartplotter.
- The transponder’s built-in GPS also supplied positioning data to the NMEA 2000 network.
## Adding Wind Measurements
- The original wind indicator was only an analog vane, requiring Wouter to look up at the mast and providing no wind-speed measurement.
- He purchased a NMEA 2000 wind transducer and cockpit display.
- The transducer measures wind angle with a vane and wind speed with a rotor, typically from the top of the mast.
- Installation required routing a cable through the mast and boat.
- A friend was hoisted up the mast on a calm evening to drill the mounting hole and install the sensor.
The project demonstrates how replacing incompatible legacy instruments and connecting modern devices through NMEA 2000 can turn a boat into an integrated safety and analytics platform. Once all sensor data is centralized, it can support both better sailing decisions and longer-term analysis of performance and conditions.
DDSketch was created to compute accurate percentiles from massive, distributed monitoring datasets without storing every value. The post explains why averages and exact percentile calculations are impractical for latency data, and why existing quantile sketches produced too much noise—especially at high percentiles. DDSketch addresses these needs through compact, approximate, and mergeable data structures.
## Why Percentiles Matter for Monitoring
- Application latency strongly affects user experience, sales, and revenue.
- Averages can hide extreme values and fail to represent users with the worst experiences.
- High percentiles, such as the 99th percentile, provide a more useful view of typical “bad” experiences while ignoring extreme outliers.
## Why Percentile Computation Is Difficult
- Minima, maxima, sums, and counts can be calculated using constant memory.
- Exact percentiles require retaining every value, sorting the collection, and selecting the value at the desired rank.
- This approach is infeasible for streams containing millions of monitoring points.
- Percentiles are also difficult to aggregate across distributed systems:
- Partition-level maxima, minima, sums, and counts can be merged exactly.
- Partition-level percentiles cannot determine the global percentile.
- Sending all raw values across the network would eliminate the benefits of distributed aggregation.
## Quantile Sketches
- Sketches compress data into smaller structures that preserve enough information to answer approximate queries.
- They trade some accuracy for significantly lower memory usage.
- Quantile sketches estimate percentiles without retaining every input value.
- Mergeable sketches allow multiple independently generated sketches to be combined without introducing additional precision loss.
- Mergeability supports distributed computation and pre-aggregation, such as processing data at individual hosts before sending it elsewhere.
- Datadog initially used the Greenwald-Khanna (GK) sketch for percentile metrics and histogram generation.
## Accuracy Problems with Existing Sketches
- Percentile graphs often contain noise and spikes, particularly at high percentiles.
- Some variation reflects real changes in latency caused by load or network conditions.
- GK approximation errors can add substantial artificial variation.
- Comparisons with exact percentiles show that GK-generated errors can create spikes that do not exist in the underlying data.
- Errors appear especially pronounced for the 99th percentile, reducing the reliability and usefulness of monitoring visualizations.
## Rank-Error Versus Relative-Error Guarantees
- Sketch algorithms generally expose a parameter controlling the accuracy–memory trade-off.
- Higher accuracy requires a larger sketch.
- The post identifies the need for percentile approximations whose errors are appropriate for noisy, large-scale monitoring data, motivating the design of DDSketch.
DDSketch is presented as a purpose-built solution for monitoring systems: it aims to provide accurate percentile estimates with compact storage and support for lossless merging across distributed data sources.
Datadog’s post explains why accurately computing percentiles is difficult when monitoring large-scale, distributed systems. Traditional approaches either require retaining every observation or sacrifice accuracy through fixed-size summaries, especially for long-tailed data such as request latency. DDSketch addresses this by providing mergeable percentile estimates with a guaranteed relative-error bound and memory usage that remains effectively constant.
## Why Percentiles Matter
- Averages can hide slow requests and do not describe the tail of a distribution.
- Percentiles such as p95, p99, and p99.9 are more useful for measuring latency and reliability.
- Monitoring systems must calculate these values from enormous numbers of observations across many hosts and services.
- Storing every measurement is too expensive, while calculating percentiles independently on each machine and averaging the results is mathematically incorrect.
## Limitations of Common Approaches
- Exact percentile calculation requires sorting or retaining all values, which is impractical for high-volume metrics.
- Histograms use predefined buckets, making their accuracy dependent on bucket boundaries.
- Fixed-width buckets are inefficient for distributions spanning several orders of magnitude:
- Small values may require fine-grained buckets.
- Large values may require a huge number of buckets.
- Many quantile sketches optimize for rank accuracy, but a small rank error can still produce a large value error in heavy-tailed distributions.
- Summaries must also be mergeable so that data collected from multiple agents can be combined without losing their accuracy guarantees.
## DDSketch’s Logarithmic Mapping
- DDSketch groups values into logarithmically spaced bins rather than equally sized intervals.
- Values close together near zero receive finer absolute resolution, while larger values receive wider buckets.
- Each value is mapped to a key based on its logarithm:
- Positive and negative values are handled separately.
- Zero and values sufficiently close to zero use a dedicated zero bucket.
- A representative value is chosen for each bucket, typically using the bucket’s geometric center.
- Because adjacent buckets have a fixed ratio, the estimated value is bounded by a predictable relative error rather than a fixed absolute error.
## Relative-Error Guarantees
- DDSketch is configured with a target relative accuracy, such as 1%.
- Its logarithmic base is selected so that the returned quantile is within that relative-error bound of the true value.
- Relative error is particularly appropriate for latency data:
- An error of a few milliseconds matters greatly for a 10 ms request.
- The same absolute error is much less significant for a 10-second request.
- The sketch preserves accuracy across a wide range of values without requiring a proportional increase in the number of buckets.
## Distributed Aggregation and Memory Use
- DDSketches can be merged by adding the bucket counts from separate sketches.
- This allows agents, hosts, containers, and regional services to aggregate measurements into a global percentile.
- Merging does not require access to the original observations.
- The sketch stores counts rather than individual values, substantially reducing memory and network costs.
- Datadog also describes bounded-memory variants that collapse older or less significant bins when necessary, allowing sketches to maintain a fixed storage limit while retaining useful tail information.
## Practical Trade-offs
- Higher accuracy requires more buckets and therefore more memory.
- Lower accuracy reduces resource usage but produces wider estimates.
- The choice of relative accuracy should reflect the metric’s operational needs rather than defaulting to the smallest possible error.
- Implementations must account for negative values, zeros, very small values, and values outside the normal range.
- Accurate percentile reporting depends not only on the sketch algorithm but also on correct aggregation and consistent configuration across producers.
DDSketch is therefore a practical choice for observability systems that need scalable, mergeable, and predictable percentile calculations. Its logarithmic buckets and relative-error guarantees make it especially well suited to latency and other long-tailed measurements where fixed-width histograms or rank-based approximations can be misleading.
Datadog describes how it secures the publication and distribution of Datadog Agent integrations using The Update Framework (TUF) and in-toto. TUF protects clients from tampered, outdated, or incorrectly signed packages, while in-toto provides verifiable evidence about how each integration was built. Together, the systems create a chain of trust from source and build processes to the integration installed by an Agent.
## Why Agent integrations need stronger supply-chain security
- Integrations are distributed software components that run inside the Datadog Agent.
- A compromise of the source repository, build infrastructure, signing credentials, or distribution system could lead to malicious code reaching customers.
- Authenticating only the final package is insufficient if attackers can:
- Replace repository metadata
- Replay an older vulnerable release
- Roll back clients to compromised versions
- Exploit a stolen signing key
- Publish artifacts that were not produced by the approved build process
## TUF for secure package distribution
- TUF separates repository responsibilities across cryptographic roles rather than relying on one signing key.
- Metadata roles such as root, targets, snapshot, and timestamp help clients verify:
- Which keys are trusted
- Which integrations and versions are authorized
- Whether metadata is current
- Whether files have been modified
- TUF protects against common repository attacks, including:
- Key compromise through key rotation and delegation
- Rollback attacks using version information
- Freeze attacks using metadata expiration
- Mix-and-match attacks involving inconsistent metadata
- The Datadog Agent can therefore reject integrations that fail authenticity, integrity, freshness, or version checks.
## in-toto for build provenance
- in-toto complements TUF by describing and verifying the steps used to produce an integration.
- Build metadata can show that required steps—such as source retrieval, dependency installation, testing, packaging, and signing—were performed by authorized parties.
- Attestations connect each build step to its inputs and outputs, making unauthorized substitutions easier to detect.
- This ensures that a validly signed package was not merely signed, but was produced through the expected supply-chain process.
## Combining distribution security and provenance
- TUF answers whether an integration is authorized and safe to download.
- in-toto answers whether it was built according to the approved process.
- The combined design creates layered verification:
- TUF validates repository metadata and package integrity.
- in-toto validates build identity, steps, and provenance.
- The Agent enforces the resulting trust decisions before installation or update.
- This approach limits the impact of a compromise in any single part of the publication pipeline.
Datadog’s approach illustrates that software supply-chain security requires more than package signatures. Using TUF for resilient distribution metadata and in-toto for build provenance provides a stronger, defense-in-depth model for safely delivering Agent integrations.
Datadog built a compromise-resilient CI/CD system to publish Agent integrations independently of full Agent releases. It combines in-toto for end-to-end supply-chain verification with TUF for secure key and metadata distribution. Together, these technologies ensure that users install only integrations derived from developer-approved source code, even if parts of the infrastructure are compromised.
## Independent Integration Publishing
- Agent integrations were traditionally bundled into full Agent releases.
- This delayed important integration updates and prevented users from trying new integrations immediately.
- Datadog wanted automation to build and publish integrations on demand without fully trusting the automation itself.
## End-to-End Verification with in-toto
- TLS and GPG package signatures help prevent man-in-the-middle attacks but do not protect against compromised build or publishing infrastructure.
- in-toto defines the software supply chain as a fixed sequence of signed steps.
- Each step records the inputs it received and the outputs it produced, allowing the Agent to verify that only authorized parties performed the required work.
- The integration pipeline includes:
- Developers signing Python and YAML source files.
- CI/CD packaging the source into Python wheels without modifying existing wheels.
- A signing step applying TUF signatures to the wheels.
- The Datadog Agent verifying that the downloaded wheel matches the developer-signed source.
## Secure Distribution with TUF
- in-toto does not itself provide a secure way to distribute, revoke, or replace verification keys.
- TUF supplies signed, compromise-resilient metadata for:
- The root of trust for wheels and supply-chain metadata.
- The in-toto-defined workflow.
- Public keys used to verify the workflow.
- TUF protects against tampering, rollback attacks, and indefinite replay of outdated metadata.
- Offline trust bootstrapping and protected developer keys are essential to the overall security model.
## Hardware-Protected Developer Signing
- Developers use Yubikeys to generate and store GPG signing keys.
- Private keys cannot be exported from the device, assuming correct firmware.
- Signing requires both a secret PIN and physical interaction with the Yubikey.
- A command-line tool integrates in-toto and GPG, preserving a convenient developer workflow while reducing key-compromise risk.
## Transparent Verification for Users
- The Datadog Agent automatically invokes TUF and in-toto when downloading or updating integrations.
- Users need no workflow changes under normal conditions.
- If metadata, signatures, or supply-chain steps fail verification, installation is blocked and the Agent reports the failure.
Datadog’s approach demonstrates that secure automated publishing requires layered controls: in-toto verifies how software was produced, while TUF securely manages the trust and distribution mechanisms needed to validate it.
The provided text does not include the blog post’s actual article content. It contains Datadog’s navigation menu and a link titled “Highly Reliable Data Pipelines,” so the post’s argument, architecture, and technical conclusions cannot be summarized reliably.
## Available Information
- The page appears to be a Datadog engineering blog post about building highly reliable data pipelines.
- The surrounding content is primarily Datadog product navigation.
- It also promotes Datadog’s recognition as a Leader in the 2026 Gartner® Magic Quadrant™ for Observability Platforms.
Please provide the article body or a complete page extract for a detailed technical summary.
Datadog’s approach to reliable data pipelines focuses on delivering correct data on time, even when individual jobs fail. Reliability therefore requires fault tolerance, monitoring, and fast recovery rather than eliminating every failure. The company achieves this through isolated, short-lived clusters and pipelines designed to limit the impact of failures.
## Reliability Means Timely, Correct Results
- A reliable pipeline is one that consistently produces correct outputs within the required time window.
- Occasional crashes do not necessarily make a pipeline unreliable if automatic recovery still delivers the data on schedule.
- Pipelines should be designed with the expectation that failures will eventually occur.
- Monitoring must detect unexpected failures early, while operational processes should support rapid recovery.
## Architecture for Batch Pipelines
- Datadog streams and analyzes live data in real time but uses batch pipelines for features such as optimized long-term storage.
- Historical data is stored in object storage.
- Cloud Hadoop/Spark services launch and configure processing clusters.
- Luigi workers manage tasks and workflows, while Spark workers compile code and submit jobs.
- Jobs can be launched through a web interface, command line, or scheduler.
## One Cluster per Pipeline
Instead of placing all workloads on one large Hadoop cluster, Datadog gives each pipeline its own cluster.
- **Isolation:** Jobs do not compete for resources or interfere with one another, simplifying monitoring and diagnosis.
- **Workload-specific hardware:** Clusters can use CPU-optimized or memory-optimized instances depending on the job.
- **Elastic scaling:** Clusters can be expanded to catch up with delays or handle growing data volumes without waiting for a shared cluster.
- **Safer upgrades:** Hadoop and Spark versions can be upgraded gradually across separate clusters.
- Clusters are typically short-lived, averaging about three hours, although dozens may run simultaneously.
## Using Spot Instances to Encourage Fault Tolerance
- AWS spot instances can reduce infrastructure costs by as much as 80%, but their nodes may be terminated whenever capacity or demand changes.
- Rather than avoiding this failure mode, Datadog designs pipelines to tolerate disappearing clusters.
- Long-running jobs are risky because failures discard more work and make recovery slower.
- Pipelines are split into smaller jobs:
- **Vertically:** Separate transformations into multiple stages, persisting intermediate results in S3.
- **Horizontally:** Partition input data so multiple jobs process different portions concurrently.
## Breaking Up the Rollup Pipeline
- Datadog’s rollup pipeline generates aggregated time-series data for historical metrics queries.
- A single job would take more than 14 hours, making failures costly and difficult to recover from.
- The pipeline is divided into two stages:
- Aggregate high-resolution data and checkpoint it to S3 as Parquet files.
- Convert the intermediate data into a custom format optimized for queries.
- As these jobs grew, they were partitioned further using Kafka’s partitioning scheme.
- Kafka partitions are grouped into shards, allowing Datadog to:
- Adjust how much data each job processes.
- Run more or fewer jobs as needed.
- Isolate unusually large or sensitive shards.
- This decomposition adds overhead because launching jobs and checkpointing to S3 take extra time, but it substantially limits the work lost during failures.
## Practical Recommendation
Design pipelines around failure rather than assuming uninterrupted execution. Use isolated, scalable clusters, short jobs, intermediate checkpoints, and partitioned processing so that failures affect only a small portion of the workload and recovery remains fast.
Alerting UX is shifting from manually configured static thresholds toward statistical systems that understand trends, seasonality, and group behavior. Forecasting, anomaly detection, and outlier detection reduce maintenance and nuisance alerts, while algorithmic feeds can discover problems users never explicitly configured. The post argues that supervised feeds—trained by user feedback—could become the most significant evolution in monitoring.
## Traditional Alerting UX
Most alerts are built from four dimensions:
- **Scope:** The hosts, containers, services, or other targets being monitored.
- **Metric:** The value tracked, such as free disk space.
- **Thresholds:** Static warning or critical values that trigger alerts.
- **Time:** A duration or time window during which the condition must occur.
Static threshold alerts remain common, with many taking the form: “If free disk space equals zero, alert.”
## Problems with Static Thresholds
- Static thresholds do not adapt to system growth, changing workloads, or temporary events such as holiday traffic.
- They require regular review and maintenance to remain useful.
- Warning thresholds often serve as manual “heads-ups” so engineers can inspect a graph and estimate whether intervention is necessary.
- Large numbers of warning alerts create false positives and alert fatigue.
- Monitoring systems must be explicitly told which scopes and metrics to watch, leading to duplicated configuration and ongoing maintenance.
## Algorithmic Alerting
Statistical alerting introduces three primary methods:
- **Forecasting**
- Uses historical data to predict when a metric will cross a threshold.
- Changes “alert when disk reaches zero” into “alert if disk will reach zero within 24 hours.”
- Lets teams specify how much remediation time they need.
- Can eliminate separate warning thresholds because the forecast provides advance notice.
- **Anomaly detection**
- Predicts what should be happening now based on historical behavior.
- Considers configurable confidence intervals and seasonality, such as daily or weekly patterns.
- Alerts when current behavior deviates significantly from the expected range.
- **Outlier detection**
- Compares members of a group that should behave similarly.
- Flags an individual server or service whose behavior differs from its peers.
- Does not depend on historical behavior.
These methods make thresholds and time behavior more flexible, but they still require users to define the metrics and scopes in advance.
## Algorithmic Feeds
Algorithmic feeds apply similar statistical techniques without requiring detailed alert configuration.
- They can monitor systems without predefined individual scopes or metrics.
- They are especially useful for unpredictable anomalies and outliers.
- Examples include Slack Highlights and Datadog Watchdog.
- Feeds shift monitoring from **opt-in alerting**—where users specify what to watch—to discovering noteworthy activity automatically.
- The post presents this shift as potentially the largest change in alerting UX, while noting that algorithmic feeds are still immature.
## Supervised Algorithmic Feeds
Once a monitoring system generates a stream of events, user feedback can help train it to surface more relevant information.
- The model is compared to social media feeds, where actions such as “likes” guide future recommendations.
- This suggests a future in which engineers can teach monitoring systems which anomalies and events matter to them.
- The provided excerpt ends while introducing this concept, so it does not describe the specific feedback mechanisms or implementation details.
Monitoring is likely moving toward adaptive systems that combine statistical detection with user-guided prioritization. Teams should use forecasting and anomaly-based alerts where appropriate, while treating algorithmic feeds as a complementary way to discover issues outside manually configured monitoring.
Datadog’s page announces that the company was named a Leader in the 2026 Gartner Magic Quadrant for Observability Platforms. The supplied content, however, primarily contains site navigation rather than the referenced blog post, so it does not provide details about the article’s argument concerning AI-driven alerting.
## Gartner Recognition
- Datadog highlights its recognition as a Leader in Gartner’s Magic Quadrant for Observability Platforms.
- The announcement is presented as a promotional resource linked from the Datadog website.
## Datadog’s Product Portfolio
The navigation emphasizes Datadog’s broad observability and security platform, including:
- **Infrastructure:** infrastructure, container, network, serverless, GPU, storage, and cloud-cost monitoring.
- **Applications:** APM, service monitoring, profiling, dynamic instrumentation, and agent observability.
- **Data and logs:** database, data-stream, job, quality, log, sensitive-data, and pipeline monitoring.
- **Security:** code, cloud, vulnerability, workload, application, API, and SIEM security tools.
- **Digital experience:** browser and mobile RUM, session replay, synthetic monitoring, product analytics, and error tracking.
- **Software delivery:** CI visibility, test optimization, code coverage, feature flags, and developer portals.
- **Service management:** incident response, SLOs, event management, workflows, and case management.
- **AI:** Bits AI agents, investigations, chat, security analysis, agent observability, and MCP integrations.
The provided text does not include enough of the actual “Rethinking UX for AI-Driven Alerting” article to summarize its technical concepts or conclusions.
The provided content does not include the blog post’s main article text. It contains Datadog navigation links and a promotional banner announcing Datadog as a Leader in the 2026 Gartner® Magic Quadrant™ for Observability Platforms, plus a link suggesting the article concerns improving trust with Datadog Log Management.
## Datadog’s Observability Platform
- Datadog promotes a broad observability platform covering:
- Infrastructure and cloud monitoring
- Application performance monitoring
- Logs and sensitive-data protection
- Security monitoring
- Digital experience monitoring
- Software delivery and service management
- AI-powered investigation and automation
- The banner highlights Datadog’s recognition as a Gartner Magic Quadrant Leader.
## Log Management and Trust
- The linked article appears to focus on improving trust through Datadog Log Management.
- The supplied text does not provide details about the specific problems, technologies, or recommendations discussed in the post.
A complete summary requires the article’s actual body text rather than the surrounding website navigation.
Datadog handles hundreds of thousands of emails daily and uses Amazon SES for critical messages such as password resets. Because SES and CloudWatch did not provide sufficiently accessible, support-friendly event data, Datadog built a serverless pipeline that forwards SES events to Datadog Log Management. This provides low-maintenance delivery infrastructure, searchable email metrics, and monitoring for failures.
## Exporting Amazon SES Events
- SES configuration sets define which email events to capture:
- Send
- Reject
- Bounce
- Complaint
- Delivery
- Open
- Click
- Events are published to an Amazon SNS topic.
- SNS invokes an AWS Lambda function for every event.
- The Lambda forwards the event to Datadog Logs using the Datadog API key.
- Terraform provisions the SNS topic, SES configuration set, event destination, IAM role, and Lambda function.
- The example uses Python 2.7 and stores the API key as a Lambda environment variable; production systems should encrypt the key.
- This architecture avoids maintaining a custom email service while preserving visibility into email processing.
## Making SES Events Searchable in Datadog
- SES events arrive in Datadog as JSON.
- Datadog’s existing AWS integration pipeline processes the logs automatically.
- Important fields can be converted into facets directly from a log entry.
- Datadog uses fields such as the email event type and subject to quickly search for specific password reset activity.
## Monitoring and Operational Benefits
- Support teams can verify whether a recipient received or interacted with a password reset email.
- The entire delivery and logging pipeline is serverless and requires minimal maintenance.
- Monitors can be configured on the logs to alert normal escalation channels when any part of the pipeline fails.
- The solution combines the reliability of Amazon SES with Datadog’s observability and search capabilities.
Overall, routing SES events through SNS and Lambda into Datadog Log Management is a practical way to create a trusted, observable password-reset email system without operating a separate mail infrastructure.
Datadog operates Kafka at extreme scale, ingesting trillions of data points daily and requiring petabytes of NVMe storage. To manage frequent data movement caused by scaling, recovery, and capacity changes, the company built Kafka-Kit, a set of operational tools that improve partition placement and replication control. Its primary tools, `topicmappr` and `autothrottle`, automate safer and more predictable Kafka operations.
## Kafka-Kit
- Kafka-Kit addresses two major operational areas:
- Data placement across brokers
- Replication auto-throttling
- Its main tools are:
- `topicmappr`, for generating partition-to-broker mappings
- `autothrottle`, for automatically controlling replication bandwidth
## Partition Placement with `topicmappr`
`topicmappr` replaces Kafka’s `kafka-reassign-partitions.sh --generate` functionality while adding operational safeguards and placement controls.
- Produces deterministic output: identical inputs generate the same partition map.
- Supports minimal-movement broker replacement:
- Failed brokers can be replaced without unnecessarily moving healthy partitions.
- Partitions with complete in-sync replicas are normally left untouched.
- Provides rack-aware placement using Kafka’s `broker.rack` metadata and ZooKeeper.
- Supports placement based on:
- Partition count
- Storage size, enabling bin-packing and storage rebalancing
- Allows replication factors to be increased or decreased while topics are running.
- Generates clear summaries of:
- Brokers being removed or added
- Partition-level changes
- Broker distribution before and after reassignment
- Warnings and resulting partition-map files
The tool is written in Go and can run from any system with access to Kafka’s ZooKeeper cluster. It requires topic names and broker IDs, then verifies that the brokers are live, sufficiently numerous, and properly distributed across configured localities.
## Replacing Failed Brokers
For a failed broker, `topicmappr` can rebuild affected topics while limiting movement to the necessary partitions.
- Existing replicas are preserved whenever possible.
- Replacement brokers fill the gaps left by failed brokers.
- The generated report makes the proposed changes visible before execution.
- The example replaces broker `1002` with brokers `1003` and `1004`, showing the updated replica assignments and broker totals.
## Placement Strategies
`topicmappr` offers multiple strategies for deciding where replicas should live, including `count` and tunable `storage` placement.
### Count Placement Strategy
- The default strategy.
- Balances leadership and the number of partitions held by each broker.
- Works well when traffic is expected to be distributed evenly across partitions.
- Does not require metrics data, allowing maps to be generated quickly.
- Also attempts to maximize the number of distinct broker-to-broker replica relationships.
- This avoids concentrating a broker’s partitions with the same small subset of peers, improving distribution across the cluster and its racks.
## Storage-Aware Placement
- The storage strategy uses partition size when assigning replicas.
- It supports storage bin-packing and rebalancing, which is important when brokers have uneven disk utilization.
- This is particularly useful for Datadog’s large Kafka clusters, where storage capacity—not just partition count—can determine when data must be moved.
Datadog’s approach demonstrates that Kafka’s flexible primitives can be extended with purpose-built tooling. For large deployments, deterministic assignments, rack awareness, minimal movement, and storage-based balancing can make scaling and failure recovery substantially safer and more predictable.
Datadog’s “Kafka Kit” is a collection of operational tools designed to make Apache Kafka easier to scale and manage. The post argues that Kafka’s built-in administrative mechanisms become difficult to use safely as clusters grow, particularly when rebalancing partitions or adding and removing brokers. Kafka Kit automates these workflows while emphasizing balanced assignments, controlled changes, and operational visibility.
## Why Kafka Scaling Becomes Difficult
- Growing Kafka clusters require frequent partition movement and broker rebalancing.
- Native Kafka reassignment workflows can involve large, complex JSON configurations.
- Poorly planned changes can create:
- Uneven storage and traffic distribution
- Excessive network and disk I/O
- Overloaded brokers
- Extended recovery times
- Operational changes must account for replication, leadership, broker capacity, and rack or availability-zone placement.
## Kafka Kit’s Approach
- Kafka Kit provides reusable tooling for common Kafka administration tasks.
- The tools generate and apply partition assignments instead of requiring operators to construct them manually.
- Assignments can be optimized for more even distribution of:
- Partitions
- Replicas
- Leaders
- Storage and traffic
- The tooling is intended to support both routine balancing and larger cluster changes, such as adding or decommissioning brokers.
## Safer Partition Reassignment
- Reassignments can be performed incrementally rather than moving all partitions at once.
- Changes can be throttled to limit their effect on production workloads.
- Operators can inspect proposed assignments before applying them.
- Controlled movement reduces the risk of saturating Kafka brokers, disks, or network links.
- The approach makes long-running migrations easier to monitor and interrupt if necessary.
## Operating Kafka at Scale
- Datadog built the tools from its experience running Kafka as a critical part of its data infrastructure.
- At large scale, Kafka administration needs to be repeatable and automatable rather than dependent on manual intervention.
- Separating planning from execution allows teams to validate capacity and placement before changing the cluster.
- Standardized tooling also helps reduce the chance of configuration errors during high-risk maintenance operations.
Kafka Kit is most useful for teams operating Kafka clusters large enough that manual partition management is unreliable or disruptive. Automating assignment generation, throttling, validation, and broker lifecycle changes can make scaling more predictable and safer.
Andrew Robert McBurney describes using Datadog APM to diagnose and optimize Homebrew’s slow `brew linkage` command. Instrumentation identified `LinkageChecker#check_dylibs` as the main bottleneck, and replacing repeated dynamic-library processing with persistent caching reduced execution time from 11.5 seconds to 182 milliseconds for 106 packages. A later implementation used Ruby’s built-in PStore instead of SQLite3 to avoid an additional gem dependency.
## Finding the Bottleneck with APM
- Homebrew is widely used at Datadog, so improving its performance provides broad benefits.
- The `brew linkage` command checks the library links of installed formulas and can identify when a reinstall is needed.
- The target was to scan roughly 50 packages, including large packages such as Boost, in under five seconds.
- The author instrumented Homebrew with Datadog’s Ruby `ddtrace` gem.
- Flame graphs showed that most execution time was spent in `LinkageChecker#check_dylibs`.
## Why Multithreading Was Not Effective
- The author tested Ruby threads as a way to process libraries concurrently.
- Ruby’s Global Interpreter Lock limited the achievable parallelism.
- Threading failed to meet the required performance target, so a different approach was needed.
## SQLite3-Based Caching
- The expensive library-processing results were stored in an on-disk SQLite database.
- A `linkage` table recorded:
- Formula names and library paths
- Linkage categories such as `system_dylibs`, `broken_dylibs`, `undeclared_deps`, and `brewed_dylibs`
- Optional labels for selected linkage types
- A uniqueness constraint on `(name, path, type, label)` prevented duplicate cache entries.
- Homebrew could insert and retrieve linkage data using SQL queries.
## Performance Improvements
- Without caching, processing 106 packages took 11.5 seconds.
- Boost alone required about 1.01 seconds for dynamic-library checks.
- With caching enabled:
- The full command completed in 182 milliseconds.
- Boost’s check took approximately 1.38 milliseconds.
- The cached implementation significantly exceeded the original five-second performance requirement.
## Moving to PStore
- After submitting the SQLite3 implementation for review, Homebrew maintainers recommended Ruby’s PStore.
- PStore provides file-based persistence built around Ruby’s `Hash` data structure.
- Its main advantage is avoiding a third-party SQLite3 gem dependency while preserving the benefits of caching.
The central lesson is that profiling should guide optimization: rather than adding ineffective threading, the author located the true bottleneck and achieved a dramatic speedup through persistent caching. For similar command-line performance problems, instrument the complete execution path first, then choose the simplest cache or storage mechanism that satisfies both speed and dependency constraints.