Thanks for your guidance, until a few months ago we used the Cloudflare CDN service and made good changes to the static content through the page rules. After it, I read somewhere that using proxies like Cloudflare drastically reduces the performance of the discourse, so we disabled it.
Yesterday we increased the CPU cores from 16 to 24 and made the following changes in the app.yml
params:
# db_shared_buffers: "6GB"
db_shared_buffers: "7GB"
env:
# UNICORN_WORKERS: 16
UNICORN_WORKERS: 24
With these changes, our problem was temporarily solved, but I think we should make a fundamental change for the next few months from now.
So according to your recommendations, using CDN for serving static contents and splitting the discourse into two separate containers has a higher priority in performance improvements.