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

Cacoo with Microservices

589adc4b48d83a84f0a58d654522bb16?s=47 Kohei
November 28, 2018

Cacoo with Microservices

589adc4b48d83a84f0a58d654522bb16?s=128

Kohei

November 28, 2018
Tweet

Transcript

  1. Cacoo ͸ͳͥ Kubernetes ʹΑΔ microservices ΁ͷಓΛબΜͩͷ͔ʁ Alternative Architecture DOJO Offline

    #1
  2. ϒϩάಡΜͰͶɻ͓ΘΓ

  3. - Cacoo ͷ։ൃνʔϜ͕ͲΜͳ՝୊Λ๊͍͔͑ͯͨ - Կނ microservices ͷಓΛબΜ͔ͩ - ͲΜͳٕज़ΛબΜ͔ͩ -

    microservices Խͯ͠Ͳ͏͔ͩͬͨ - ݱঢ়ͷ՝୊
  4. Kohei Kimura @cohhei 2018೥1݄ Nulab ೖࣾ Cacoo νʔϜͷόοΫΤϯυΤϯδχΞ ΄΅ Go

    ෱Ԭ
  5. Cloud-based diagrams, the easy way. Diagram maker for companies, teams,

    and you
  6. None
  7. ՝୊1: ϞϊϦγοΫͳΞϓϦέʔγϣϯ

  8. ґଘؔ܎ Ξοϓσʔτ Πϯϑϥ ։ൃޮ཰ ௐࠪ ։ൃޮ཰ Өڹௐࠪ ϨΨγʔ ίϛϡχ έʔγϣϯ

    ϞϊϦε ίϛϡχ έʔγϣϯ ϦϙδτϦ Ωϟον Ξοϓ CI/CD εέʔϧ ίϛϡχ έʔγϣϯ
  9. ՝୊2: ϝϯςφϯε͕ऴྃͨ͠ ϑϨʔϜϫʔΫ΍ϥΠϒϥϦ

  10. None
  11. None
  12. None
  13. ✓ αʔϏε͝ͱʹٕज़Λબ୒Ͱ͖Δ ✓ ෦෼తͳมߋ͕༰қʹͳΔ ✓ ʢ͏·͘ઃܭͰ͖Ε͹ʣαʔόʔϦιʔεΛ࠷దԽͰ͖Δ ✓ ʢ͏·͘ઃܭͰ͖Ε͹ʣݎ࿚ͳγεςϜʹͳΔ microservices

  14. ໨ඪ: มߋΛ༰қʹ

  15. micro services ෳ਺ͷαʔϏεͱDB ϑϩϯτΤϯυͷ෼ׂ ҟͳΔٕज़ ϨΨγʔͷߋ৽

  16. ํ਑ɾݪଇ

  17. - ໌֬ͳΦʔφʔγοϓ - খ͍͞΄Ͳྑ͍ - εΫϥον͔Βॻ͖ͳ͓ͯ͠ΈΔ - αʔϏεؒͷΠϯλʔϑΣʔε͸ڧ͍ܕ෇͚ - ։ൃ؀ڥ͸αʔϏε͝ͱʹࣗ༝ʹબ୒

    - ϕετϓϥΫςΟεʹै͏
  18. ٕज़ελοΫ

  19. Backend/Middleware - Kubernetes - Protocol Buffers - gRPC - RabbitMQ

    - Go Monitoring/Alerting - Elasticsearch + Kibana - Prometheus + Grafana - Zipkin
  20. Dashboard Editor

  21. Dashboard

  22. None
  23. Editor

  24. None
  25. None
  26. Dashboard Editor

  27. microservices ԽͷྲྀΕ

  28. EC2ظ Kubernetesظ ECSظ - ৽͍͠ػೳΛผαʔϏεͰ - طଘػೳΛ੾Γग़ͯ͠Dockernize - μογϡϘʔυͷαʔϏε -

    ECS ͷαʔϏεΛҠߦ
  29. region region Production Cluster Testing Cluster cacoo cacoo-beta cacoo-testing-e2e cacoo-testing-load

    cacoo monitoring monitoring storages storages namespaces namespaces stress test by selenium
  30. Scaling - Horizontal Pod Autoscaler - Cluster Autoscaler

  31. Monitoring / Alerting

  32. Logging stdout ops

  33. Metrics - Prometheus & Grafana

  34. None
  35. Metrics - goroutines - memory ͳͲ Alerting - Pod ͷ਺͕൒෼ҎԼʹͳͬͨͱ͖

    - Τϥʔ͕େྔʹग़ͨͱ͖ ͳͲ
  36. Zipkin

  37. https://zipkin.io/pages/architecture.html HTTP

  38. Backend/Middleware - Kubernetes - Protocol Buffers - gRPC - RabbitMQ

    - Go Monitoring/Alerting - Elasticsearch + Kibana - Prometheus + Grafana - Zipkin
  39. ͰɺͲ͏ʁ

  40. ґଘؔ܎ ‑ - ෦෼తͳมߋ͠΍͘͢ͳͬͨ - ϏϧυɾσϓϩΠ͕ߴ଎ - ෱ԬνʔϜ 㱻 ւ֎νʔϜ͕ಠཱ

    - Protocol Buffers ͷߋ৽ - ը໘Λލ͙ػೳͷ։ൃ ͷͱ͖
  41. PR/issue Ͱͷίϛϡχέʔγϣϯ

  42. νϟοτͰͷίϛϡχέʔγϣϯ

  43. ՝୊: ৽͍͠ෳࡶੑ

  44. - Seasar ΁ͷґଘ͸࢒͍ͬͯΔ - αʔϏεΛͲ͜Ͱ۠੾Δ͔ - αʔϏε௥Ճ͗͢͠ΔͱΠϯϑϥͷෛ୲Ὄ - ίʔυ/yamlͷ৑௕ੑ -

    DB Λ·͍ͨͩτϥϯβΫγϣϯ
  45. ·ͱΊ

  46. Cacoo ͷ՝୊ - ݹ͍ϑϨʔϜϫʔΫ - ϞϊϦγοΫͳΞϓϦέʔγϣϯͷڧ͍ґଘؔ܎ - ଟڌ఺Ͱͷ։ൃ ͦΕΒΛղܾ͢ΔͨΊʹ microservices

    Խ - খ͘͞࡞ͬͯ࿈ܞ - গͣͭ͠෼ׂͯ͠ ECS ্Ͱӡ༻ - ͦͷޙ Kubernetes ΁
  47. - ΞϓϦέʔγϣϯͷڥքͱΦʔφʔγοϓ͕໌֬ʹ - ܧଓతͳ։ൃ͕͠΍͘͢ͳͬͨ - ෦෼తʹมߋ͠΍͍͢ - ߴ଎ͳϏϧυɾσϓϩΠ - ·ͩ·ͩվળ͕ඞཁ

  48. ࠷ޙʹ

  49. ࢖ͬͯͶɻ

  50. Appendix

  51. Protocol Buffers - αʔϏεؒͷσʔλεΩʔϚ - .proto ϑΝΠϧʹఆٛ - Cacoo Ͱ୯Ұͷ

    proto ϦϙδτϦ → git submodule Ͱ֤αʔϏεʹ௥Ճ - ιʔείʔυΛੜ੒
  52. - GraphQL service -> gRPC services - gRPC services ؒ΋

    gRPC - ΞΧ΢ϯτɺϑΥϧμʔɺਤ ͳͲ
  53. cacoo-service-account cacoo-service-organization cacoo-service-diagram cacoo-service-folder cacoo-service-subscription cacoo-service-integration Main GraphQL service

  54. RabbitMQ - ෳ਺ͷϝοηʔδϯάύλʔϯ - WorkQueue - Publish/Subscribe - Routing -

    Topics - RPC - ΤσΟλʔͷฤूΠϕϯτΛ௨஌͢Δ ͳͲ - εΩʔϚ͸ Protocol Buffers Ͱఆٛ - DB ʹฒͿॏཁͳཁૉ
  55. Kubernetes - OSS - ΤίγεςϜͷڧ͞ - ྫ: helm