QA
Intermediate LevelCloud Computing (AWS/GCP/Azure)

Compare VPC Peering versus AWS Transit Gateway for multi-VPC networking.

❓ Interview Prompt: Compare non-transitive VPC Peering vs centralized star-topology AWS Transit Gateway (TGW) routing.

Connecting multiple VPCs across an enterprise organization requires selecting between two networking patterns:

1. VPC Peering:

•
Topology: Point-to-point mesh network connections between two VPCs.
•
Non-Transitive: Traffic cannot pass through VPC B to reach VPC C ($A \rightarrow B \rightarrow C$ is impossible).
•
Scale Limit: Connecting 100 VPCs in a full mesh requires 4,950 individual peering connections ($N(N-1)/2$). Complex to manage at scale.

2. AWS Transit Gateway (TGW):

•
Topology: Centralized regional network hub (Star Topology).
•
Transitive Routing: Easily routes traffic between thousands of VPCs, AWS accounts, and on-premise VPNs through a single hub.
•
Centralized Inspection: Simplifies routing all inter-VPC traffic through centralized firewall appliances.

Code Implementation Example

typescript
function selectVpcNetworking(vpcCount: number, needsCentralInspection: boolean) {
  if (vpcCount > 5 || needsCentralInspection) {
    return 'AWS Transit Gateway (TGW - Star Topology Hub)';
  }
  return 'VPC Peering (Point-to-Point Mesh)';
}
💡Selecting VPC Peering vs AWS Transit Gateway based on VPC count.
🎯 Interview Key Takeaway

VPC Peering connects 2 VPCs in a non-transitive pair; Transit Gateway acts as a central hub connecting thousands of VPCs transitively.

#VPC Peering#Transit Gateway#Networking#VPC#Intermediate
Back to all Cloud Computing (AWS/GCP/Azure) Questions→

More Cloud Computing (AWS/GCP/Azure) Interview Questions

Beginner LevelCloud Computing (AWS/GCP/Azure)

How does Serverless Architecture (AWS Lambda / GCP Cloud Run) handle Auto-Scaling and Cold Starts?

Beginner LevelCloud Computing (AWS/GCP/Azure)

What is the difference between IaaS, PaaS, and SaaS cloud service models?

Beginner LevelCloud Computing (AWS/GCP/Azure)

What is AWS EC2 and what are On-Demand, Reserved, and Spot Instance pricing models?