News for hackers. Stuff that matters.
Re:Moving from PHP to C saved my web startup. by BuckToBid on Friday October 22, 2010 @02:13PM (#1820757)
Thanks! I understand your point, but a fork server is so simple I don't think there is much that can go wrong there, if it was serving more data I would be worried, but its meant to do a quick and short reply.
Re:Moving from PHP to C saved my web startup. by konad on Friday October 22, 2010 @04:04PM (#1821261)
it's not called a forkbomb for nothing
Re:Moving from PHP to C saved my web startup. by BuckToBid on Friday October 22, 2010 @04:54PM (#1821467)
http://en.wikipedia.org/wiki/Fork_bomb

Fork Bombs are easier to pull off from the command line. Not so much with DOS. I would say that loading a large webserver for each request would use up more resources than a tiny C program. Thats the whole point of the post.

Re:Moving from PHP to C saved my web startup. by konad on Friday October 22, 2010 @06:09PM (#1821726)
You're right about the webserver being overload. Threads would be less expensive than processes.

I would use Go for this service myself. Defending against abuse is hard whichever way one goes.

Re:Moving from PHP to C saved my web startup. by rubashov on Friday October 22, 2010 @04:49PM (#1821442)
Writing your own server in C seems a little crazy anymore. Just use a C++ framework like POCO or ASIO. POCO gives you a fast httpserver component with all the tricky stuff figured out.