It still surprises me that NGINX beat out Apache so quickly even though Apache had way more modules and was/is entirely free vs. NGINX which is more or less "open core" with some nice features requiring commercial licensing.
On the other hand, the unreadable weird-ass pseudo-XML configuration files of Apache made anyone touching them wish for something better. I also expect ngx_lua did a lot for adoption, the fact that you could always "shell out" to lua if you needed was a huge boon even just for peace of mind.
Do svidaniya, Igor, and thank you for Nginx
231–240 of 366 posts
Re: Do svidaniya, Igor, and thank you for Nginx
#232In January 2021, Nginx took over Apache as the #1 web server on the Internet that users can install: https://i.imgur.com/pjU1G61.png https://trends.shodan.io/search?query=http+port%3A443#facet/... I'm a bit surprised it didn't happen earlier as it feels like it's been the dominant choice for tech people.
Re: Do svidaniya, Igor, and thank you for Nginx
#233It still surprises me that NGINX beat out Apache so quickly even though Apache had way more modules and was/is entirely free vs. NGINX which is more or less "open core" with some nice features requiring commercial licensing.
The web changed. We moved away from static HTML pages and CGI scripts to monolithic application servers in java, ruby, python, etc. Apache excelled with these static content sites and simple auth scenarios (remember .htaccess files?) but became painfully complex proxying application servers. Nginx was doing exactly what was needed at exactly the time it was needed.
Re: Do svidaniya, Igor, and thank you for Nginx
#234It still surprises me that NGINX beat out Apache so quickly even though Apache had way more modules and was/is entirely free vs. NGINX which is more or less "open core" with some nice features requiring commercial licensing.
For me, the simplicity of Nginx is what beats it out over Apache. I've always felt like Nginx "just works" by default and creating configurations is relatively easy.
Re: Do svidaniya, Igor, and thank you for Nginx
#235I remember when I saw the nginx code for the first time - I was so impressed that I wanted to build libnginx.a (of core data structures) for my own projects. Never happened.
The only comparable story I know is Rob Pike - similar principles and obsessions of doing just right, which, in turn, is related to good mathematics of finding and using just right abstractions by generalising from actual pattern.
If you want to learn C programming (and programming in general) read nginx and unit(nxt). Look how systematic, minimal and just right is everything.
I like to than Igor for teaching me and being an example.
Re: Do svidaniya, Igor, and thank you for Nginx
#236Earlier quoted context omitted.
Most requests in reality are GET. So if you first check for G, if (m[0] == 'G') { r->method = NGX_HTTP_GET; break; } else if (m[0] == 'P') { switch(m[1]) { ... } } else if ... this should be fast enough.
How would this work if the method field was something like "Gibberish"? Would this have any security vulnerabilities?
Hopefully the actual code does a full parse after guessing what to try by the character test heuristic.
Re: Do svidaniya, Igor, and thank you for Nginx
#237Re: Do svidaniya, Igor, and thank you for Nginx
#238I'm an experienced dev with a deep knowledge of full stack web as well as infrastructure but I've never put nginx in front of any app. I want to but I honestly avoided it because I thought it was difficult. This may not be the right place to ask but is there a good guide for someone who's deep into nodejs who just wants to set up nginx on Debian in front of a node server with https? and just see how it goes.
The reason being that (unless my information is stale), NodeJS will happily accept all the connections thrown at it, eventually causing each connection to be starved of compute capacity and finally falling over. HAProxy is able to keep a connection queue and feed a maximum of (for example) 4 concurrent requests to the backend(s), thus providing back-pressure to incoming requests. Makes it a lot easier if you need to eventually scale your app horizontally, too.
Re: Do svidaniya, Igor, and thank you for Nginx
#239Earlier quoted context omitted.
I mean there was lighttpd before nginx and they have/had pretty similar structures, weights, etc. I feel like I knew at one point why it got so thoroughly supplanted by nginx but I don't remember now why that happened.
The difference is that nginx really works. I had Panoramio, a photo website featured in Google Earth / Maps, using Apache. It started to fail down under load, and I quickly switched to lighttpd. It was faster but crashing, getting OOM, etc. I fixed a memory leak and a few more bugs, but it still crashed every now and then and I looked for alternatives. This was 2006 and nginx was the only realistic alternative on the…
Re: Do svidaniya, Igor, and thank you for Nginx
#240I wonder if using English letters to write Russian phrases is acceptable practice for native Russians.
Does it sound respectful, neutral or like a mockery?
I don't mean in context of that post, which obviously is respectful, but in general. Especially when unicode is a thing and you could just write до свидания