Thuta Learning
Cloud Providers & Platforms
BasicDevOps & Toolsintermediate

Cloud Cost Basics

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Cloud Cost Basics concept ကို နားလည်ရှင်းပြနိုင်ရန်
  • Diagram/table ကို ဖတ်ပြီး platform/provider category တွေ ဘယ်လို ကွာခြားသလဲ ခြေရာခံနိုင်ရန်
  • ကိုယ့် project အတွက် ဘယ် platform category ကို ဘယ်လို ရွေးချယ်သင့်သလဲ ရှင်းပြနိုင်ရန်

နားလည်ထားရမယ့် အချက်

Cloud bill ဖွင့်ကြည့်ရင် ခက်ခဲပုံရနိုင်ပေမယ့် charge ခံရတဲ့ category တွေက ပုံမှန်အားဖြင့် ရိုးရှင်းတဲ့ set တစ်ခုပါ။

  • Compute — server run နေတဲ့ time
  • Storage — data သိမ်းထားတဲ့ volume
  • Database — managed database instance
  • Bandwidth/Egress — data ပြင်ပထုတ်ပို့ခြင်း
  • Requests — API call အရေအတွက်
  • Build minutes — compile/deploy လုပ်ချိန်
  • Logs — log storage volume

အရေးကြီးဆုံး distinction က fixed cost vs usage-based cost ပါ။ Fixed cost ဆိုတာ traffic ဘယ်လောက်ပဲရှိရှိ amount တူတူကျသင့်တာမျိုးပါ။ Usage-based cost ကတော့ တကယ့် consumption အလိုက် ပြောင်းလဲသွားတာပါ။

Free tier က အမြဲတမ်း free ဟု မဆိုလိုပါ

Free tier ဆိုတာ usage limit တစ်ခု ကျော်တာနဲ့ charge စတင်ပါတယ်။ Production traffic တက်လာတာနဲ့အမျှ ဒီ limit ကို ကျော်သွားနိုင်ပြီး ရုတ်တရက် bill တက်လာနိုင်ပါတယ်။

text
COST BREAKDOWN MAP
------------------
COST BREAKDOWN MAP
---------------------

  Compute   ---\
  Storage   ----\
  Database  -----\
  Bandwidth ------>---[ TOTAL CLOUD BILL ]
  Requests  -----/
  Build     ----/
  Logs      ---/

  Each category can be FIXED (same cost every period)
  or USAGE-BASED (scales with consumption). Most bills
  mix both types across different categories.

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

Real pricing number တစ်ခုမှ မထည့်ဘဲ 'cost bill ဆိုတာ ဘယ်လို structure ရှိလဲ' ဆိုတာကိုသာ ဒီ code example က ပြသပါမယ်။

Category လေးခု — compute, storage, bandwidth, requests — အတွက် illustrative placeholder unit cost ကို သတ်မှတ်ပြီး rough relative percentage breakdown ကို တွက်ပါလိမ့်မယ်။

Structure ကို မှတ်ပါ၊ Number ကို မမှတ်ပါနှင့်

ဒီ output ရဲ့ တန်ဖိုးက dollar amount မဟုတ်ဘဲ ဘယ် category က bill ကို drive လုပ်နေလဲ ဆိုတဲ့ pattern ပါ။

Free tier က ‘ထာဝရ free’ မဟုတ်ပါ

Production traffic တိုးလာတိုင်း free tier limit ကို ကျော်သွားနိုင်ပြီး unexpectedly bill တက်လာနိုင်ပါတယ်။ Launch မလုပ်ခင် expected usage ကို free tier limit နဲ့ နှိုင်းယှဉ်ကြည့်ပါ။

အတူတူ စမ်းရေးကြည့်မယ်

