Hacker News new | past | comments | ask | show | jobs | submit login

Disclaimer: I work at AWS, I'm not speaking for my employer. I also helped write Apache httpd, and I'm not speaking for Apache either. Just on my own behalf.

The Apache configuration in the benchmark isn't great, using values of;

  MaxClients         400
  MinSpareThreads     25
  MaxSpareThreads     75 
  ThreadsPerChild     25
means that Apache will be doing extra work to spin up and spin down threads in response to the load. It's best to keep everything static, e.g.

  MaxClients         1000
  MinSpareThreads    1000
  MaxSpareThreads    1000 
  ThreadsPerChild      25
That way there aren't additional clone() calls when under load (when you least need it), the maximum concurrency is the same. For a fairer fight still, the event mpm could be used.

Apache has nearly 20 year old configuration defaults - because it's best not to break things on users who rely on them. Properly configured, and sanely built, Apache can easily perform as well as nginx or lighttpd. These days 99% of web-server performance is in the kernel and the SSL/TLS libraries. The user-space code is almost completely irrelevant (and those configuration knobs I mentioned really just control how often certain system calls are called).

But it hardly matters; "apt-get install nginx" just works, and you really don't have to worry about it; you get a relatively small binary with some sane defaults. Apache is awesome, but I run nginx on my own EC2 micro instance. It's less hassle.




"Apache is awesome, but I run nginx on my own EC2 micro instance. It's less hassle."

...enough said!




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

Search: