News for hackers. Stuff that matters.
Re:Go is boring, and that’s fantastic by matthewaveryusa on Thursday July 02, 2020 @09:46AM (#23713004)
just out of curiosity -- for ad-tech real time bidding, what's your network latency and bandwidth like? I can buy that C/C++ is needed if you are colocated to an exchange, but if you're bidding online, those few fractions of an ms you save in C/C++ vs node.js you could have also saved by locating your server closer to whatever ad-tech exchange you're bidding on.
Re:Go is boring, and that’s fantastic by cmrdporcupine on Thursday July 02, 2020 @10:33AM (#23713544)
The issue I had back in this line of work was with garbage collection and was an issue in the 99th percentile.

When you have an expectation from the exchange that you respond in under 80ms, and 25-50ms of that is eaten up by transport, you don't have a lot of time to mess around.

So you spend the first chunk of time optimizing I/O and how you're accessing it.

Then you start looking at computation -- improving caching, etc.

At a certain point you start noticing in your graphs that you're on average doing quite well. But there's those hiccups every Nth request...

And now you're in the game of fighting with your language's garbage collection algorithm...

Re:Go is boring, and that’s fantastic by user5994461 on Thursday July 02, 2020 @02:48PM (#23716595)
One clean and dirty way to help with that.

Try to improve allocations where possible. There's often plenty of small allocations happening in Java that can be avoided (string usage is one major driver). Less allocations means less frequent garbage collections.

Then one hack is to disable the garbage collection. Let the software run up to consume all the 100 GB of memory of the server and crash and restart. There is no pause of garbage collection when there is no garbage collection.

If it's not enough, the last resort is to write native code or switch to C++.

Re:Go is boring, and that’s fantastic by politician on Thursday July 02, 2020 @02:20PM (#23716316)
At this level of scrutiny, replacing algorithms is appropriate and if the algorithms are built into the language then replacing the language may be one* way to clear the issue, but you have to do your homework to get there.

*sync.Pool, arena allocation strategies

Re:Go is boring, and that’s fantastic by synthc on Thursday July 02, 2020 @10:12AM (#23713278)
when I worked in adtech, we located the servers close to the exchange. This indeed made much more difference to the latency than code optimizations.
Re:Go is boring, and that’s fantastic by joelbluminator on Thursday July 02, 2020 @11:31AM (#23714384)
Do u guys mean adtech or real time trading?
Re:Go is boring, and that’s fantastic by cmrdporcupine on Thursday July 02, 2020 @12:24PM (#23714937)
Realtime bidding on ad exchanges