Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Firestoreコスト圧縮の旅

 Firestoreコスト圧縮の旅

Daiki Hirakata

May 21, 2024
Tweet

More Decks by Daiki Hirakata

Other Decks in Technology

Transcript

  1. Who am I ? • Daiki Hirakata (42) • Software

    Engineer • Main Programing Languages: PHP, TypeScript • Primary interests: DevOps, Docker, Kubernetes, GCP @bigplants
  2. ن໛ײ • Cloud Functions • HTTP Trigger: 184 • Event

    Trigger: 167 • Cloud Firestore • Collections: over 100
  3. ΞΫςΟϏςΟϩάͷҠߦ • Firestore ͔Β BigQuery ʹҠߦ • ΤΫεϙʔτର৅͔Βআ֎ • ϩά͸Firestoreʹ͸ஔ͔ͳ͍ʂ

    💰໿ ¥50,000/month ѹॖ (Write) 💰໿ ¥500,000/month ѹॖ (ΤΫεϙʔτͷRead)
  4. Stream Firestore to BigQuery • https://extensions.dev/extensions/ fi rebase/ fi restore-bigquery-export

    • Cloud Firestore ίϨΫγϣϯ಺ͷυΩϡϝϯτ Λ BigQuery ʹΤΫεϙʔτɻΤΫεϙʔτ͸Ϧ ΞϧλΠϜ͔ͭ૿෼Ͱ͋ΔͨΊɺBigQuery ͷσʔ λ͸ Cloud Firestore ͷίϯςϯπͷϛϥʔͱ Δɻ
  5. Firestore -> Cloud SQL΁ͷҠ ߦ Cloud Functions Cloud Firestore Cloud

    Run Cloud SQL ̍೥Ҏ্ͷϓϩδΣΫτʹͳΔ