# Vendor-Neutral Kafka Architecture Starts in the Applications

Kafka seems a neutral choice: an open protocol, standard client libraries, and data you can replicate to any other cluster. **A Kafka architecture is only as neutral as its applications.**

But a Kafka provider has way more than your real-time data. It has your metadata (schemas, tags, topic settings), your data protection (permissions, encryption, masking) and, if it has a catalog, some kind of ownership and relations between your teams, based on its own model.

Every producer and consumer is linked to the provider in multiple ways: a bootstrap address, authentication and authorization mechanisms, a schema registry, sometimes an encryption library, and more intricate dependencies. Each application has a dependency on those and changes on its own release cycle, so any migration program (or failover strategy) ends when the last team ships their update.

## The layers of a streaming platform

A lot of things are happening between Kafka brokers and the teams to make shared data accessible and safe to use:

ConfluentAmazon MSKSelf-managed

The bottom layer is what you think of when you think of "Kafka". And then, each provider builds the layers above it in its own way:

| Layer | Confluent | Amazon MSK | Self-managed Apache Kafka |
|---|---|---|---|
| Data contracts | Confluent Schema Registry | AWS Glue Schema Registry | Karapace, Apicurio |
| Data security | Role bindings, ACLs, client-side encryption | IAM policies, ACLs | ACLs |
| Data movement | Managed connectors, Cluster Linking, Flink | MSK Connect, MSK Replicator | Kafka Connect, MirrorMaker 2 |
| Governance | Stream Governance, audit logs | CloudTrail for API calls | None built in |

The open-source engines (Kafka Connect, Flink, Spark, Kafka Streams) run against any cluster. What differs is the managed service around them, and features like Cluster Linking that only exist at one provider.

Running multiple providers means running multiple versions of the layers.

**Vendor neutrality is about deciding layer by layer**, as some layers sit inside your applications: how they connect, their data contracts, their governance.

The platform team rebuilds the other layers when the provider changes: replicating the data, moving metadata and ownership, translating permissions, redeploying connectors for data integration, etc.

## All apps depend on where and how to connect

A Kafka client connects with an address (`bootstrap.servers`), an authentication method (SASL, mTLS, etc.), and credentials.

You have quite a lot of combinations on the market today (for authentication and authorization):

| Provider | OAuth with IdP | mTLS | Provider code in the client | Permissions |
|---|---|---|---|---|
| Confluent Cloud | Yes, through identity pools | Yes, your CA (Dedicated, Enterprise, Freight) | None | Role bindings and ACLs |
| Amazon MSK | No, IAM tokens only | Yes, AWS Private CA | `aws-msk-iam-auth` for IAM | IAM policies, or ACLs |
| Aiven | Yes | Yes, Aiven-issued certificates | None | Aiven ACLs and Kafka ACLs |
| Redpanda Cloud | Not documented for clients | Yes, your CA (BYOC and Dedicated, on AWS and GCP) | None | ACLs, grouped in roles |
| Google Managed Kafka | Through Google identity federation | Yes, Google CA Service | `GcpLoginCallbackHandler` for OAuth | IAM to connect, then ACLs (mTLS: ACLs only) |
| Azure Event Hubs | Microsoft Entra ID only | No | A custom callback handler for Entra ID | Azure RBAC or SAS policies |
| Apache Kafka | Yes | Yes, your CA | None | ACLs |

Your own identity provider or your own certificate authority moves with the client. MSK IAM, Google OAuth and Azure Entra ID add provider code to every client and tie identity to the cloud's IAM, and MSK Serverless accepts no other authentication.

**Where those values live sets the cost of a change.** This could be a config map, a secret, a configuration provider, or code you need to update and release. The latter is often a dependency, so it needs a rollout at the pace of each application's updates:

> *"These folks are deployed across thousands of stores and they can only deploy updates so quickly."*
> — Kafka platform engineer at a grocery retailer

## Schema IDs are hardcoded into your data

Most Kafka platforms serialize with Confluent's serializers, against Confluent Schema Registry or a registry that speaks its API, like Karapace or Apicurio. The registry gives each schema a numeric ID, the producer transparently writes it at the start of every record (binary data), and the consumer asks the registry for that ID to understand the data (from a binary blob to structured data).

Each registry has its own strategy for IDs (sequences or UUIDs). Applications can fail to decode data, or decode it with the wrong schema, because the ID does not exist anymore, or is wrong, or belongs to another cluster or environment (e.g. reading staging data with the production schema registry).

The ID in the record only means something in the registry that allocated it.

The simplest fix is one registry for both clusters during the move: a registry isn't fundamentally tied to a Kafka cluster. When the target needs its own, the IDs have to line up:

