Monday 22 May 2017

Help debugging a node app

Hi guys,I'm a relatively green web developer (~2 years professionally) who has plenty of experience writing code for Node/React apps, but little experience managing performance or DevOps-ish type stuff.I have a hobby app that typically has anywhere from 15-30 users at any given time. It is a Meteor app on a Digital Ocean server deployed with mupx (Docker).I run into weird performance issues that I just don't know how to properly debug. Its very difficult to reliably reproduce -- I'll get messages from people saying my app load time is really long (sometimes for no reason I can see my CPU usage will shoot up to >100%).I decided to switch to a PaaS to offload some of the DevOps stuff I'm not familiar with, but it hasn't really helped. I have 2 containers running which seems like it should be more than enough for what I need, and yet with just a little bit of load it seems to take a massive performance hit.CPU spike with just one hitInitial load timeIf I spin up ~30 instances of the site, load time jumps up almost 10xEven if I cache the relatively large initial data dump ( a collection of ~4.5MB) and skip the database trip entirely, it still takes about 3 seconds to load everything into memory.I'm not asking for anyone to solve this problem for me, just looking for advice on where to begin debugging something like this. Thanks guys!

Submitted May 22, 2017 at 06:18PM by sicknarlo

No comments:

Post a Comment