Live data from Hacker News

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

thume.ca

301–310 of 500 posts

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

#301

I feel like people writing posts like this never worked in a big team at a big company on a big project. It is so obviously impossible to do this and Twitter has so many more features users will never even see, but sure, re-implement it in a couple hundred lines of Rust and Twitter will be saved...

Every intern proposes something cute like this in my org, every year.

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

#302

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…

Thanks to Snowden's leaks we know one of those is surveillance.

From scanning every message of every person, it's going to expand to recognizing every face from every camera, and transcribing and analyzing every spoken word recorded.

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

#303

Earlier quoted context omitted.

> However, it does show how much real compute bloat these companies actually have No, it doesn’t. It’s a fun exercise in approaching Twitter as an academic exercise. It ignores all of the real-world functionality that makes it a business rather than a toy. A lot of complicated businesses are easy to prototype out if you discard all requirements other than the core feature. In the real world, more engineering work oft…

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…

> 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).

WhatsApp is mostly a bent pipe connecting user devices & relying on device storage. If WhatsApp had to implement Twitter functionality and business model (with same Engineers and stack), they'd need a lot more servers too. I'd hazard the number of servers would be in the same order of magnitude

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

#304
post #237

Earlier quoted context omitted.

Biggest problem with this is the lack of considering analytics.twitter.com and ads.twitter.com. Twitter stores event data about everything that happens to a tweet, and lets you target ads with a lot of precision. While some of those writes may well be acceptable to lose, letting you write to caches, effectively you need to assume there are more analytics events triggering writes to something than there are tweet view…

A Twitter-like service that fits on a single server could probably get by with the reduced revenue that comes with not offering obsessively fine-grained analytics and ad targeting.

I think about this often. Specifically, how much bloat exists in the world because individuals in our society are forced to justify their existence on a daily basis.

Everyone has to be employed so it's better to keep adding more crap to products and make those products disposable in order to give people a job.

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

#305
post #275
post #201

Earlier quoted context omitted.

It can be outsourced complexity as in just using horizontally scalable database like Spanner, CockroachDB etc.

CockroachDB is nice to use but every database has complexity you have to deal with. Here's one I ran into recently: if a range has only 1 of 3 replicas online then it will stop accepting traffic for that range until it has 3 replicas again. (for the folks at home, "range" is a technical term for 512 bit slice of the data - CRDB replicates at the range level) So, in some code I wrote, I had account for not only 1) the…

You could have more replicas,if availability is critical?..

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

#306

Earlier quoted context omitted.

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.

It is not trivial at all. That is a huge amount of scraping.

Any machine that can do that will be a similar spec to what you need for serving queries. Not as fast as google does it, but a good amount of them.

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

#307
post #23

John Carmack tweeted something that made me noodle on this too: >It is amusing to consider how much of the world you could serve something like Twitter to from a single beefy server if it really was just shuffling tweet sized buffers to network offload cards. Smart clients instead of web pages could make a very large difference. [1] Very interesting to see the idea worked out in more detail. [1] https://twitter.com/i…

> just shuffling tweet sized buffers to network offload cards Except that's not what it is doing at all. It assembles all the Tweets internally, applies an ML model to produce a finalised response to the user.

which arrives at a browser running Tweak New Twitter as a browser extension, and that strips the response to just what the user actually wants to see. Effficiency!

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

#308
post #237

Earlier quoted context omitted.

Biggest problem with this is the lack of considering analytics.twitter.com and ads.twitter.com. Twitter stores event data about everything that happens to a tweet, and lets you target ads with a lot of precision. While some of those writes may well be acceptable to lose, letting you write to caches, effectively you need to assume there are more analytics events triggering writes to something than there are tweet view…

A Twitter-like service that fits on a single server could probably get by with the reduced revenue that comes with not offering obsessively fine-grained analytics and ad targeting.

This is true from the POV of capitalism but not institutions. This would be a hyper profitable but politically unsustainable business.

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

#309
post #237

I'm going to preface this criticism by saying that I think exercises like this are fun in an architectural/prototyping code-golf kinda way. However, I think the author critically under-guesses the sizes of things (even just for storage) by a reasonably substantial amount. e.g.: Quote tweets do not go against the size limit of the tweet field at Twitter. Likely they are embedding a tweet reference in some manner or ot…

Biggest problem with this is the lack of considering analytics.twitter.com and ads.twitter.com. Twitter stores event data about everything that happens to a tweet, and lets you target ads with a lot of precision. While some of those writes may well be acceptable to lose, letting you write to caches, effectively you need to assume there are more analytics events triggering writes to something than there are tweet view…

Analytics data can easily be 90% of your data.

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

#310
I ask candidates I interview to design a certain service. Most ask about scale, to which I like to direct the question back at them: it's going to be huge. As big as Twitter. How big would that be, do you think?

Most then suggest scale that would make the service run comfortable from a not-too powerful machine, and then go to design data-center spanning distributed service.

Post reply on HN