I am both embarrassed and disappointed with the negativity this post has attracted. A litanny of "gotchas", where someone attempts to best the OP. What about x, y and z? It can't possibly scale. Twitter is so much more than this, etc. The OP isn't making the assertion that Twitter should replace their current system with a single large machine. The whole thread paints a picture of HN like it is full of a bunch of hal…
If he would have called it anything else but Twitter and stated it is theoretical or a hobby project or something for fun, I would be fine with it, but don't mention Twitter anywhere near because it has nothing to do with Twitter.
Production Twitter on one machine? 100Gbps NICs and NVMe are fast
251–260 of 500 posts
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#252Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#253He will be up for surprise. HTTP with connection: keep-open can serve 100k req/sec. But that's for one client being served repeatedly over 1 connection. And this is the inflated number that's published in webserver benchmark tests. For more practical down to earth test, you need to measure performance w/o keep-alive. Request per second will drop to 12k / sec then. And that's for HTTP without encryption or ssl handsha…
> Use HTTPS and watch it fall down to only 400 req / sec under load test [ without connection: keep-alive ]. I'm running about 2000 requests/s in one of my real-world production systems. All of the requests are without keep-alive and use TLS. They use about one core for TLS and HTTP processing.
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#254He will be up for surprise. HTTP with connection: keep-open can serve 100k req/sec. But that's for one client being served repeatedly over 1 connection. And this is the inflated number that's published in webserver benchmark tests. For more practical down to earth test, you need to measure performance w/o keep-alive. Request per second will drop to 12k / sec then. And that's for HTTP without encryption or ssl handsha…
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#255I'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…
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#256Earlier quoted context omitted.
> if it really was [which it isn't]
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.
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#257Earlier quoted context omitted.
Quote tweets I'd do as a reference and they'd basically have the cost of loading 2 tweets instead of one, so increasing the delivery rate by the fraction of tweets that are quote tweets. Hashtags are a search feature and basically need the same posting lists as for search, but if you only support hashtags the posting lists are smaller. I already have an estimate saying probably search wouldn't fit. But I think hashta…
I don’t think that hashtags are a search only feature. In the posts themselves, the hashtags are clickable to view other tweets. I don’t think that qualifies as a search.
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#258I'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…
I'd probably go as far to say that the indexes _generally_ at twitter could be larger than the tweets
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#259Earlier quoted context omitted.
> 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.
> if it really was [which it isn't]
I sometimes wonder how much value ML provides vs a proper sort function for anything but advertising.
Re: Production Twitter on one machine? 100Gbps NICs and NVMe are fast
#260TFA, 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…
It was a little more than ten years ago for me. I realized that a hard disk could store a database of every human alive, including basic information, links (family relations) and maybe a photo.
I still don't know what the implications are.
Maybe we don't want to know, but it's not really that difficult to think about.