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

Handling TV Ad Traffic Influx with Microservices

Handling TV Ad Traffic Influx with Microservices

https://wantedly.connpass.com/event/135968/ での登壇資料です。

Ryo Kubota

July 23, 2019
Tweet

More Decks by Ryo Kubota

Other Decks in Programming

Transcript

  1. FiNC Technologies Ryo Kubota )BOEMJOH57"E5SBGGJD*OGMVY XJUI.JDSPTFSWJDFT

  2. • Ryo Kubota • FiNC Technologies • SRE • New

    graduate 8IPBN*
  3. • What is Microservices? • About our TV Ad •

    Discussion on Microservices after TV Ad "HFOEB
  4. What is Microservices?

  5. An architecture that structures a big system as a collection

    of small services 8IBUJT.JDSPTFSWJDFT
  6. • Technical heterogeneity • Resiliency • Scalability • etc #FOFGJUTPG.JDSPTFSWJDFT

  7. 8IZ'J/$BEPQU.JDSPTFSWJDFT

  8. l0OF"QQGPS&WFSZ#PEZz The concept goes well with Microservices New functions have

    been quickly released UP$BQQ "VUIFOUJDBUJPO &DPNNFSDF "* $PVQPO 8FBSBCMF 3FDPFOHJOF -JGFMPH 4/4 $IBU UP#TJUF 1PJOU 4VQQMFNFOU
  9. About our TV Ad

  10. 57"E5SBGGJD*OGMVY

  11. • .VMUJQMF/FX'VODUJPOT3JHIU #FGPSFUIF57"E • https://note.mu/mizoguchiyuji/n/n1267b01a3756

  12. • Traffic influx • Parallel development right before the TV

    ad • But NO DOWNTIME 8FIBOEMFE57"E
  13. Discussion on Microservices after TV Ad

  14. 8IBUEJEXPSL  4DBMJOH

  15. • You can scale out each function separately 8JUI.JDSPTFSWJDFTʜ

  16. "NJDSPTFSWJDFGPSVTFSPOCPBSEJOH Transition in the number of workers → TV ad

    started
  17. • Quicker than scaling a single big monolith • Cost

    saving 4DBMJOH.JDSPTFSWJDFT
  18. 8IBUEJEXPSL  'VODUJPO#BTFE1BSUJUJPOJOH

  19. • .VMUJQMF/FX'VODUJPOTVOEFS %FWFMPQNFOUJO1BSBMMFM • https://note.mu/mizoguchiyuji/n/n1267b01a3756

  20. • You just need to focus on a single function

    • This can only be done with Microservices 1BSBMMFM%FWFMPQNFOU
  21. 'VUVSFJNQSPWFNFOU -FHBDZ.POPMJUI

  22. "-FHBDZ.POPMJUI4UJMM3FNBJOT Legacy monolith can often be a bottleneck

  23. &YBNQMFBU'J/$ .POPMJUI 4FSWJDF" 4FSWJDF# 4FSWJDF$ 4FSWJDF% : Synchronize user info

    • This monolith has a knowledge about to which services it has to synchronize its information => Tight coupling (Anti-pattern)
  24. • Anti-pattern emerged as a problem under increased traffic •

    The queues for synchronization got stuck *ODJEFOU%VSJOH57"E
  25. -PPTF$PVQMJOH • Each microservice should not have knowledge about other

    services • Use pub/sub model instead • Microservice just publishes some event • Other microservices subscribe it if needed
  26. .JHSBUJPOGSPN.POPMJUI • When you adopt Microservices, you often need to

    migrate from monolithic architecture • Legacy monolith is likely to be tightly coupled to other services • Complete migration not to fall into anti-patterns • Otherwise you might end up increasing complexity
  27. $PODMVTJPO

  28. $PODMVTJPO • We ran TV ad • We handled the

    traffic influx and parallel development with Microservices • Explained about a legacy monolith as future improvement