Kafka is designed so clients connect directly to each broker's advertised address (advertised.listeners), so the choice of private connectivity has a direct impact on client reachability and DNS design. This article focuses on AWS VPC Peering and PrivateLink, covering Kafka-appropriate designs and the points most often tested on the CCAAK exam.
The concepts here reflect the stable, generally-applicable behavior of Apache Kafka and Confluent plus AWS official specifications. Vendor-specific recent changes or constraints can be environment-dependent, so we recommend cross-checking the official documentation at adoption time. References: Apache Kafka docs, Confluent docs.
A Kafka client first connects to the bootstrap server, fetches metadata containing each broker's advertised name (advertised.listeners), and then reconnects to the individual brokers. So for private connectivity to succeed, two conditions are required: the client VPC must privately reach every broker's advertised name/port, and name resolution must match those advertised names.
The main options on AWS for connectivity that avoids the public internet are VPC Peering and PrivateLink. The former builds reachability via L3 routing between VPCs; the latter publishes the service through an NLB and uses Interface Endpoints on the client side. Both apply to managed Kafka (e.g., Confluent) as well as self-managed deployments, but the design and operational considerations differ significantly.
Reachability requirements from the Kafka client's perspective (abstract diagram)
Minimal client configuration for verifying a Kafka connection
bootstrap.servers=broker-1.aws.internal:9093,broker-2.aws.internal:9093\nsecurity.protocol=SASL_SSL\nsasl.mechanism=PLAIN\nssl.endpoint.identification.algorithm=HTTPS\n# 実環境では認証情報やCAは適切に管理することVPC Peering establishes private-IP routing between VPCs and enables bidirectional traffic. With Kafka, the basic pattern is to advertise each broker's private address (or private DNS name) and align routes, security groups, and network ACLs from the client VPC.
For DNS, use a private zone (such as a Route 53 Private Hosted Zone) so that FQDNs like broker-N.aws.internal resolve in a way that matches the advertised names. Note that VPC Peering is not transitive and does not allow overlapping CIDRs. Cross-account / cross-region peering is supported, but check route counts and limits at design time.
VPC Peering traffic path (conceptual)
Typical broker-side listener configuration (assuming Peering)
# server.properties\nlisteners=SASL_SSL://0.0.0.0:9093\nadvertised.listeners=SASL_SSL://broker-1.aws.internal:9093\nlistener.security.protocol.map=SASL_SSL:SASL_SSL\ninter.broker.listener.name=SASL_SSL\n# DNSはbroker-1.aws.internal -> 10.0.1.10 (例) をPrivate Hosted Zoneで解決PrivateLink publishes a Network Load Balancer (NLB) in the provider VPC as a "service" and provides reachability via an Interface VPC Endpoint (ENI) in the consumer VPC. It works well in environments that need to tolerate overlapping CIDRs or enforce strict segmentation.
Because Kafka reconnects to each broker after metadata, NLB and endpoint design is the key. Typically you provide at least an NLB for bootstrap, and then arrange one endpoint per broker (or equivalent name resolution) so that the advertised names the client receives are reachable via the endpoints. TLS is usually terminated at the brokers (passthrough), with the NLB running in TCP/TLS passthrough mode.
Reachability with PrivateLink (conceptual)
Example of aligning advertised names with PrivateLink DNS
# server.properties (例。実環境のFQDNは環境固有)\nadvertised.listeners=SASL_SSL://b1.plink.example.internal:9093\n# Route53 Private Hosted Zoneなどで b1.plink.example.internal -> vpce-abcde-1.amazonaws.com をCNAMEで解決\n# NLBはb1エンドポイントからブローカー1のポートへ転送Both are "private connectivity," but the network models differ, so the design and operational considerations differ as well. With Kafka, the alignment between DNS and advertised names, plus the requirement that clients connect directly to brokers, drives the key differences.
From the CCAAK exam's perspective, you'll often be asked about design trade-offs such as overlapping CIDRs, cross-account requirements, and DNS / advertised-name alignment.
| Aspect | VPC Peering | PrivateLink |
|---|---|---|
| Connectivity model | VPC-to-VPC routing (L3) / bidirectional | One-way via NLB (client → service) |
| Overlapping CIDRs | Not allowed | Allowed (largely unaffected) |
| Transitive connectivity | Not supported (peer individually) | Not supported (per-service) |
| Cross-account exposure | Supported | Supported (approval-based) |
| DNS requirement | Share / associate private DNS | Align advertised names with the endpoint's Private DNS |
| Client changes | Generally keep the broker names as-is | Need to switch to endpoint FQDNs or set up CNAMEs |
Comparing the two approaches (abstract topology)
Example connection verification with kcat (works for either approach)
kcat -b broker-1.aws.internal:9093 -X security.protocol=SASL_SSL -X sasl.mechanisms=PLAIN \\\n -X sasl.username=... -X sasl.password=... -L\n# -Lでメタデータを確認し、各brokerの広告名に私設到達できているかを検証From an administrator's viewpoint, what matters is translating the differences between connectivity options into Kafka's advertised names, security, and operations. Specifically, you should be able to explain how each approach satisfies name resolution and reachability, on the premise that "clients ultimately connect to each broker directly."
Certificate verification (hostname match) with public paths closed, ACLs / authorization, and least-privilege security groups also come up frequently.
Bullet-list summary of points to lock in for the exam
- クライアント->ブローカー直収が前提\n- DNSと広告名の一致\n- Peering=ルート/SG/ACL整合\n- PrivateLink=エンドポイントとNLBの対応Example command for checking advertised.listeners
# ブローカー上で実効設定を確認 (例)\ncat /etc/kafka/server.properties | grep -E 'listeners|advertised.listeners|inter.broker.listener.name'Isolate reachability problems by layer. Start with DNS, then L3 reachability, and finally TLS/SASL. For PrivateLink, also check NLB target health and the endpoint's status.
Confluent and Apache Kafka clients often have hostname verification enabled, and TLS handshake failures due to mismatches between certificate CN/SAN and advertised names are common. Check the logs for javax.net.ssl and SSLHandshakeException.
Simplified troubleshooting flowchart
Basic commands for reachability and name resolution
dig +short broker-1.aws.internal\nnc -vz broker-1.aws.internal 9093\naws ec2 describe-vpc-endpoints --filters Name=vpc-endpoint-id,Values=vpce-xxxxxCCAAK
問題 1
You want to let multiple VPCs in another account privately consume a multi-broker Kafka cluster on AWS. The consumer VPCs already have many peerings with other systems, and there is a strong concern about overlapping CIDRs. Clients connect with SASL_SSL and need to keep hostname verification. Which choice is most appropriate?
正解: A
PrivateLink fits the need to avoid overlapping CIDRs and to publish across accounts. Because Kafka requires alignment between advertised names and the reachability points, designing around the endpoint's Private DNS is the right call. Peering does not allow overlapping CIDRs; public paths are out of scope; Transit Gateway works for L3 connectivity but the overlapping-CIDR problem remains and Kafka's DNS alignment still needs a separate solution.
Are VPC Peering and PrivateLink available on Confluent Cloud as well?
Confluent's managed Kafka on major clouds typically offers VPC Peering and a PrivateLink-equivalent connectivity option as ways to reach the service privately across accounts/VPCs. Supported regions and constraints vary by plan and over time, so check Confluent's official documentation for the latest status when you adopt it.
When exposing Kafka via PrivateLink, where should TLS be terminated?
To keep Kafka's authentication and encryption simple, you generally terminate TLS at the brokers and run the NLB as TCP/TLS passthrough. This makes it easier to keep certificate hostname verification aligned with the advertised listener names.
VPC Peering isn't connecting. What should I check?
Check in this order: (1) whether the advertised name resolves as expected via private DNS, (2) whether the route table has a route to the peer VPC's CIDR, (3) whether security groups / network ACLs allow the client source, and (4) which broker fails when fetching metadata with kcat.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Kafka Topics & Partitions: Distribution Fundamentals (2026)
How Kafka topics and partitions enable scale — ordering guar...
CCDAK Exam Guide: Confluent Certified Developer (2026)
Complete prep for the CCDAK exam — Producer/Consumer API, St...
CCAAK Exam Guide: Confluent Certified Administrator (2026)
Pass the CCAAK exam — cluster management, partitions, securi...
Kafka Replicas & ISR: Fault Tolerance Explained (2026)
Replica placement, in-sync replicas (ISR), leader election. ...
Kafka Offsets: Commit Modes & Consumer Position (2026)
Offset semantics — auto vs. manual commit, __consumer_offset...