Live data from Hacker News

Do svidaniya, Igor, and thank you for Nginx

nginx.com

231–240 of 366 posts

Re: Do svidaniya, Igor, and thank you for Nginx

#231
post #9

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.

Oh gosh, I had to try and figure out an Apache config file some time last year - it was a real slog trying to figure out what was happening thanks in no small part to the poor documentation of their pseudo-XML.

Re: Do svidaniya, Igor, and thank you for Nginx

#232

In 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.

Too many shared hosts with LAMP not updating their stack in ages, I suppose.

Re: Do svidaniya, Igor, and thank you for Nginx

#233

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.

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.

Somehow I still see .htaccess files in projects that aren't that old (and in a few cases never used Apache).

Re: Do svidaniya, Igor, and thank you for Nginx

#234

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.

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.

Yeah I remember starting a project with Apache in 2017 I think, and when I was discussing the (very quick) move to nginx it appeared that Apache's default settings are great for a personal home page and not much else, while nginx's default settings seem to handle a moderately busy e-commerce site (or more) with no trouble at all.

Re: Do svidaniya, Igor, and thank you for Nginx

#235
Yes, this is the kind of a story which are being dramatised in movies - a highly functioning autism, habit of attention to details and principial insistence on doing thing "just right" and enough free time and lack of distractions (by degens) to carry it on.

I 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

#236
post #114

Earlier 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?

Yep, you can generally get request splitting style vulnerabilities especially as a reverse proxy if you misparse reqs. (And sometimes even if you don't, one reason a rev proxy architecture is somewhat insecure).

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

#237
I remember watching a video from some conference where Igor participated. As soon as he says "Hello, I'm Igor Sysoev, creator of nginx" the audience bursts with extra-long applause. He even had to tell them "Come on guys, you haven't heard my presentation yet"

Re: Do svidaniya, Igor, and thank you for Nginx

#238

I'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.

I'm just a fool on the internet, but if your appserver is NodeJS, you might want to consider HAProxy over nginx (I say this as a fan of nginx).

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

#239

Earlier 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…

Yeah thanks to this thread I am definitely now remembering running into issues with memory usage and crashes with lighttpd.

Re: Do svidaniya, Igor, and thank you for Nginx

#240
> Do svidaniya

I 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 до свидания

Post reply on HN