Anyway to optimize magento2 in docker + kubernetes

Im using magento2 as a graphql api provider to fetch product only

My approach is deploying in kubernetes:

  • bundle nginx+fpm together,
  • run with production mode,
  • deploy static file,
  • and of cause with redis , elastic search and RDS

turn out result is

use the spec: limit 1 cpu + 4gb memory, it require 0.7 second for a "get category" graphql request (1 category with 1 product and 1 website only)

which is not acceptable, expect under 200ms(my local machine can do faster than 200ms),

i dont use varnish full page cache, as i only use graphql in magento2, it wont help,

flat category also wont help too much as my testing result

Any advise for optimize while magento2 deploy in kubernetes?

Source: Docker Questions