javascript
function estimateCostBreakdown(usage) {
  // ILLUSTRATIVE placeholder unit costs only - NOT real provider pricing
  const illustrativeUnitCost = {
    computeHours: 0.05,
    storageGB: 0.02,
    bandwidthGB: 0.09,
    requestCount: 0.0000004
  };

  const rawCost = {
    compute: usage.computeHours * illustrativeUnitCost.computeHours,
    storage: usage.storageGB * illustrativeUnitCost.storageGB,
    bandwidth: usage.bandwidthGB * illustrativeUnitCost.bandwidthGB,
    requests: usage.requestCount * illustrativeUnitCost.requestCount
  };

  const total = Object.values(rawCost).reduce((sum, n) => sum + n, 0);
  const breakdownPercent = {};
  for (const category in rawCost) {
    breakdownPercent[category] = Math.round((rawCost[category] / total) * 1000) / 10;
  }

  return {
    estimatedTotalUnits: Math.round(total * 100) / 100,
    breakdownPercent
  };
}

const smallApiWorkload = {
  computeHours: 720,
  storageGB: 50,
  bandwidthGB: 200,
  requestCount: 2000000
};

console.log(JSON.stringify(estimateCostBreakdown(smallApiWorkload), null, 2));
You should see
{
  "estimatedTotalUnits": 55.8,
  "breakdownPercent": {
    "compute": 64.5,
    "storage": 1.8,
    "bandwidth": 32.3,
    "requests": 1.4
  }
}

(unit တွေက placeholder ဖြစ်ပြီး real pricing မဟုတ်ပါ — compute နှင့် bandwidth က bill ရဲ့ အများစုကို drive လုပ်နေကြောင်း structure ကို ပြသနေပါသည်)

၅ မိနစ် စမ်းကြည့်

bandwidthGB ကို 2000 အထိ တိုးပြီး run ကြည့်ပါ — breakdown percentage ဘယ်လိုပြောင်းလဲလဲ ကြည့်ပါ။ Real app တစ်ခုမှာ egress traffic ကြီးလာရင် ဘာဖြစ်တတ်လဲ စဉ်းစားကြည့်ပါ။

သတိလေးတစ်ချက်

Free tier ကို ‘ဘယ်တော့မှ charge မဖြစ်ဘူး’ လို့ ထင်မှတ်ခြင်း

Bandwidth/egress cost ကို လျစ်လျူရှုပြီး compute cost ကိုသာ အာရုံစိုက်ခြင်း

Wikipedia: Cloud computing (pricing models section)Cloud Providers & Platforms

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Free tier ကို ‘ဘယ်တော့မှ charge မဖြစ်ဘူး’ လို့ ထင်မှတ်ခြင်း
  • Bandwidth/egress cost ကို လျစ်လျူရှုပြီး compute cost ကိုသာ အာရုံစိုက်ခြင်း
  • ဒီ course က provider/platform landscape ကို comparison-level မှာသာ သင်ပေးပါတယ် — AWS, Docker, CI/CD, Firebase, deployment fundamentals ကို နက်နက်ရှိုင်းရှိုင်း လေ့လာချင်ရင် AWS Fundamentals, Docker, CI/CD, Firebase, Cloud & Deployment tutorial တွေဆီ ဆက်သွားပါ။

လေ့ကျင့်ခန်း

bandwidthGB ကို 2000 အထိ တိုးပြီး run ကြည့်ပါ — breakdown percentage ဘယ်လိုပြောင်းလဲလဲ ကြည့်ပါ။ Real app တစ်ခုမှာ egress traffic ကြီးလာရင် ဘာဖြစ်တတ်လဲ စဉ်းစားကြည့်ပါ။

You'll know it worked when: { "estimatedTotalUnits": 55.8, "breakdownPercent": { "compute": 64.5, "storage": 1.8, "bandwidth": 32.3, "requests": 1.4 } } (unit တွေက placeholder ဖြစ်ပြီး real pricing မဟုတ်ပါ — compute နှင့် bandwidth က bill ရဲ့ အများစုကို drive လုပ်နေကြောင်း structure ကို ပြသနေပါသည်)

Cloud Cost Basics | Thuta Learning