Live data from Hacker News

Production Twitter on one machine? 100Gbps NICs and NVMe are fast

thume.ca

281–290 of 500 posts

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#281

Earlier quoted context omitted.

But many people including the OP think it is. It’s like me running a web crawler on my phone and saying I can replace Google.

If you were able to index the same amount of content you'd have a damn good alternative. And that's the level of this experiment.

It is trivial to index the same amount of content as Google as the web is mostly static.

The hard part is in being able to translate a search query into a list of pages.

And that requires a level of sophistication that far exceeds a laptop.

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#282
post #135

Earlier quoted context omitted.

Genuinely asking, why do you think Twitter needs 24 million vcpus to run? This is not apples to apples but Whatsapp is a product that entirely ran on 16 servers at the time of acquisition (1.5 billion users). It really begs the question why Twitter uses so much compute if there are companies that have operated significantly more efficiently. Twitter was unprofitable during acquisition and spent around half their reve…

Whatsapp used Erlang.

Can you expand on why this is worth pointing out in this context?

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#283

Earlier quoted context omitted.

> if it really was [which it isn't]

Maybe it should be, though? I sometimes wonder how much value ML provides vs a proper sort function for anything but advertising.

It's an easy thought experiment.

Do you think that the most successful web companies in the world with arguably the best people i.e. Amazon, Facebook, Instagram, TikTok, LinkedIn, Pinterest, Youtube, Netflix, Snapchat etc. have no idea what they are doing. That the highly complex, expensive and latency impacting recommendation systems could be replaced by trivial sorting.

Or maybe they do work, do translate to increased usage and do significantly impact revenue.

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#284

TFA, to me, touches about something I've wondered about a very long time ago: what are the implications of CPU and storage growing at much faster rates than human population? Back in the 486 days you wouldn't be keeping, in RAM, data about every single human on earth (let's take "every single human on earth" as the maximum number of humans we'll offer our services to with on our hypothetical server). Nowadays keeping…

Wait until you hear about DNA

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#285

Something I've found a lot modern IT architects seem to ignore is "write amplification" or the equivalent effect for reads. If you have a 1 KB piece of data that you need to send to a customer, ideally that should require less than 1 KB of actual NIC traffic thanks to HTTP compression. If processing that 1 KB takes more than 1 KB of total NIC traffic within and out of your data centre, the you have some level of ampl…

Your point makes sense if you have no idea how Twitter works. It needs to assemble tweets internally, sort them with an ML model, add in relevant ads and present a single response to the user because end-user latency matters. And each of these systems eg. ads has their own features, complexities, development lifecycle and scaling requirements. And of course deploying them continuously without downtime. That is how yo…

[deleted]

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#286
post #247

TFA, to me, touches about something I've wondered about a very long time ago: what are the implications of CPU and storage growing at much faster rates than human population? Back in the 486 days you wouldn't be keeping, in RAM, data about every single human on earth (let's take "every single human on earth" as the maximum number of humans we'll offer our services to with on our hypothetical server). Nowadays keeping…

's/(human|desktop)/smartphone/g'

Using two 32 bit numbers for coordinates, each record would take 8 bytes, which is 64 gigabytes for 8 billion population. Don’t think many smartphones have this RAM today.

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#287
post #270
post #261

Interesting optimization idea: If 95% of the users are bots, and your ML algorithms are smart enough to figure who's bot and who's bio, you could save a lot of traffic by not publishing tweets to bots as no one is going to read them anyway. Of course if that traffic included advertisements, you'd also lose 95% of your ad revenue. The ultimate extension of this "run it all on one machine" meme would be to run the bots…

> Of course if that traffic included advertisements, you'd also lose 95% of your ad revenue. Not so, serving an ad to a bot gains you no revenue, because ad networks charge for clicks, not impressions. If a significant percentage of your ad clicks are from bots, you're running a defective advertising platform and won't have customers for long regardless.

I agree with you overall.

Just a small nitpick: most ad networks optimize for price of impression, so at the end of the day they charge for impressions (just not always directly).

If your ad has low click rate and average price then it just won't be shown, because it's more profitable for an ad network to show ad with better click rate or with better price (i.e. with better price for impression) .

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#288

Earlier quoted context omitted.

Maybe it should be, though? I sometimes wonder how much value ML provides vs a proper sort function for anything but advertising.

It's an easy thought experiment. Do you think that the most successful web companies in the world with arguably the best people i.e. Amazon, Facebook, Instagram, TikTok, LinkedIn, Pinterest, Youtube, Netflix, Snapchat etc. have no idea what they are doing. That the highly complex, expensive and latency impacting recommendation systems could be replaced by trivial sorting. Or maybe they do work, do translate to increa…

Maybe they are considering that we shouldn't build and optimize our society solely for the purposes of maximizing revenue.

Would it be better to live in a world where Twitter (for example) existed because it is a useful thing and not because it might make lots of money?

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#289
post #135

Earlier quoted context omitted.

Whatsapp used Erlang.

Can you expand on why this is worth pointing out in this context?

WhatsApp used Erlang, a programming language designed for building concurrent, distributed systems, to help scale its messaging platform to support millions of users.

Erlang is particularly well-suited to building distributed systems because it was designed to handle failures at the process level rather than the hardware level. This means that if one part of a distributed system built with Erlang fails, the rest of the system can continue to operate without interruption.

This is critical for a messaging platform like WhatsApp, which needs to be able to handle millions of users sending messages simultaneously without experiencing any downtime. Additionally, Erlang's concurrency features allow it to support many thousands of simultaneous connections on a single machine, which is also important for a messaging platform that needs to be able to handle a large volume of traffic.

Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast

#290
Nice. While there may be some impracticalities to actually doing this for twitter, 99% of the software out there could run on a fraction of a single commodity server. People complain about the carbon burn of crypto, and they are right, but I bet it is dwarfed by the carbon burn of all the shitty over-provisioned and over-architected CRUD apps running interpreted languages. Unfortunately with universities teaching python of all things we'll have (or maybe already do have) a whole generation of developers that actually have no idea how powerful a modern computer is.

I suppose there's a chance AI will get to the point where we can feed it a ruby/python/js/whatever code base and it can emit the functionally equivalent machine code as a single binary (even a microservices mess).

Post reply on HN