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 အချင်းချင်း ချိတ်ဆက်လို့ ရပါတယ်။
Create Transit Gateway (Account A)
Share TGW with Account B.
Accept the TGW Share (Account B)
Create a TGW Attachment (Account B)
Accept the Attachment (Account A)
Update TGW Route Tables
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 တစ်ခု မှာ အသေးစိတ် ထပ်ရေးထားပေးပါတယ်။






