NodeJS-ExpressJS going extremely slow when accesing from outside the LAN - node.js

I have a NodeJS server deployed with ExpressJS and the thing is that when I access it from computers in the same LAN works very well, but when I try to reach the server from outside, I have to wait almost 20 seconds to get all the data.
Any clues?
Thanks in advance!

Related

RaspberryPi Webserver /Cant Access Nginx Server via external public ip. What am i missing? Timeout

im trying now for hours and didnt get any further. I just got a simple Express app and an nginx server running on my raspberry pi.
Problem: I cannot access it through the external api. I always got a timeout :/
Steps that i took:
Configured Sites-available.
Checked for listeners:
[
Tried all port-forwarding stuff i could found in the router settings:
(its german but i guess u get the point)
Please help me ! Thx in advance :)
Problem Solved
The missing point was my router. Not every Router supports to access the external API while ure connected with the youre local internet.
I turned of the WI-FI on my phone and were able to access the site via external ip adress and the domain routing to it.
I hotspoted my PC and were also able to access the website
!! Most modern routers allow accessing while you stayed connect locally to the internet, so in most set up guides they didnt mention.
Hope i could help someone in future trouble.
For me it was a waste of 4-5 h. Happy Coding guys!

Port accessible only using wget localhost

I have a server running centos 7 using cpanel and whm with csf. I am trying to run a nodejs express application on it that listens on port 3000. In order to do so, I added the line tcp|in|d=3000|s=0.0.0.0 to csf.allow.
When I run the code and use wget localhost:3000, I get the html files as expected, but if I try to connect from a browser the server just doesn't get the request. Am I doingsomehting wrong?
I am new to Linux and server management, so sorry in advance if I didn't give enough information. I'll be happy to provide more if needed.
If anyone stumbles upon this from Google, the problem was that my server provider was blocking uncommon ports. I mailed them and after two minutes the problem was solved.

Socket.IO Connection Not working on University Wifi

I have created an chat app using Socket.IO . It works fine on my home internet. But whenever I am at my university and connected to versity wifi internet, I can't get connected at all. Its facing 'net::ERR_CONNECTION_TIMED_OUT' error.
Here is the url: demo.codesamplez.com/ultrachat/demo.html (You will may get it OK, as I do on home)
I guess, this might be some kind of firewall issue or something?
Does anybody has any clue how to go forward for solving this? Thanks in advance.
Switching from HTTP to HTTPS should get around the problem with incompatible proxy server. That forces the proxy to use HTTP tunneling to maintain the connection instead performing whatever magic it does.

NodeJS make problems under ELB

we are using ELB to Load balance between two NODEJS server.
Suddenly yesterday the service has started to recieve errors while i have two servers under the ELB.
when removing one of the servers and staying with only one server the service is working fine.
i don't have any log of traffic direction between the the servers and it seems that the system works fine with one server (no matter which one of them) and doesn't work with more than one server.
Any suggestions what should we check ?
10x!

Slow Https response in Jetty

I'm using servlets 3 with jetty 8.1.1 and the SslContextFactory on an amazon ec2 machine (m1-small).
The first HTTPS request from localhost (of the amazone machine) is about 150ms and further
requests seem to get faster (down to ~40ms) but not as close as to
the HTTP response time of only 20ms - why? Is encryption really that
slow?
Also when comparing HTTPS and HTTP from outside of the amazon cloud
the difference gets even worse: HTTPS requests are at least 400ms
slower!? How can that be? Is the encrypted content also bigger? And
how can I debug it or make all faster?
Some more informations: all 'measurements' are unscientificly done via time curl http://mydomain.com/ping but are reproducable. Also there is an ec2 load balancer in between. I'm sure I've configured something wrong or there is a big misunderstanding from me. Let me know!
update to 8.1.7
check the time from localhost on the aws machine for reference
check using the IP vs DNS, quite often those sorts of long pauses involve dns issues
set your /etc/hosts to bypass a DNS look for host as a test as well
-Dorg.eclipse.jetty.LEVEL=DEBUG on the server side to enable debug, should help your correlate the roundtrip inside of jetty and compare to actual network results
ssl decryption does incur some performance hit, hard to say that that would be all of your differences here though
odds are this is not specific to jetty but something in the environment, which hopefully some bullet above will help steer you in the right direction
I need to find out how to enable SSL sessions. For this I've created a new question as it is unclear how to turn on in jetty and how to handle on the client side

Resources