4 ms·
Before nginx there was lighttpd that was pretty much what Nginx would be later on.
by Thaxll 3y ago
Before nginx there was lighttpd that was pretty much what Nginx would be later on.
- ceeam 3y agoI still use Lighttpd. My weird idea why Lighty lost the war is that it had somewhat unorthodox rewrite rules, namely this one line in mod_rewrite.c: if (st && S_ISREG(st->st_mode)) return HANDLER_GO_ON; Change it to if (st) without a regular file check, and it works as expected (great) with frameworks like Joomla etc (/administrator URLs, for example)
- toast0 3y agoI used lighttpd for my previous job because the boss liked. The config language was definitely weird. I had to do a lot of fixups when someone made a well meaning change that didn't work properly because of how conditionals work. Usually informed by experience from when the someone was me.
- Blackthorn 3y agoI personally ditched lighttpd on my own website (PHP, large traffic, but only a single server) because it had some memory leak that would, over time, result in increasing memory usage and eventually cause the server to chug. It had not seen any bugfix releases for quite a long time at that point, and nginx was available by then, so I made the swap. I continued to serve that website off of a single server for the rest of its lifetime.
- blacklion 3y agoNope. lighttpd is simple and light. nginx is very powerful and fast. nginx could send static file with one syscall and zero-copy if OS supports it. It could exploit all system async mechanisms - POSIX AIO, kqueue, whatever you have. Linux was worst in this regards before io_uring, and FreeBSD or Solaris were much, much better platform for nginx. For example, Igor Sysoev (mastermide behind nginx) pushed patches to FreeBSD kernel to shave off one syscall per file on this system. Now, when everything is HTTPS, Linux have io_uring and Igor left nginx after F5 acquisition, it is not very useful - nginx is stagnating, support for KTLS is absent, support for io_uring on Linux is absent (though there are some forks and patches for this)... But compare nginx and lighttpd is simply stupid, it is apples-to-oranges comparison. Each one has its niche, of course.
- Thaxll 3y agolighttpd came out in the mid 2000's with a better polling model than Apache, that was my point. It was using epoll back then which Apache did not. Even Youtube used Lighttpd at some point. Both are http servers, and lighttpd came out before Nginx, they both tried to solve the c10k problem.