Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to implement a server side application catching incoming http requests with a certain header.After catching the request it extracts information about type of HTTP request (GET,HEAD,PUT,POST etc.), requested url and sends it to another server, collecting the data ( a webservice or a server having a 3rd party tool like statsd).

Application needs to be as lightweight as possible.

On a side note corresponding server where the requests are coming to, will be in a high load, as a result application needs to perform well under such load. I know that this application can be implemented in any language, however I want to try something new.

Is node.js suitable for developing such an application regarding complexity and performance?

share|improve this question

closed as off-topic by gnat, GlenH7, MichaelT, Dan Pichelman, Dynamic Jul 2 at 15:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, GlenH7, MichaelT, Dan Pichelman, Dynamic
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

You can do package sniffing in Node.JS with the node_pcap package. It relies on libpcap. Though there is a port of libpcap in Windows, there might be some configuration that needs to be done in order to get it work in Windows.

When a network package is captured you can easily check if it is an http request with a certain header.

If that is too low level for you, you can also use http_trace that specifically traces http requests for you.

Here are some references to get you started:

share|improve this answer
node_pcap seems like what i need and easy to implement too. For performance evaluation i need to make some tests. Thank you for answer. –  fga Dec 27 '12 at 6:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.