Re:The Architecture of Open Source Applications: Nginx
by lpgauth on Monday November 23, 2015 @09:16PM
(#10618763)
168K/s? Did you actually decode the bid request (json) or just return no bid? That seems too good to be true.
Re:The Architecture of Open Source Applications: Nginx
by fit2rule on Tuesday November 24, 2015 @03:10AM
(#10619685)
I also would love to know details about this .. very impressive stats!
Re:The Architecture of Open Source Applications: Nginx
by royjacobs on Tuesday November 24, 2015 @04:09AM
(#10619838)
These bidding platforms typically don't provide you with JSON but with some headers or query parameters that are very quick to parse (especially for the native nginx code), so your Lua code can basically boil down to a few table lookups.
Re:The Architecture of Open Source Applications: Nginx
by lpgauth on Tuesday November 24, 2015 @10:05AM
(#10621077)
Uh, look up OpenRTB. Except for Doubleclick Adx almost all exchanges encode bid requests in JSON.
Re:The Architecture of Open Source Applications: Nginx
by ww520 on Tuesday November 24, 2015 @03:27AM
(#10619725)
May be I got it the wrong. Are the time spent on the bid processing portion (CPU bounded) or the network messaging and connection handling portion (IO bounded)? When talking about eventlib and nginx, I assume the network messaging and connection handling are relevant. In that case 168K requests/sec doesn't sound too great.
This benchmark shows Ngix+Lua (openresty) is more than 5 times slower than the leading ones, which can do more than 6M requests/sec.
https://www.techempower.com/benchmarks/#section=data-r11&hw=...
I built a nginx+luajit RTB bidder that did 168k qps on 8 cores. It smashed the C eventlib version and of course it crushed the Java version. Golang came in a close second but at the time with 8 cores I had to do crazy things to get it to pin to CPU's since the golang thread scheduling didn't seem very scaleable beyond 4 cores.