Quick revision
The short answer
Run a small number of shared Connect clusters split by domain or criticality, all built from one curated, versioned worker image with plugins isolated under plugin.path. Keep secrets out of connector configs with config providers, lock down the REST API with TLS, authentication and network policy, and manage connector configs as code with enforced defaults. Then operate it as a product: per-connector dashboards, alerts routed to the owning team, and runbooks for restarts and offset changes.
What to remember
In this answer, we designed Connect as a shared platform: a few clusters split by domain or criticality with dedicated clusters for critical pipelines, one curated and versioned worker image with plugins isolated under plugin.path and staged upgrades, secrets kept out of configs with config providers and a protected REST API, connector configs managed as code with enforced defaults and an explicit client override policy, and operations built around per-connector dashboards, team-routed alerts, exactly-once source support where needed and runbooks.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Run a small number of shared Connect clusters split by domain or criticality, all built from one curated, versioned worker image with plugins isolated under plugin.path. Keep secrets out of connector configs with config providers, lock down the REST API with TLS, authentication and network policy, and manage connector configs as code with enforced defaults. Then operate it as a product: per-connector dashboards, alerts routed to the owning team, and runbooks for restarts and offset changes.
Why this question is asked
Forty teams each running their own Connect cluster is a common end state of organic growth: every team solved its own problem, and now the company has forty versions, forty upgrade schedules and forty ways to leak a password. Interviewers ask a platform design question like this to see whether we can balance isolation against cost, and security against convenience, and whether we know Connect's actual mechanisms for each. In this answer, we will choose a tenancy model, manage plugins centrally, remove secrets from configs and secure the REST API, treat connector configs as code, and set up the operations that make the platform trustworthy.
1What Went Wrong and What We Need
The two incidents point at real weaknesses of Connect. A plugin upgrade broke another connector on the same workers because all connectors on a worker share the JVM, its memory and its rebalances, and a plugin packaged carelessly can conflict with others. Passwords were readable because connector configs, including database credentials, are stored in the config topic and returned by GET /connectors/{name}/config to anyone who can reach the REST API.
So the platform needs bounded failure domains, controlled plugin versions, secrets that never sit in configs, an API that is not open to everyone, and a way to apply standards to configs written by forty teams.
2Choosing a Tenancy Model
There are three broad options. One global cluster is cheapest to run but makes every rebalance, noisy connector and upgrade a company-wide event. Forty private clusters isolate perfectly but recreate today's problem. The middle option is a handful of clusters, split by domain (payments, logistics, analytics) or by criticality, so that a misbehaving connector or a rebalance affects a bounded set of teams. Pipelines whose failure stops revenue get their own cluster.
| Model | Blast radius | Cost and effort |
|---|---|---|
| One global cluster | Every connector | Lowest; upgrades risky for all |
| A few clusters by domain or criticality | One domain or tier | Moderate; upgrades staged cluster by cluster |
| Dedicated cluster for critical pipelines | One pipeline | Higher per pipeline, used sparingly |
| One cluster per team (today) | One team | Highest; 40 versions to maintain |
3Managing Plugins Centrally
Each plugin, a connector or converter with its dependencies, goes into its own directory under plugin.path, and Connect loads each one in its own classloader, so two plugins can use different versions of the same library. Isolation fails when someone drops jars onto the worker's main classpath, which is a common cause of one plugin breaking another. So the platform builds one curated worker image: a pinned Kafka Connect version, an approved list of plugins at pinned versions under plugin.path, and nothing on the classpath. The image is versioned and built by a pipeline.
Upgrades roll out one cluster at a time, starting with the least critical, after a test suite runs representative connectors against the new image. We record which plugin version each connector uses; GET /connector-plugins shows what a worker offers, and a nightly job can store the mapping. When a plugin upgrade breaks something, we know exactly which connectors are affected and can roll back the image.
4Keeping Secrets Out of Configs and Securing the API
Config providers let a connector config contain a reference instead of a value. The worker resolves the reference when it starts the connector, and the config topic and REST API only ever hold the reference.
There are built-in providers for files, directories and environment variables, and vault providers exist for common secret stores. The secrets are mounted only on the workers of the cluster that needs them, so a payments database password is not present on analytics workers.
The REST API itself can create, change and delete connectors and read their configs, so it must be protected. We enable HTTPS through the listeners setting, add authentication through a REST extension or a gateway in front of it, and restrict network access to the deployment pipeline and the platform team. Teams interact through the pipeline, not by calling the API directly.
5Treating Connector Configs as Code
Every connector is a file in Git, reviewed like code and applied by a pipeline or a Kubernetes operator that manages connector resources. The pipeline enforces defaults before applying: a naming scheme that includes the owning team, a tasks.max ceiling, error handling settings and a DLQ for sinks, and rules on client overrides. Connect lets a connector override its producer or consumer settings, and connector.client.config.override.policy on the worker controls this; we set it explicitly, typically to allow only a reviewed set of keys, so one team cannot, for example, turn off acks for its producer on a shared cluster.
- Team edits connector file in Gitpull request
- Pipeline checksnaming,
tasks.max, DLQ, overrides, no plain secrets - Platform rules pass?Yesapply to the domain's clusterNoreject with reason
- Operator or pipeline calls REST APIPUT /connectors/{name}/config
- Status checktasks RUNNING, alerts point to the owning team
5 steps in order. Play them, or step through them one at a time.
6Operating the Platform
A shared platform is trusted only if teams can see their own pipelines. We publish dashboards per connector: task states, sink consumer lag, source poll and write rates, DLQ growth and error counts, with alerts routed to the owning team named in the connector's metadata, and platform-level alerts on worker health and rebalances routed to us. Where a source pipeline needs no duplicates, Connect has supported exactly-once source connectors since 3.3: workers enable exactly.once.source.support and the connector must support it. And we write runbooks for the operations teams need most, restarting failed tasks and changing offsets with the stop and offsets endpoints, so nobody edits internal topics by hand.
7Follow-up questions
How do you migrate forty teams onto the platform?
Start with the domains whose clusters are oldest or least secure, move their connector configs into Git, replace plain secrets with provider references, and recreate each connector on the shared cluster with its existing offsets: source offsets can be set through the offsets endpoint on a stopped connector, and sink connectors keep their consumer group if we reuse the connector name. Retire each old cluster once its connectors run cleanly.
Why not one cluster per connector, for perfect isolation?
Each cluster needs its own workers, internal topics, monitoring and upgrades. For hundreds of connectors that cost is large and the platform team becomes a bottleneck. Dedicated clusters make sense for a few critical pipelines, not as the default.
Does Kubernetes change the design?
It makes clusters cheap to create and lets an operator manage connector resources declaratively, but the same decisions remain: how many clusters, which image, how secrets are mounted and who can change configs.
8Conclusion
In this answer, we designed Connect as a shared platform: a few clusters split by domain or criticality with dedicated clusters for critical pipelines, one curated and versioned worker image with plugins isolated under plugin.path and staged upgrades, secrets kept out of configs with config providers and a protected REST API, connector configs managed as code with enforced defaults and an explicit client override policy, and operations built around per-connector dashboards, team-routed alerts, exactly-once source support where needed and runbooks.
Open with
I would run a few shared Connect clusters, split by domain or by criticality, instead of one global cluster or forty private ones, so a bad connector or a rebalance only affects a bounded group, and I would give revenue-critical pipelines their own cluster.
Then, if they want more
All clusters run one curated, versioned worker image with a pinned Connect version and approved plugins at pinned versions under plugin.path, where each plugin gets its own classloader; nothing goes on the main classpath. Upgrades roll out one cluster at a time after tests, and we record which plugin version every connector uses.
For secrets, I would configure config providers on the workers, so a connector config holds a reference like file or vault placeholders and the REST API never shows the password, and I would protect the API with TLS, authentication and network policy, since it can read and change configs.
Connector configs live in Git and are applied by a pipeline or a Kubernetes operator that enforces naming, tasks.max limits, error handling, DLQs and an explicit client config override policy.
Finally I would operate it as a product: per-connector dashboards for task state, sink lag and source rates, alerts routed to the owning team, exactly-once source support where needed, and runbooks for restarts and offset changes.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Apache Kafka documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Today each team runs its own Kafka Connect cluster with different versions and plugins...": https://scrivio-interview-library.netlify.app/spring-boot/kafka-streams-connect/138a86a062/