Back to articles
in case of fire put your heap on a cage - how we reduced our mem usage
How-ToDevOps

in case of fire put your heap on a cage - how we reduced our mem usage

via Dev.toMarcos Henrique

A few weeks ago, I dropped a message in our team Slack that made everyone stop what they were doing: "The work we have made on axios interceptors refactor + removing in memory cache + v8 tuning seems to improved mem usage A LOT" Some graphs came with it. One of those graphs where you don't need to read the y-axis to understand what happened 🙇‍♂️, the line simply drops and stays down. AWS confirmed it at the same timestamp. This is the story of how we got there... Spoiler: Datadog with its heap snapshot is the chef's kiss Preface (⚠️ DD&ECS&CDK newbies only) Just in case you never configured Datadog Tracing and created an ECS Cluster on Fargate fashion, with CDK obviously, if you already did it, jump to the next "Section"... 1. Creating the ECS Cluster import * as ecs from ' aws-cdk-lib/aws-ecs ' ; import * as ec2 from ' aws-cdk-lib/aws-ec2 ' ; const vpc = ec2 . Vpc . fromLookup ( this , ' Vpc ' , { tags : { Name : ' default-vpc ' } }); const cluster = new ecs . Cluster ( this , ' MainC

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles