Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http server for static files (slow response from external ip) #62

Open
CnApTaK opened this issue Aug 17, 2012 · 0 comments
Open

http server for static files (slow response from external ip) #62

CnApTaK opened this issue Aug 17, 2012 · 0 comments

Comments

@CnApTaK
Copy link

CnApTaK commented Aug 17, 2012

i'm trying to use node.js for this task
var static = require('node-static');
var file = new(static.Server)(__dirname+'/../public', { cache: 3600 });
require('http').createServer(function (request, response) {
request.addListener('end', function () {
file.serve(request, response);
});
}).listen(8080);
and with this code i have slow response time (downloading time).
if i make request to localhost, everything is fine and quick.
but when i open url from another pc in our netework.
many requests have bigger time... localhost = 10-20ms, external request = 200+ms
http://i42.fastpic.ru/big/2012/0817/92/e60f7242b5b9c9dc2428db4e00c98d92.jpg
you can see in this image top example is local request, and bottom - external.
this is not our network problem, because this static content is tested with apache server, and there is no difference between local and external requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant