> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/k2k/performance.md).

# Performance

How K2K achieves throughput by default, how it compares under cross-region load, and how to scale out.

K2K is built on standard Kafka clients: a consumer on the source Kafka cluster and a producer on the target Kafka cluster. That model keeps the replication path short and predictable, so throughput is strong with default settings for most pipelines. For how those clients fit into the applications, see [Architecture](/latest/k2k/architecture.md).

## Good by default

Replication is consume-from-source, produce-to-target. K2K does not sit inside Kafka Connect or introduce an intermediate framework between the clusters. Defaults are chosen so a typical pipeline can run without client retuning; when you do need more throughput or lower latency, pass standard consumer and producer properties through the pipeline and adjust pipeline concurrency — see [Replication performance tuning](/latest/k2k/configuration-reference/replication-performance-tuning.md).

## Cross-region comparison with MirrorMaker 2

In cross-region replication tests, K2K performed comparably to MirrorMaker 2 (MM2): it used less CPU and achieved higher throughput under the same workload.

Those results depend on the consumer and producer settings in use. Tailoring client properties for a specific application or network path can change the relative picture for either tool. Treat the comparison as a starting point, not a guarantee for every deployment. For environment-specific tuning, see [Replication performance tuning](/latest/k2k/configuration-reference/replication-performance-tuning.md).

## Scale out with more containers

When a single instance cannot keep up with source production, run more K2K containers (or pods) with the same pipeline. Kafka assigns partitions across instances in the consumer group, so capacity grows with the number of useful replicas up to the partition limit of the subscribed topics.

See [Horizontal scaling](/latest/k2k/configuration-reference/horizontal-scaling.md) for how partition assignment caps parallelism, and how the offset mapper scales separately.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lenses.io/latest/k2k/performance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
