Skip to main content

Command Palette

Search for a command to run...

VPC Peering Vs Transit Gateway

Updated
3 min read
VPC Peering Vs Transit Gateway

အားလုံးဘဲ မင်္ဂလာပါ။ ဒီနေ့ sharing လုပ်ပေးချင်တာက‌ တော့ VPC Peering နဲ့ Transit Gateway အ ကြောင်း ဘဲ ဖြစ်ပါတယ်။

VPC တွေ တစ်ခုထက် မက များလာပြီ၊ VPC အချင်းချင်း connect လုပ်ဖို့ လည်း လိုအပ်လာပြီဆို ရင် VPC peering or Transit Gateway တစ်ခုမဟုတ်တစ်ခု သုံးပေးရပါမယ်။ VPC peering အကြောင်း အရင်ပြောပါ့မယ်။

VPC Peering

Account 1 ခု ၊ Same Region ထဲမှာ VPC 3 ခု ရှိတယ် ဆိုကြပါစို့ ။

VPC A, VPC B and VPC C (as shown in figure)

  • ပုံမှာ ပြထားသလို VPC-A and VPC-B ကြားမှာ Peering connection တစ်ခု,VPC-B and VPC-C ကြားမှာ Peering connection တစ်ခု create လုပ်လိုက်မယ်ဆိုရင် VPC-A and VPC-B , VPC-B and VPC-C ဘဲ ချိတ်လို့ ရမှာ ပါ။

  • VPC-A and VPC-C ချိတ်လို့ ရမှာ မဟုတ်ပါဘူး ။ VPC-A and VPC-C ချိတ်ချင်ရင် A and C ကြားမှာ လည်း peering connection တစ်ခု create လုပ်ပေးရမှာပါ။ အခုလို အခြေအနေ Non-transitive လို့ ‌ခေါ်ပါတယ်။ အဲ့တော့ VPC ‌တွေများ လာမယ်ဆိုရင် Peering connection ‌တွေလည်း များလာမှာ ပါ။

  • VPC peering သည် AWS Backbone network ကို အ သုံးပြုတာဖြစ်ပါတယ်။

  • Same region peering ကို Intra-region peering လို့ ‌‌ခေါ်ပြီး ၊ Different region peering ကို‌‌တော့ Inter-region peering လို့ ‌ခေါ်ပါတယ်။

  • Cost အနေနဲ့ ကတော့ VPC peering connection creating and maintaining အတွက် charges မရှိပါဘူး။ Data transfer charges only ဘဲ ကျသင့်မှာ ဖြစ်ပါတယ်။ Data transfer charges သည် same region (same AZ) အတွက်ဆို လျှ င် free ဖြစ်ပါတယ်။ same region (different AZ) အတွက်ဆိုလျှင် GB အလိုက် cost အနည်းငယ် ကုန်ကျမှာဖြစ်ပါတယ်။ Different region အတွက်ဆိုလျှင်လည်း GB အလိုက် ကုန်ကျမှာ ဖြစ်ပါတယ်။ AWS region တွေကို ဖြတ်သွားရတာဖြစ်လို့ same region ထက်တော့ cost ပိုများမှာ ဖြစ်ပါတယ်။

  • အချုပ်ဆိုရမယ်ဆိုရင် VPC အရေအတွက် နည်းမယ် ၊ Cost လည်း သက်သာချင်တယ် ဆိုရင် ‌‌‌တော့ VPC peering သုံးသင့်ပါတယ်။

