Live data from Hacker News

5M Bid request/s, 2ms max response time – The Road to Damascus

github.com

41–50 of 71 posts

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#41

The Best Minds of My Generation Are Thinking About How To Make People Click Ads (or serve them efficently)

I kind of like that some of the money from this industry is resulting in learnings and improvements to open source.

Found this article great, not many places to see 5m req/s, let alone on a single node.

I'm really interested in hearing more about those databases!

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#42
post #5

It’s kind of sad that all this engineering effort was spent to essentially make the internet a worse place for everyone and waste users’ time and attention. Imagine if a crime syndicate would brag about their efforts to make their worldwide criminal activities more efficient.

Do you legitimately think the world would be a better place if gmail, youtube, flickr, reddit, EVERY search engine, and basically every web content site disappeared? Because that's what happens if you don't have web advertising. Free things disappear without revenue. Or maybe you'd prefer to go back to the days of randomly-targeted or "PUNCH THE MONKEY" ads. Because THAT'S what happens without ad auctions and targeti…

No idea what the GP wants, but I want to go forward to a world where Westinghouse runs tasteful washing machine ads with no javascript on articles about buying a new home, instead of being able to microtarget me based on my income range and my regular visits to the laundromat to run washing machine ads next to articles about Syria.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#43

Earlier quoted context omitted.

Do you legitimately think the world would be a better place if gmail, youtube, flickr, reddit, EVERY search engine, and basically every web content site disappeared? Because that's what happens if you don't have web advertising. Free things disappear without revenue. Or maybe you'd prefer to go back to the days of randomly-targeted or "PUNCH THE MONKEY" ads. Because THAT'S what happens without ad auctions and targeti…

Ultimately I ended up being convinced by Sam Harris' argument: that advertising convoluted our relationship with reality and we started expecting everything for free. I run some services that are paid for by advertising and I see this myself: the second I start trying to charge money, I'm now the one service that people see as costing them money when all my competitors are "free." And the associated entitlement is to…

I decry this a lot. Ad blocker use is rampant. People don't want to pay for subscriptions. Etc.

It actually boils down to an expectation of slave labor for a lot of things, which people don't want to hear.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#44
post #3
post #2

Is this complete note? You didn't mention what you end up using. Is it golang or pony or F$? CoreFX mention in the end confused me more.

> "I didn't want to rewrite everything from scratch, and definitely, I didn't want to handle all edge cases for epoll. My choice was to use libuv. The architecture I opt for: use 16 cores out of 40 for networking, having 16 'uv_loop' each running on its own thread. Callbacks will be passed from F# to each 'uv_loop' instance. The event loop will call them after parsing the bid request in C11." Looks like libuv directl…

> The solution was to Marshal calls from F# to libuv and achieve 5 Millions (at least) bid requests/s on 16 threads (this solution scales with cores/NICs).

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#45
post #29
post #5

It’s kind of sad that all this engineering effort was spent to essentially make the internet a worse place for everyone and waste users’ time and attention. Imagine if a crime syndicate would brag about their efforts to make their worldwide criminal activities more efficient.

Ads aren’t crime and ads aren’t universally net negative.

Depends. Google's real-time bidding is being investigated under GDPR.

https://www.cnbc.com/2019/05/22/irish-data-privacy-watchdog-...

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#46

Glad to see this kind of stuff written with a strongly typed language instead of Python.

Why, they wasted months evaluating with an obsession for statically typed languages that have so far not produced anything more quickly or markedly better than that which others are producing with less pedantic languages.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#47
post #40

Earlier quoted context omitted.

I can totally see where you're coming from. But major engineering achievements require efforts of many skilled people, who often like to be paid really well for their work. And the way the world works today is that a lot of big money is in the fields that are of questionable value to the society: advertising, finance, military, etc. And even in the fields that seem at first glance to be socially valuable, like health…

This is why federal research and development agencies should pay higher salaries to attract said engineers. Breakthroughs achieved would be funded by taxpayers and customers of these agencies and the patents for technology produced would be more likely enter the public domain.

Yeah I'd gladly switch to government work hours, retirement benefits, etc if they paid anywhere near what I make in finance.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#48
post #32

Earlier quoted context omitted.

Everything you describe could exist as a paid service, and I suspect would be much higher quality that way.

A paid youtube? Not sure they would be worth it without the endless amounts of free content by free users. Facebook? There are plenty of sites like facebook without users. Charge for an account.. reduce the userbase, the platform loses value without the free users.

> A paid youtube? Not sure they would be worth it without the endless amounts of free content by free users.

Even if it were possible to convert these to paid services now, there's no way they could have started out paid with no existing content/user base.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#49
post #4
post #2

Is this complete note? You didn't mention what you end up using. Is it golang or pony or F$? CoreFX mention in the end confused me more.

I work with Wael. Development is still ongoing. One implementation uses Golang, the other uses F# with a library that wraps libuv for faster network performance. Pony was used to write the stress-testing client for both implementations.

Was pony considered for the implementation itself? Other than the immature ecosystem it seems like a perfect fit here. Awesome write up and sounds like a fun job.

Re: 5M Bid request/s, 2ms max response time – The Road to Damascus

#50
I spent a few cycles in media buying and later in sell-side ad tech. Please do say what you will about advertising and its effects on the web, but I will say this: it is a world of fascinating tech. As a buyer I experienced janky pacing all of the time across various platforms, because this is a HARD problem. We had to manually adjust campaigns on a daily basis to ensure pacing worked properly. It was common to stop a campaign and overspend by hundreds of dollars while all of the caching spun down.

I'm fascinated to see they are running that all on a single node. Its a massive amount of state aggregated from billions of events that needs to be served at extremely low latency, but couldn't it be partitioned somehow??? Google Fi/Spanner and BigTable have certainly been developed to support these issues. I've been trying to dig up what infrastructure powers Google AdX, but I haven't found anything. AdWords seems to be tied to Spanner, but AdX is/was an entirely different beast. In any case I'm quite certain that it isn't running pacing on a single, gigantic node.

Post reply on HN