Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I detailed in this question on StackOverflow how some random requests are not making it from the client to my Node.js app server, resulting in a gateway timeout. In summary, identical requests are, at random, not even making it far enough to trigger a console.log() in my first line of express middleware.

I need to narrow down the problem, though, to find out WHERE the traffic is being lost and it was suggested that I try a packet sniffer on my app servers. Here's my setup:

  • 2x Load Balancers (m1.larges)
  • 2x node.js servers (also m1.large)

Here's what's interesting/unusual: the node.js servers started as PHP servers with an Apache stack and continue to serve PHP files for my domain (streamified.me). However, I use a little httpd.conf magic on the app servers so that requests to api.streamified.me get routed over port 8888 to the node.js server:

 RewriteCond %{HTTP_HOST} ^api.streamified.me
 RewriteRule ^(.*) http://localhost:8888$1 [P]

So, the request hits the load balancer => goes to an app server => gets routed to port 8888 if it's intended for the API => gets handled by node.js

So, in the same httpd.conf file, I turned on RewriteLogLevel 5 and then created a simple PHP+CURL script on my localhost to hit my api.streamified.me with a random URL (which should cause node.js to trigger a simple "not found" response) until it resulted in a Gateway timeout. Here, you can see that it has happened -- and the rewrite log shows that the request was definitely received by the app server and forwarded to port 8888... but it was never received by node.js (or, at least, the first line of code in the first line of middleware never gets it...)

Image Link: http://i.stack.imgur.com/3OQxS.png

share|improve this question
    
Timing out implies there's a firewall blocking the connection to port 8888. –  DerfK Oct 13 '12 at 17:51
    
That doesn't really make sense; a firewall would be active at all times, not just periodically. –  Zane Claes Oct 17 '12 at 17:30
    
You didn't say it was periodic, I assumed that you always got the gateway timeout –  DerfK Oct 17 '12 at 18:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.