Transit Gateway (TGW)

  • VPC အရေအတွက်လည်း များလာပြီ (e.g 10-100 VPC) ၊ နောက်ထပ်လည်း VPC ထပ်တိုးဖို့ ရှိမယ်၊ Multi-account/ Multi-region setup လည်း ဖြစ်လာပြီ ၊ on-premises network နဲ့ ချိတ်ဆက်ဖို့ လည်း လိုအပ်လာပြီ ဒီ အခြအနေထဲက တစ်ခုခုနဲ့ ကိုက်ညီနေပြီ ဆိုရင်တော့ Transit Gateway( TGW) ကို သုံးသင့်ပါသည်။

  • TGW သည်လည်း AWS backbone network ကို အ သုံးပြုတာဖြစ်ပါတယ်။

    ပထမဆုံး ဥပမာ အနေနဲ့ same Account, Same Region နဲ့ ဥပမာ ပြထားပါတယ်။

  • Transit Gateway တစ်ခု create လုပ်ပါမယ်။

  • သက်ဆိုင်ရာ VPC တွေမှာ Transit Gateway Attachment create လုပ်ပါမယ်။

  • VPC (A,B,C) တွေရဲ့ Transit Gateway Attachment တွေက Transit Gateway ကို ချိတ်ဆက်ကြမယ်။ Route table တွေမှာ လည်း route တွေ ရေးပြီးပြီ ဆိုရင် VPC (A,B,C) တွေသည်TGW မှတဆင့် အချင်းချင်း connect လုပ်လို့ရပါပြီ။ အခုလို အခြေအနေကို Transitive ဖြစ်တယ်လို့ ခေါ်ပါတယ်။ Hub and spoke architecture ဖြစ်ပါတယ်။

  • Cost အနေနဲ့ ဆိုရင်တော့ Data processing fees ကို GB အလိုက်ပေးဆောင်ရမည့် အပြင် TGW attahcment fees ကို attachment တစ်ခုချင်းစီအတွက် နာရီအလိုက် ကျသင့်မှာပါ။ VPC peering ထက် ပိုပြီး အကုန်အကျ များတယ်ဆိုပေမယ့် large network တွေအတွက် ပို အဆင်ပြေ ပါတယ်။

How to connect VPCs in different AWS accounts but in the same Region using a Transit Gateway (TGW) ?

နောက်ထပ် use case တစ်ခု အနေနဲ့ ပြောပြချင်တာကတော့ Transit Gateway ကို အသုံးပြုပြီး different account , same region မှာ ရှိနေတဲ့ VPC အချင်းချင်း ချိတ်ဆက်ချင်ရင် ဘယ်လို ချိတ်ဆက်ရမလဲ ကို ‌‌ ပြပေးသွားပါ့မယ်။

Transit Gateway (TGW) သည် regional resource ဖြစ်လို့ region တူရင် sharing လုပ်လို့ရပါတယ်။

Different account ဖြစ်ပေမယ့် same region ဖြစ်လို့ TGW ကို sharing လုပ်ပြီး VPC အချင်းချင်း ချိတ်ဆက်လို့ ရပါတယ်။

  1. Create Transit Gateway (Account A)

  2. Share TGW with Account B.

  3. Accept the TGW Share (Account B)

  4. Create a TGW Attachment (Account B)

  5. Accept the Attachment (Account A)

  6. Update TGW Route Tables

  7. Update VPC Route Tables

How to connect VPCs in different Region using a Transit Gateway (TGW) ?

နောက်ထပ် sharing လုပ်ပေးချင်တဲ့ use case တစ်ခုကတော့ Transit Gateway ကို အသုံးပြုပြီး

same account ဖြစ်စေ different account ဖြစ်စေ different region မှာ ရှိနေတဲ့ VPC တွေ အချင်းချင်း ချိတ်ဆက်ချင်ရင်တော့ Transit Gateway peering ကို အသုံးပြုပေးရမှာပါ။

Transit Gateway (TGW) သည် regional resource ဖြစ်လို့ region မတူရင် sharing လုပ်လို့မရပါဘူး။

Transit Gateway peering နဲ့ ပတ်သတ်ပြီး နောက်ထပ် blog တစ်ခု မှာ အသေးစိတ် ထပ်ရေးထားပေးပါတယ်။

More from this blog

