top | item 29663264

(no title)

onlydnaq | 4 years ago

Without having looked into it too deeply I feel that they are somewhat “cheating” by using a superserver to launch a new process for each connection, thus letting the OS handle the dynamic allocation needed for each connection.

Still pretty impressive project. Would be fun to take a deeper look at it at some point.

discuss

order

throw0101a|4 years ago

> […] thus letting the OS handle the dynamic allocation needed for each connection.

This is what PHK did when designing Varnish (IIRC): instead of dealing with lots of files on its own (like Squid), just create some files and do a malloc() on them and let the OS do the work:

* https://varnish-cache.org/docs/trunk/phk/notes.html

One discussion (many others):

* https://news.ycombinator.com/item?id=4874304

hkt|4 years ago

It makes sense though - no memory management simplifies the codebase. Letting the host deal with it instead means you get the niceties of process level isolation and less complexity. More eyes are on the OS level code than would be on this project. It seems very clever to me.

zamadatix|4 years ago

The OS is already handling dynamic memory allocation on each connection. This provides a nice split where you don't need to do it in 2 places.