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

Kubernetesで分散処理をやってみる-Kafkaを添えて-

Avatar for Ogata Katsuya Ogata Katsuya
September 13, 2025
40

 Kubernetesで分散処理をやってみる-Kafkaを添えて-

Avatar for Ogata Katsuya

Ogata Katsuya

September 13, 2025
Tweet

Transcript

  1. ࣗݾ঺հ • ໊લ: ॹํ ࠀ࠸ (͓͕ͨ ͔ͭ΍) • ॴଐ: େࡕେֶ৘ใֶݚڀՊ

    • ࣗ୐αʔόʔ࢝Ί·ͨ͠ • Ӄࢼظؒதʹ5kgଠΓ·ͨ͠ • X: @ogata_katsuya • ݸਓ: www.ogatakatsuya.com
  2. ϨΠτϨʔγϯά ޫͷ൓ࣹɾ۶ંΛܭࢉͯ͠ɺߴ඼࣭ͳը૾Λੜ੒͢Δ • ޫઢͷ௥੻ʹΑΔը૾ੜ੒ख๏ • Ծ૝Χϝϥ͔ΒͷޫઢΛγϛϡϨʔγϣϯ • ޫͷ൓ࣹɾ۶ંɾӨΛ࠶ݱ͢Δ • ܭࢉίετ͕ߴ͍

    • ө૾΍CGɺݐஙՄࢹԽʹ͓͍ͯ࢖ΘΕΔ https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing/implementing-the-raytracing-algorithm.htm ޫઢͷ௥੻ʹΑΔը૾ੜ੒ख๏
  3. ϨΠτϨʔγϯά ޫͷ൓ࣹɾ۶ંΛܭࢉͯ͠ɺߴ඼࣭ͳը૾Λੜ੒͢Δ • ܭࢉྔ O ( P * R *

    S * D) • P: ϐΫηϧ਺ • R: ϐΫηϧ͋ͨΓͷޫઢ਺ • S: ΦϒδΣΫτ਺ • D: ൓ࣹ/۶ંਂ౓ • ࠓճͷ৔߹ɺO ( 800*800 * 50 * 8 * 8 ) = O ( 2,048,000,000 ) • ͜ΕΛ100pixel͝ͱʹ෼ׂͯ͠ɺॲཧΛฒྻ࣮ߦ͢Δ
  4. ߟ͑ΒΕΔΞʔΩςΫνϟ ͋ΔPod͕WorkerʹԿΒ͔ͷ௨৴खஈͰσʔλΛ౉ͯ͠ฦ͢ • σϝϦοτ • Worker PodͷΞυϨε͸ʁʁ • Producer -

    Workerؒͷ௨৴खஈ͸ʁʁ • ࠶ૹɾϦτϥΠॲཧ͕ඞཁʹͳΔʁʁ • ॲཧதʹαʔόʔ͕མͪͨΒϝοηʔδ͸ফ͑ͯ͠·͏ʁʁ • ॲཧ͕ॏ͘ͳͬͨ࣌ʹͲ͏΍ͬͯରԠ͢Δʁʁ
  5. ࣮ݧ಺༰ GKEΛ༻͍ͯɺSubscriberͷ਺ΛมԽͤ͞Δ • 3~6 Node • n2-standard-4 (4vCPU / 16GB)

    • ϦιʔεͷϦΫΤετʹԠͯ͡εέʔϧ • Subscriber • 1 / 10 / 20 / 30 / 40 / 50 / 60 / 70 / 80 Pod • ֤PodͷϦιʔε • CPU: 250m ~ 500m • ϝϞϦ: 256Mi ~ 512Mi
  6. ࣮ݧ݁Ռ Pod਺ ॲ ཧ ࣌ ؒ 0 550 1100 1650

    2200 1 10 20 30 40 50 60 70 80 1 pod 2105 seconds 20 pods 689 seconds 80 pods 368 seconds
  7. ࢀߟจݙ • Kubernetes • Kubernetes׬શΨΠυ ୈ2൛ • Ray-tracing • https://www.scratchapixel.com/lessons/3d-basic-rendering

    • Kafka • https://speakerdeck.com/oracle4engineer/shin-kafka • https://speakerdeck.com/hashitokyo/apache-kafka-and-the-world-of- streams