Good article. Some bulletpoints from my experience running an e-commerce shop on GKE - no clustering.
- On GKE (GCP) one can leverage performance HPA for more aggressive autoscaling. Recommended - as baseline set of service can be kept smaller.
- Use a distinct metrics-endpoint for HPA - one which is queried much more frequently compared to your “normal” metrics-endpoint.
- Article optimizing-nodejs-performance-v8-memory-management-and-gc-tuning - great article. Ensure optimal memory segmentation as compute (CPU) is more expensive than data (memory). This was a very good improvement.
- We use request per second, ELU and CPU as distinct metrics for autoscaling. They work good in combination.
- Use a local DNS cache.
- Use another allocator instead of malloc - jemalloc (even despite being archived) is a good choice. Manage to keep memory under control. THP are recommended for optimal allocation.
More points obviously - happy to discuss if anyone need input.