- **Empty target registry.** Confluent Schema Registry's [IMPORT mode](https://docs.confluent.io/platform/current/schema-registry/installation/migrate.html) registers each schema under the ID it had on the source.
- **Registry already in use.** The records change: a transform in the replicator, or a Kafka Connect SMT like [schema-registry-transfer](https://github.com/OneCricketeer/schema-registry-transfer-smt), registers each schema in the target and rewrites the four-byte ID of every record it copies. The payload stays as written. A Kafka proxy could apply the same mapping on the fly as records pass through, or a [Schema Registry Proxy](https://www.conduktor.io/schema-registry-proxy) when consumers look up the ID, without rewriting what's stored.
- **AWS Glue Schema Registry.** It has its own wire format, so every serializer must change in the apps.

## You cannot move faster than your applications

Application teams have release trains, freeze windows and their own priorities, and the platform team can't ship their code for them:

> *"We're giving the application teams the ability to migrate at their own will […], which is quite challenging."*
> — Platform engineer at an asset manager

- With one-way replication, the consumers of a topic move before its producers.
- Most applications do both, so teams move in groups (it's helpful to get the app topology via lineage here).

The platform team needs to know who owns each topic and who reads it, via ownership principles and runtime telemetry.

**Until the last application moves, both clusters run: replication, multiple sets of permissions, multiple ways of doing things, multiple bills.**

This is the same issue with every cluster change: a failover to a DR cluster gives clients another address, and often other credentials, but the data management behind must stay absolutely the same. The lifecycle of each application ends up following the lifecycle of the infrastructure, unless a Kafka proxy sits in between:

The proxy breaks that link. It's the same pattern as an HTTP reverse proxy or an API gateway: applications call one stable address, and the servers behind it can change without them knowing. A Kafka proxy speaks the Kafka protocol, so clients connect to it seamlessly like a Kafka cluster, but it can run with identities from your own IdP or your own certificate authority.

The proxy is the only one to know the underlying infrastructure address and topology, so a failover, a new cluster or a new provider changes only its configuration, and none of the applications have to change their Kafka settings.

The proxy is neutral by itself: it's indifferent to what is behind it.

## Here be dragons in every Kafka migration

Transition programs, migrations and failovers alike run into the same issues. Many things happen and many decisions are made between applications, data, and clusters:

CurrenttodayNextafter cutover8911failback to CurrentSourceschema IDsTargetown IDs1012Rehearsing the whole switch, with every application team

| # | Issue | What happens | How to handle it |
|---|---|---|---|
| 1 | Team-by-team transition | Teams that share topics move together, at the pace of the slowest. | Repoint to a proxy early, in a release already planned, then cut over once |
| 2 | Credentials management | A secret store changes the secret in one place, but provider auth code, like the MSK IAM library, stays in each client. | Plan a release per application, or authenticate clients at the proxy |
| 3 | Client certificates | The target may only trust its own CA: AWS Private CA for MSK, the project CA for Aiven. | Reissue a certificate per service, or terminate mTLS at the proxy with your CA |
| 4 | Transactions | Transaction state lives in each cluster: a transaction open at the switch can't commit on the new one, and exactly-once stops at the cluster boundary. | Drain transactional producers before the switch, and expect duplicates downstream |
| 5 | Network paths | Every client network needs a route and firewall rules to the new brokers (PrivateLink, peering, VPN), each a ticket for the network team. | Open the paths early, or route clients through one endpoint you control |
| 6 | Switching DNS for bootstrap | Clients keep the brokers they already know. DNS caches and open connections hold them in place. | Plan a restart of every client, or keep them on a proxy's address |
| 7 | Renamed topics | By default, MirrorMaker 2 prefixes replicated topics with the source cluster's name (`primary.orders`). | Keep the names with `IdentityReplicationPolicy`, or plan a config change per application |
| 8 | Translated offsets | MirrorMaker 2 offsets are approximate, so consumers reread records after the switch. | Make consumers idempotent, or plan a replay |
| 9 | Permissions | Principals follow the provider's naming (service accounts, IAM roles, certificate names), so ACLs and role bindings don't copy as-is. | Rewrite them from an ownership map, or enforce them at the proxy |
| 10 | Schema IDs | The target registry numbers schemas its own way, and records can decode with the wrong schema. | Share one registry, import the IDs, or map them |
| 11 | Failback | Going back is a second migration: replication reversed, every client repointed again. | Plan the failback in the same runbook |
| 12 | Rehearsing the switch | A test takes every application team, so it rarely happens and the runbook stays untested. | Rehearse at the proxy, in a lower environment first |

This list is far from complete, and very little of it is about the brokers. Copying the data is the part tools already solve. The rest sits in applications, networks, identities and teams, and that's where a migration spends its time.

## Gateway and Console to move faster, safely

[Conduktor Gateway](https://www.conduktor.io/gateway) is such a proxy, in front of any Kafka provider. In its [Gateway-managed mode](https://docs.conduktor.io/guide/conduktor-in-production/deploy-artifacts/deploy-gateway/listener-security), clients authenticate with Gateway (OAuth from your identity provider, mTLS or local service accounts). It can then enforce various authorization models and data policies across clusters, and give observability over all the traffic in and out.

It can therefore move all traffic to another cluster at once, without touching the clients. You still need to let replication catch up, then switch every Gateway instance as part of your own runbook.

Currentany providerNextany providerfirst: each team,own releasetodaythen: replicationlast: one switchplatform teamA provider change through Gateway.

[Console](https://www.conduktor.io/console) holds the ownership map and the relations between teams: the humans responsible. With [federated ownership](https://www.conduktor.io/federated-ownership), each application is declared with its team, its topics and the access other teams requested, and Console writes those grants as ACLs or role bindings on the clusters it manages.

Changes to Kafka keep coming: renewals, cloud decisions, migrations, scaling, DR plans. In Europe, [DORA](https://eur-lex.europa.eu/eli/reg/2022/2554/oj/eng) requires financial entities to document and test an exit plan for every ICT service behind a critical function, and this is also where sovereignty projects start: an inventory of each application and its data.

[Talk to us](https://www.conduktor.io/contact/demo?src=blog-vendor-neutral-kafka-architecture) if your mission is to build a more neutral data streaming platform.

---

Related: [Kafka Migration Tools: What Each One Actually Moves →](https://www.conduktor.io/blog/kafka-migration-tools) · [How Conduktor Gateway Reduces Kafka DR from Hours to Minutes →](https://www.conduktor.io/blog/how-gateway-reduces-kafka-dr-from-hours-to-minutes)
