httpd.conf - filter IPs for different web paths or authentication?

Laurent Bercot ska-dietlibc at skarnet.org
Mon Apr 18 11:19:01 UTC 2011


>> Run two httpd's with different configs, one bound to 127.0.0.1:port
>> and the other to 0.0.0.0:port
> 
> Yes, I've thought about it but I wanted to keep resources usage at 
> minimum level as it's embedded machine.

 You have been brainwashed by behemoth servers and people who can't
design lean software. Resource usage optimization with busybox and other
resource-aware Unix software does not work like this. :)

 Since your httpd is busybox and you already have at least one long-lived
busybox process on your machine (your first httpd, and I'm guessing your
init is busybox as well), having one more will barely consume any
resources. All the text and read-only data will be shared, for a start.

 Even if all your apps were different binaries, you could run your
httpds (and other servers) under inetd or tcpserver, that consume very
few resources until a client connection actually happens and the real
httpd is spawned. Temporarily.

 Processes are not a scarce resource, and well-written processes will
use a negligible amount of scarce resources (CPU and RAM) when idling.
Do not be afraid to launch more processes when you need them.

-- 
 Laurent


More information about the busybox mailing list