3 ms·
> Simple observation would tend to suggest that the fast and reliable HTTP servers tend to have quite a bit of code. I'm unconvinced. It may be more likely th
by geocar 10y ago
> Simple observation would tend to suggest that the fast and reliable HTTP servers tend to have quite a bit of code.
I'm unconvinced.
It may be more likely that people do not need ($$$) fast HTTP servers badly enough to make them. I have done a number of special-purpose HTTP servers (ad server/rtb) in order to eke out some of that additional performance, but the 10µsec response time I can get with 60 lines of C code saturates 1gbps, so more servers is simply more economical at that point.
Meanwhile, databases are a much better study since there are established industries that demand faster and faster queries, and the fastest databases are around 1000x faster than Hadoop at a fraction of the size (K6 is under 600 lines of C code; KDB's SQL92 is around 30 lines of K code).
I believe a big part of why is that when you get that small it's easy to see your entire program, so you can remove redundancy and bloat that you wouldn't otherwise be able to be aware of. This reduction also reduces the binary size, paying dividends by getting the important bits into L1 (K6's binary is under 100kb which leaves plenty of room for all your scratch variables and your program).