Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not necessarily specific to node.js, but in general, instead of a standard webserver, use netcat, on multiple obscure ports, where each instance of netcat acts once and is discarded.

http://en.wikipedia.org/wiki/Netcat




That plan sounds like half-assed voodoo, but it kind of resembles the approach that qmail uses for security, which is actually pretty neat:

http://cr.yp.to/qmail/qmailsec-20071101.pdf


Thank you for the link, but my approach is neither "half-assed" nor "voodoo". I've used netcat, as described, for a small project, and it worked well. I'm about to do the same, for a big project, and I expect that it will again work well. Standard webservers are bloated. Speed, security and stability can be enhanced by distributing work across a system of one-shot processes. I take some inspiration from Jef Poskanzer's design decisions in thttpd.

http://acme.com/software/thttpd

http://en.wikipedia.org/wiki/Jef_Poskanzer

NOTE TO DOWNVOTERS: You shouldn't downvote a technical suggestion, no matter how strange, unless you are certain that it won't work.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: