owned this note changed 4 years ago
Linked with GitHub

議程4 - API Performance Tunning Story when Goalng meet with GraphQL - 王堃瑋

tags: GopherCon TW 2020 Agenda

歡迎來到 https://hackmd.io/@Golang-Taipei/GopherCon2020 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。

Slide

請從這裡開始

  • Performance Issue

    • Home page loading time need 30 sec
  • Analysis result

    • No cache mechanism
    • No read/write sepration mechnais for RDS
    • Too many data quires
  • Solution

    • Cache
      • Use multiple caches
      • Local cache and redis cache
    • Eager loading
    • Aggregrator
      • Use golang feature - Goroutines and Channel
      • Run at background to collect data
      • Flow
        • Define aggregator processor
        • New aggragtor at resolver
        • Do query by aggregator
      • Sample code
        • check sample code on slide
  • Conclution

    • Aggregrator :
      • Down size total query amount. (9000 data query -> 10 query)
      • The loading time is reduced to about 3 seconds if cache missed.
      • Down size DB loading.
Select a repo