Infrastructure ကိုင်ပြီး အိပ်ရေးမပျက် ချင် လျှင် ဒါမျိုး Alarms လုပ် 🔥🔥🔥

High Level ရေးထားတာပါ ဒါပေမဲ့ လွယ်ပါတယ် ​ကိုယ့်မှာ AWS Infra တွေရှိတယ်ဆို တွေ့သမျှ metric တွေကို alarms တွေလုပ်ပြီး notification ယူမနေဘဲ တကယ် effective ဖြစ်တဲ့ metric တွေကိုမှ CloudWatch ရဲ့ alarm feature တွေနဲ့ ပေါင်းပြီး ပို့စေချင်ပါတယ်။ ​ဥပမာ prod...

Jan 17, 20263 min read151
Infrastructure ကိုင်ပြီး အိပ်ရေးမပျက် ချင် လျှင်  ဒါမျိုး Alarms လုပ် 🔥🔥🔥

How to connect On Premises Network and Cloud (AWS)? (Part-2)

ကိုယ့်ရဲ့ ‌data center (on-prem) network နဲ့ AWS ချိတ်ဆက်ဖို့ လိုလာပြီဆိုရင် ဘယ်လို ချိတ်ဆက်ကြမလဲ? အပိုင်း (၂) မှာ တော့ Direct connect အကြောင်းကို ဆွေးနွေး သွားမှာ ဖြစ်ပါတယ်။ အပိုင်း (၁) Site-to-site VPN အကြောင်းကို လေ့လာချင်ရင်တော့ အောက်ပါ link မှာ ...

Dec 20, 20253 min read222
How to connect On Premises Network and Cloud (AWS)? (Part-2)

How to connect On Premises Network and Cloud (AWS)? (Part-1)

ကိုယ့်ရဲ့ ‌data center (on-prem) network နဲ့ AWS ချိတ်ဆက်ဖို့ လိုလာပြီဆိုရင် ချိတ်ဆက်နိုင်တဲ့ နည်း (၂) နည်း ရှိပါတယ်။ 1. Site-to-Site VPN (Virtual Private Network) 2. Direct connect Site-to-Site VPN - On-prem network နဲ့ AWS resources တွေ ချိတ်ဆက်တဲ့...

Dec 12, 20252 min read261
How to connect On Premises Network and Cloud (AWS)? (Part-1)

Accessibility for Designer

လွန်ခဲ့တဲ့အပတ်က ရုံးက Designer တွေနဲ့ တော်ကီပွားရင်း Accessibility နဲ့ပတ်သတ်တာတွေ သူတို့ကို ရှင်းပြဖြစ်တယ်။ ကိုယ်တိုင်ကလည်း အရင်ကတည်းက ဒီ topic ကိုစိတ်ဝင်စားလို့ လေ့လာနေတာဆိုတော့ အခွင့်အရေးရရင် ရသလို sharing လုပ်ဖြစ်တယ်။ အဓိကက Accessibility နဲ့ပတ်သတ်...

Nov 21, 20253 min read67
Accessibility for Designer

VPC Endpoint

အားလုံးဘဲ မင်္ဂလာပါ။ ဒီနေ့ sharing လုပ်ပေးချင်တာကတော့ VPC Endpoint အကြောင်းဘဲဖြစ်ပါတယ်။ VPC Endpoint ဆိုတာ VPC နဲ့ AWS services တွေ ကို public Internet ကို အသုံးမပြုဘဲနဲ့ Privately connect လုပ်ပေးတာ ဖြစ်ပါတယ်။ Internet Gateway, NAT Gateway နဲ့ Public...

Nov 18, 20252 min read88
VPC Endpoint
M

Myanmar Technical Blog

108 posts

Cloud, Linux, DevOps, Docker, Security အစရှိတဲ့ နည်းပညာများ အကြောင်းကို မြန်မာလို ပြန်လည်မျှဝေပေးမယ့် Blog ပဲဖြစ်ပါတယ်ခဗျာ...