Direct Connect · DX
A dedicated, private physical line from your data centre into AWS, established at a Direct Connect location. It bypasses the public internet entirely, so you get consistent bandwidth and stable latency — the opposite trade-off from a VPN, which is cheap and instant but rides the internet.
Một đường vật lý riêng, dành riêng từ data center của bạn vào AWS, thiết lập tại một Direct Connect location. Nó không đi qua internet công cộng, nhờ đó băng thông ổn định và độ trễ đều — đúng mặt ngược lại của VPN, vốn rẻ và dựng ngay nhưng chạy trên internet.
Two facts drive most exam questions: it is private but not encrypted, and it is not redundant by default. The rest is which virtual interface (VIF) to use, and how to reach many VPCs and Regions with a Direct Connect Gateway.
Hai sự thật chi phối phần lớn câu hỏi thi: nó riêng tư nhưng không mã hoá, và không tự dự phòng. Phần còn lại là chọn virtual interface (VIF) nào, và cách với tới nhiều VPC, nhiều Region bằng Direct Connect Gateway.
Direct Connect is the right answer when… / a VPN is enough when…Khi nào chọn Direct Connect… / khi nào VPN là đủ…
Use Direct ConnectDùng Direct Connect
- You need consistent low latency and high, steady bandwidth — a VPN's internet path is too variable.Cần độ trễ thấp ổn định và băng thông cao, đều — đường internet của VPN quá thất thường.
- Large, ongoing data transfer to/from AWS: more throughput and cheaper data-transfer rates than the internet.Truyền dữ liệu lớn, liên tục với AWS: thông lượng cao hơn và giá truyền dữ liệu rẻ hơn so với qua internet.
- The traffic must not traverse the public internet for compliance or reliability reasons.Traffic không được đi qua internet công cộng vì lý do tuân thủ hay độ tin cậy.
- You want private access to public AWS services (S3) without going over the internet → Public VIF.Muốn truy cập riêng tới service public của AWS (S3) mà không qua internet → Public VIF.
A VPN is enoughVPN là đủ
- You need connectivity today — DX lead times run weeks to months, a VPN is minutes.Cần kết nối ngay hôm nay — DX chờ hàng tuần tới hàng tháng, còn VPN chỉ vài phút.
- The traffic must be encrypted and a private-but-unencrypted line isn't acceptable → VPN, or DX + VPN.Traffic phải mã hoá và một đường riêng-nhưng-không-mã-hoá là không chấp nhận được → VPN, hoặc DX + VPN.
- Budget or traffic is small — a dedicated port and cross-connect isn't worth it.Ngân sách hoặc lưu lượng nhỏ — một cổng dedicated và cross-connect không đáng.
- You only need a backup path for an existing DX — that backup is usually a VPN.Chỉ cần một đường dự phòng cho DX đang có — đường đó thường là VPN.
The shape — a cross-connect at a Direct Connect locationHình dạng — một cross-connect tại Direct Connect location
Your router meets an AWS router physically, in a colocation facility AWS calls a Direct Connect location. Your gear sits in a customer/partner cage, AWS's in an AWS cage, and a cable (the cross-connect) joins them. On that one link you then define VIFs — VLANs that decide whether traffic goes to your VPC or to public AWS. Router của bạn gặp một router của AWS về mặt vật lý, trong một trung tâm colocation mà AWS gọi là Direct Connect location. Thiết bị của bạn nằm ở customer/partner cage, của AWS ở AWS cage, và một sợi cáp (cross-connect) nối chúng lại. Trên đúng một link đó bạn định nghĩa các VIF — những VLAN quyết định traffic đi vào VPC của bạn hay tới public AWS.
The blue and green lines are the whole idea: one physical link, two VIFs, two destinations. Blue (private VIF) reaches into your VPC via the VGW; green (public VIF) reaches public AWS like S3 — privately, but still the public service. Notice there is no encryption anywhere on this picture.
Hai đường xanh dương và xanh lá là toàn bộ ý tưởng: một link vật lý, hai VIF, hai đích đến. Xanh dương (private VIF) đi vào VPC của bạn qua VGW; xanh lá (public VIF) tới public AWS như S3 — theo đường riêng, nhưng vẫn là service public. Để ý: không có chỗ nào trên hình này có mã hoá.
Virtual interfaces (VIF) — three, by destinationVirtual interface (VIF) — ba loại, theo đích đến
A VIF is a VLAN configured on the connection; the type you pick decides where the traffic is allowed to go. This is the single most common Direct Connect exam distinction. Một VIF là một VLAN cấu hình trên kết nối; loại bạn chọn quyết định traffic được phép đi tới đâu. Đây là điểm phân biệt hay gặp nhất của Direct Connect trong đề thi.
Colour by destination and it sticks: green public, blue private, purple transit. The one people forget — VPC interface endpoints (PrivateLink) are reached through a Private VIF, which is how on-prem consumes a private endpoint over Direct Connect.
Tô màu theo đích là nhớ ngay: xanh lá public, xanh dương private, tím transit. Cái hay quên — interface endpoint của VPC (PrivateLink) đi qua Private VIF, đó là cách on-prem dùng một private endpoint qua Direct Connect.
| VIF | ReachesVới tới | Use it forDùng khi |
|---|---|---|
| Public VIFPublic VIF | Public AWS endpoints — S3, public service APIs, anything on AWS public IPsEndpoint public của AWS — S3, các API service public, mọi thứ trên IP public của AWS | Private-path access to public services; also carries a VPN over DXTruy cập service public qua đường riêng; cũng dùng để chở VPN trên DX |
| Private VIFPrivate VIF | Your VPC — EC2, ALB, and VPC interface endpointsVPC của bạn — EC2, ALB, và interface endpoint của VPC | The everyday case: on-prem reaching private resources in one VPCTrường hợp thường ngày: on-prem với tới tài nguyên private trong một VPC |
| Transit VIFTransit VIF | A VPC via a Transit Gateway (through a Direct Connect Gateway)Một VPC qua Transit Gateway (thông qua Direct Connect Gateway) | Reaching many VPCs from one connectionVới tới nhiều VPC từ một kết nối |
Connection types — dedicated vs hostedLoại kết nối — dedicated và hosted
A Dedicated connection is a whole physical port reserved for you (1–400 Gbps); you request it from AWS, a Direct Connect Partner completes it. A Hosted connection is provisioned through a partner (50 Mbps–25 Gbps) and its capacity can be added or removed on demand. Either way, expect a lead time over a month for a new connection. Kết nối Dedicated là nguyên một cổng vật lý dành riêng cho bạn (1–400 Gbps); bạn yêu cầu với AWS, rồi một Direct Connect Partner hoàn tất. Kết nối Hosted được cấp qua partner (50 Mbps–25 Gbps) và dung lượng có thể thêm/bớt theo nhu cầu. Kiểu nào cũng nên tính thời gian chờ hơn một tháng cho một kết nối mới.
| DedicatedDedicated | HostedHosted | |
|---|---|---|
| CapacityDung lượng | 1 – 400 Gbps | 50 Mbps – 25 Gbps |
| What it isLà gì | a physical ethernet port dedicated to youmột cổng ethernet vật lý dành riêng cho bạn | capacity carved out by a partnerdung lượng do partner cắt ra |
| Requested viaYêu cầu qua | AWS first, then completed by a DX PartnerAWS trước, rồi một DX Partner hoàn tất | a DX Partnermột DX Partner |
| Capacity on demandDung lượng linh hoạt | no — fixed port speedkhông — tốc độ cổng cố định | yes — add / remove on demandcó — thêm/bớt theo nhu cầu |
Encryption — private is not encryptedMã hoá — riêng tư không phải là mã hoá
Resilience — a single DX is a single point of failureChịu lỗi — một DX đơn là một điểm chết
Direct Connect is not redundant by default. Three levers, cheapest to strongest: a backup Site-to-Site VPN over the internet; a LAG to bundle links at one location; and, for real availability, two DX connections at two different DX locations. Direct Connect không tự dự phòng. Ba mức, từ rẻ tới mạnh: một Site-to-Site VPN dự phòng qua internet; một LAG để gộp link tại một location; và, để thực sự sẵn sàng, hai kết nối DX ở hai DX location khác nhau.
1 · Backup VPN — cheapest1 · VPN dự phòng — rẻ nhất
Keep a Site-to-Site VPN over the internet on standby as failover for the DX. Lower bandwidth, but instant and nearly free to keep warm — a degraded link beats an outage. Giữ sẵn một Site-to-Site VPN qua internet làm failover cho DX. Băng thông thấp hơn, nhưng dựng ngay và gần như miễn phí để để sẵn — link yếu vẫn hơn mất kết nối.
The dashed VPN costs almost nothing to keep warm and covers the day the fibre is cut. It won't match DX bandwidth, but a degraded link beats an outage — which is exactly the scenario the exam rewards.
Đường VPN nét đứt gần như không tốn gì để giữ sẵn, và cứu bạn đúng hôm sợi cáp bị đứt. Nó không sánh được băng thông DX, nhưng link yếu vẫn hơn mất kết nối — đúng tình huống mà đề thi cho điểm.
2 · LAG — bundle links at one location2 · LAG — gộp link tại một location
A Link Aggregation Group sums up to 4 dedicated connections into one logical link (active-active) for more speed and link-level failover. Every member must be dedicated, the same bandwidth, and terminate at the same DX endpoint — so a LAG protects within one location only. Một Link Aggregation Group gộp tối đa 4 kết nối dedicated thành một link logic (active-active) để tăng tốc và có failover ở mức link. Mọi thành viên phải dedicated, cùng băng thông, và kết thúc tại cùng một DX endpoint — nên LAG chỉ bảo vệ trong một location.
A LAG is a bandwidth-and-link-failover tool, not a location-failover tool. Because every link ends at the same DX endpoint, the whole bundle dies if that location does — which is why it is level two, not the top.
LAG là công cụ tăng băng thông và failover ở mức link, không phải failover ở mức location. Vì mọi link đều kết thúc ở cùng một DX endpoint, cả bó chết theo nếu location đó chết — nên nó là mức hai, chưa phải mức cao nhất.
3 · Two DX locations — strongest3 · Hai DX location — mạnh nhất
For real availability, run two connections at two different Direct Connect locations. A whole location — power, fibre, the AWS cage — can fail and the second path carries on. This is the only option that survives a location outage; a LAG cannot. Muốn thực sự sẵn sàng, chạy hai kết nối ở hai Direct Connect location khác nhau. Cả một location — điện, cáp, AWS cage — có thể hỏng mà đường thứ hai vẫn chạy. Đây là lựa chọn duy nhất trụ được qua sự cố cả một location; LAG thì không.
Two independent paths through two locations is the answer to "maximum resilience". Pair it with a backup VPN for a third layer, and you have covered link, location, and internet-fallback all at once.
Hai đường độc lập qua hai location là đáp án cho "chịu lỗi tối đa". Ghép thêm một VPN dự phòng làm lớp thứ ba là bạn phủ luôn cả link, location, lẫn đường lui qua internet cùng lúc.
Direct Connect Gateway — many VPCs, many RegionsDirect Connect Gateway — nhiều VPC, nhiều Region
One DX + one Private VIF normally reaches one VPC in the connection's Region. A Direct Connect Gateway — a global resource — lets that same connection reach VPCs in multiple Regions, and across accounts. Add a Transit Gateway (via a Transit VIF) and one DX fans out to many VPCs plus on-prem, any-to-any. Một DX + một Private VIF thường chỉ với tới một VPC trong Region của kết nối. Một Direct Connect Gateway — tài nguyên toàn cầu — cho phép chính kết nối đó với tới VPC ở nhiều Region, và xuyên account. Thêm Transit Gateway (qua Transit VIF) là một DX toả ra nhiều VPC cộng on-prem, any-to-any.
The Direct Connect Gateway is the "reach more than one VPC" answer, and it is global — one gateway, VPCs in different Regions and accounts, from a single physical connection. Here each VPC has its own private VIF; for a fleet of VPCs that also need to talk to each other, put a Transit Gateway behind it (next).
Direct Connect Gateway là đáp án cho "với tới hơn một VPC", và nó toàn cầu — một gateway, VPC ở nhiều Region và account, từ đúng một kết nối vật lý. Ở đây mỗi VPC có private VIF riêng; với cả loạt VPC còn cần nói chuyện với nhau, đặt một Transit Gateway phía sau nó (ngay dưới).
With a Transit Gateway — the Transit VIF pathKèm Transit Gateway — đường Transit VIF
A private VIF reaches one VPC each. To fan a single DX out to many VPCs any-to-any, use a Transit VIF: DX → Direct Connect Gateway → Transit Gateway → every attached VPC. The TGW can also carry a VPN attachment, so on-prem and the whole VPC fleet meet at one hub. Một private VIF chỉ với tới một VPC. Muốn một DX toả ra nhiều VPC any-to-any, dùng Transit VIF: DX → Direct Connect Gateway → Transit Gateway → mọi VPC đã gắn. TGW còn gắn được cả một VPN attachment, nên on-prem và cả loạt VPC gặp nhau ở một hub.
This is the difference the previous note pointed at: swap the private VIF for a Transit VIF and the single DX no longer reaches one VPC at a time — it lands on a Transit Gateway that fans out to the whole fleet, on-prem included.
Đây đúng là điểm mà ghi chú phía trên nhắc tới: đổi private VIF sang Transit VIF là một DX không còn với từng VPC một nữa — nó vào một Transit Gateway rồi toả ra cả loạt, kể cả on-prem.
SiteLink turns the Direct Connect Gateway into a relay between two DX locations, so two of your own data centres talk to each other over the AWS backbone — no VPC and no Region sitting in the path. It is the odd one out on this page: the destination isn't AWS at all, it's your other site.
SiteLink biến Direct Connect Gateway thành trạm trung chuyển giữa hai DX location, để hai data center của chính bạn nói chuyện với nhau qua backbone của AWS — không có VPC và không có Region nằm trên đường đi. Đây là ca đặc biệt trên trang này: đích đến không phải AWS, mà là site kia của bạn.
Things that catch you outNhững chỗ dễ sập bẫy
- "Private" read as "encrypted". DX is private and off the internet, but not encrypted. Encryption requirement → VPN over DX. Hiểu "riêng tư" thành "mã hoá". DX riêng tư và không qua internet, nhưng không mã hoá. Có yêu cầu mã hoá → VPN trên DX.
- Assuming DX is redundant. One connection is one point of failure. Design in a backup VPN, a second location, or a LAG from the start. Tưởng DX đã dự phòng sẵn. Một kết nối là một điểm chết. Thiết kế backup VPN, location thứ hai, hoặc LAG ngay từ đầu.
- Wrong VIF. Reaching S3 privately needs a Public VIF; reaching your VPC needs a Private VIF; reaching many VPCs via TGW needs a Transit VIF. Interface endpoints are reached over a Private VIF. Chọn nhầm VIF. Tới S3 theo đường riêng cần Public VIF; tới VPC của bạn cần Private VIF; tới nhiều VPC qua TGW cần Transit VIF. Interface endpoint đi qua Private VIF.
- Expecting it fast. A new DX often takes over a month. If the scenario needs connectivity now, the interim (or the whole answer) is a VPN. Trông đợi có ngay. Một DX mới thường mất hơn một tháng. Nếu đề cần kết nối ngay, giải pháp tạm (hoặc cả đáp án) là VPN.
- One DX, VPCs in other Regions. A plain Private VIF is Region-local. Multi-Region / multi-account reach needs a Direct Connect Gateway. Một DX, VPC ở Region khác. Private VIF trần chỉ trong Region. Muốn với đa Region / đa account cần Direct Connect Gateway.
- LAG rules. Members must all be dedicated, the same bandwidth, and end at the same DX endpoint — a LAG does not span two locations, so it is not location-level HA. Luật của LAG. Các thành viên phải cùng dedicated, cùng băng thông, và kết thúc ở cùng một DX endpoint — LAG không trải qua hai location, nên không phải HA ở mức location.
Exam reflexesPhản xạ khi thi
| The question says…Đề nói… | AnswerĐáp án |
|---|---|
| "Consistent low latency / high bandwidth, not over the internet""Độ trễ thấp / băng thông cao ổn định, không qua internet" | Direct ConnectDirect Connect |
| "Private line and the traffic must be encrypted""Đường riêng và traffic phải mã hoá" | VPN over Direct Connect (IPsec, on a Public VIF)VPN trên Direct Connect (IPsec, trên Public VIF) |
| "Access S3 privately over Direct Connect""Truy cập S3 theo đường riêng qua Direct Connect" | Public VIFPublic VIF |
| "Reach resources in a VPC over Direct Connect""Với tới tài nguyên trong VPC qua Direct Connect" | Private VIFPrivate VIF |
| "DX to VPCs in multiple Regions / accounts""DX tới VPC ở nhiều Region / account" | Direct Connect Gateway (global)Direct Connect Gateway (toàn cầu) |
| "DX to many VPCs that also talk to each other""DX tới nhiều VPC mà chúng còn nói chuyện với nhau" | Transit VIF → Transit Gateway (via DX Gateway)Transit VIF → Transit Gateway (qua DX Gateway) |
| "Cheap failover for a Direct Connect link""Failover rẻ cho một đường Direct Connect" | Backup Site-to-Site VPNSite-to-Site VPN dự phòng |
| "Maximum resilience for Direct Connect""Chịu lỗi tối đa cho Direct Connect" | Two connections at two DX locationsHai kết nối ở hai DX location |
| "Increase bandwidth / failover by bundling DX links""Tăng băng thông / failover bằng cách gộp link DX" | LAG — up to 4 dedicated, same bandwidth, same endpointLAG — tối đa 4 dedicated, cùng băng thông, cùng endpoint |
| "Data-centre to data-centre over the DX backbone, bypass Regions""Data center tới data center qua backbone DX, bỏ qua Region" | SiteLinkSiteLink |