I've been hacking on a preforked daemon to handle some network interfacing. This worked out okay until I hacked in load balancing features. The problem is that I have a really simple, clean, and fast preforking server that gets nicely blocked up when forked processes are busy. It's lovely, really. Here's the thing, I though I could write a clean scalable HTTP based solution without Apache. I was right about the clean part.
I didn't want to have to worry about how many idle kids I should leave around, when I should fork more kids or reap others. I thought I could get away with not caring about that. I was being kind of silly there. Truth is, I can probably make the system even faster by just writing an Apache module to do it for me. Lessons learned, I guess.
It's worth it to let Apache deal with the process management, logging, backhanding, and so on.
Posted from caseywest.com, comment here.