Hacker News new | past | comments | ask | show | jobs | submit | more aprao's comments login

I love your blog and thorough retrospectives on all your projects - thanks a ton for the great content!


Frozen vegetables + protein (tofu) + sauce to stir fry (e.g tomatillo). I change the sauce up for variety.


This (no phones, no notifications) has singlehandedly been the most effective step I have taken for better concentration.


This made me recall Nick Lane's thoughts on anti-oxidants and how they interfere with stress signals sent by cell (which is not an obviously good thing): https://nautil.us/issue/36/aging/yes-life-in-the-fast-lane-k...


Can someone summarize what allowed nginx to surmount the C10K problem? Was it some clever trick or just good software design?


I was working on adding custom sharding for a reverse proxy in Nginx ten years ago. The code was absolute bare-bones. No comments, no tests. And still it worked really well. Scary and cool, were my thoughts at the time.

There are three things I think stood out (not tied to C10K):

1. The configuration format is light-weight. Compared to Apache, lighttpd and others at the time, you could build a static file server or a reverse proxy in just 3-4 lines of configuration. It lowered the bar of entry, and is probably what led to wide adoption.

2. The core of Nginx was (is?) an async data pipeline. The individual modules (proxy, file system) defined how the pipes tie together, but the actual pumping of data was done in a kernel. You never had to care about epoll(2) and the like; you just defined the DAG. And that was easy to do correctly even in bare-bones C. This was a good architecture.

3. Single-threaded IIRC, which might be the C10K answer you were looking for. Apache had the complicated configuration where you had to decided to use prefork, or threads, or...

Lastly, it was fast. Probably because of (2), and a prerequisite for (3).


If memory serves me, nginx succeeded by relying on epoll primitives for handling many connections rather than spinning up a thread per request by default like apache did at the time. That was the big difference back then. These days I imagine Apache has adopted/honed these same techniques.


Yep, epoll was a big part of it making it work around async io rather than threaded.

If someone is interested in reading more, "Flash: An Efficient and Portable Web Server" is a good read on the topic: https://www.usenix.org/legacy/events/usenix99/full_papers/pa.... It has no relation to Adobe Flash.

epoll has the advantage of operating in O(1) time rather than O(n) time as well which becomes important when you have a lot of file descriptors.

I'd also note that epoll landed with Linux 2.6 so it wasn't really available before 2004. Apache Server was created in 1995 long before epoll and Nginx was initially released in 2004. It's one of those situations where you introduce new capabilities like epoll being able to handle lots of FDs in O(1) time and someone finds a way to use that capability to make something great.


Although, similar facilities were already available in other systems such as Solaris, Windows NT, FreeBSD.


Igor was from Russian FreeBSD community so kqueue was probably the first.


Was epoll around and no one was using it for a web server yet? It seems like something that would have been put in the kernel explicitly at the behest of web servers.


IMO Ngnix takes advantage of the fact that most of the web workload is I/O bound. It’s tight loop main thread coupled with asynchronous delegation enables it to stay single threaded. It doesn’t spawn new thread per request which means it doesn’t need additional memory to handle new requests.

This is a very good article which goes into details, highly recommended

http://aosabook.org/en/nginx.html


I read this article, but I found no content discussing the title itself (that in Japan, digicams are the new film) - maybe I am missing something?


Same here. Probably clickbait.

Personally, I don't see anyone in Japan using digicams. Everyone's on iPhone.


I think the Marie Kondo fad is overblown and might be a result of 1) excessive need for direction/hand-holding in all aspects of life and 2) the west's weird obsession with anything Japanese. That being said, Marie Kondo herself does not espouse minimalism. Personally speaking, having fewer things has contributed to better mental health, although it obviously is not true for all people.


I can see the claims now - "Google is holding my account ransom for $XX/hr of customer support!"


This seems like this would win The Ig Noble Prize


True :-)


Why is it that race horses have such unusual names?


When an owner registers their horse to complete in major races, they need to satisfy a bunch of requirements. Some of which: the name can’t be the same as another horse, it can’t use a copyrighted term, there is a length limit, the name can’t be the same as a real person’s name, and it can’t be profane. Also, a lot of people choose names because they think those specific names will bring them luck or just because they are fun. Sometimes, people also try to include names in the horse’s name that are related to its lineage


So a little like private boat names?


Except I'm fairly sure there's nothing to stop you from giving your boat the same name as another. How many "Anna II"'s have we seen...?


I don’t know much about boat names, but I’d say so based on what I’ve seen lol


I think it's basically a limited namespace issue. Racehorse names are required to be relatively short, and must also be unique, so over time they get weirder.


Curiously, this namespace issue is solved in other sporthorses with microchips and horse passport numbers. I suppose it's the betting that causes them to have to make rules.

The convention in European sport horses is typically the registered name uses the first initial of the sire (so a horse named Donnerhall's decendents all have D names, and if you have the name and breed, it's like designer advertising for what line they're from) with the exception of the Lusitanos and Spanish PRE's, which use names where the first letter is assigned to the year of their birth.

So a Portuguese or Spanish horse named "A"ndro would have been born in 2004, and a horse named "E"duardo would have been in 2009, and it's a useful convention you can know a horses age from its name. Their studbooks are relatively narrow with fewer foundation stallions and breeders.


Thoroughbreds also have microchips in their necks now, but those solve a different problem. Microchips, and lip tattoos in previous years, ensure that the horse being examined is a particular horse registered at the Jockey Club. However, no one wants to root for or bet on a horse identified by a long random number. So, printable and pronounceable names are still used.


Maybe 18th century Potoooooooo would think "aprao" and "ycombinator" are unusual names.


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

Search: