Kết nối nhiều VPC: VPC peering, Transit Gateway và VPC sharing
Khi mỗi team dùng một VPC riêng, các VPC cần được kết nối với nhau; phương thức kết nối quyết định số kết nối phải quản lý và việc traffic có đi qua được VPC trung gian hay không.
MFTECH thành lập thêm các team, mỗi team sử dụng một VPC. Tăng số lượng VPC, so sánh số kết nối cần thiết giữa VPC peering, Transit VPC và Transit Gateway, và thử gửi traffic từ A tới C khi chỉ có peering A–B và B–C. Với Transit Gateway, tắt route propagation để quan sát route table của Transit Gateway khi thiếu route.
Kéo thanh trượt để quan sát tốc độ tăng của số peering connection. VPC peering có chi phí thấp và đơn giản khi số lượng VPC nhỏ.
Không tính phí tạo kết nối; data transfer trong cùng AZ miễn phí, chỉ tính phí khi đi qua AZ hoặc Region khác. Cấu hình đơn giản cho số lượng VPC nhỏ, hỗ trợ cả kết nối giữa hai Region.
- Số lượng VPC nhỏ: VPC peering (chi phí thấp, nhưng không hỗ trợ transitive routing).
- Nhiều VPC hoặc cần kết nối cả on-premises: Transit Gateway; bật route propagation để CIDR của mỗi VPC attachment tự động có trong route table của Transit Gateway (route table của subnet trong VPC vẫn cần route trỏ tới Transit Gateway).
- Transit VPC (router và VPN chạy trên EC2 instance tự vận hành) là mô hình cũ mà Transit Gateway thay thế.
- Nhiều account trong cùng Organization: VPC sharing.
Connecting many VPCs: VPC peering, Transit Gateway and VPC sharing
When each team has its own VPC, the VPCs must be connected; the connection method decides how many connections there are to manage and whether traffic can pass through an intermediate VPC.
MFTECH sets up more teams, each using its own VPC. Increase the number of VPCs, compare the number of connections needed with VPC peering, a transit VPC and Transit Gateway, and try sending traffic from A to C when only the A–B and B–C peerings exist. With Transit Gateway, turn route propagation off to see the transit gateway route table without the routes.
Kéo thanh trượt để quan sát tốc độ tăng của số peering connection. VPC peering có chi phí thấp và đơn giản khi số lượng VPC nhỏ.
No charge to create the connection; data transfer within the same AZ is free, charged only when it crosses AZs or Regions. Simple to configure for a small number of VPCs, and supports connections between two Regions.
- A small number of VPCs: VPC peering (low cost, but no transitive routing).
- Many VPCs, or on-premises connectivity as well: Transit Gateway; enable route propagation so each VPC attachment’s CIDR is installed in the transit gateway route table automatically (the subnet route tables in the VPCs still need a route to the transit gateway).
- A transit VPC (self-managed router and VPN software on EC2 instances) is the older pattern that Transit Gateway replaces.
- Many accounts in the same organization: VPC sharing.