Thursday 26 July 2018

Random lag while receiving webhook

I am receiving telegram web hook on a nodejs server.I can see a random freeze which lasts for 3+ seconds.This is the code:https.globalAgent.maxSockets = 100;https.createServer(options,function(request, response) {var queryData = "";request.on('data', function(data) { queryData += data;var urlencode = require('urlencode');result=urlencode(queryData);console.log(result);response.writeHead(200, "OK", {'Content-Type': 'text/plain'});response.end();});}).listen(8443, "0.0.0.0");When I send message, I see it instantly in the console most of the times but randomly there is a freeze.What could it be?

Submitted July 26, 2018 at 07:09PM by Sidlohchab

No comments:

Post a Comment