I am working on node.js
express.js
app which is used for user data collection (in get request) and sends back only 200 ok response.
After getting data in request I am checking for existing entry in database dynamodb
and redshift
and for newer request I am storing data in dynamodb
.
In this process I required to to do some synchronous operations for that I am using async
's waterfall
method.
Also used callback
in few places.
I have used pm2
module on server for clustering
daemonizing
and logging
.
I have used console.log()
for logging steps.
This application perfectly working on my local system and also on server with no traffic.
All logs are working correctly also proper entires going in dynamodb
But this same app is not working if I increase traffic to large numbers. Logs also not working after increasing traffic.
I have no clue how to debug and find exact road block.
I want help for debugging issue and for and tips while working on large traffic.
P.S. :- I have tried increasing `http.globalAgent.maxSockets = large_number;
CPU and Memory utilisation is not high (~40% CPU and 60% Memory)
Local Environment
node.js = 0.12.0
express.js = 4.x
ubuntu 14.04.x
Server Environment (AWS ec2)
node.js = 0.12.0
express.js = 4.x
Red Hat 6.6.x
Load balancer = Amazon Elastic Load Balancer