Live data from Hacker News

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

thume.ca

201–210 of 500 posts

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

#201
post #111
post #63

In the coming years we will probably see a lot of complicated microservice architectures be replaced by well-designed and optimized Rust (and modern C++) monoliths that use simple replication to scale horizontally.

Replication and simple never belong in the same sentence. DNS which is one of the simplest replication systems I know of has its own complex failure modes.

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

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

#202
post #136

Earlier quoted context omitted.

I wouldn't really agree with this since those machines don't share address spaces or directly attached busses. Better to say it's a warehouse-scale "service" provided by many machines which are aggregated in various ways.

I wonder though.. could you emulate a 20k-core VM with 100 terabytes of RAM on a DC? Ethernet is fast, you might be able to get in range of DRAM access with an RDMA setup. cache coherency would require some kind of crazy locking, but maybe you could do it with FPGAs attached to the RDMA controllers that implement something like Raft? it'd be kind of pointless and crash the second any machine in the cluster dies, but…

I have fantasized about doing this as a startup, basically doing cache coherency protocols at the page table level with RDMA. There's some academic systems that do something like it but without the hypervisor part.

My joke fantasy startup is a cloud provider called one.computer where you just have a slider for the number of cores on your single instance, and it gives you a standard linux system that appears to have 10k cores. Most multithreaded software would absolutely trash the cache-coherency protocols and have poor performance, but it might be useful to easily turn embarrassingly parallel threaded map-reduces into multi-machine ones.

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

#203
All web and cloud technologies are inherently inefficient, and most programmers don't know networking or even how hardware works sufficiently well to optimize for high througput and low-latency.

There was an article just yesterday about how Jane Street had developed an internal exchange way faster than any actual exchange by building it from the ground up, thinking about how the hardware works and how agents can interact with it.

Modern software like Slack or Twitter are just reinventing what IRC or BBS did in the past, and those were much leaner, more reliable and snappier than their modern counterparts, even if they didn't run at the same scale.

It wouldn't be surprising at all that you could build something equivalent to Twitter on just one beefy machine, maybe two for redundancy.

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

#204
post #38

> colo cost + total server cost/(3 year) => $18,471/year Meanwhile the company I just left was spending more than this for dozens of kubernetes clusters on AWS before signing a single customer. Sometimes I wonder what I'm still doing in this industry.

Was it more than the salary of even a single software engineer?

Ah, the classic excuse for writing shitty software systems.

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

#205

Earlier quoted context omitted.

My friend mentioned this just before I published and I think that probably is the fastest largest thing you can get which would in some sense count as one machine. I haven't looked into it, but I wouldn't be surprised if they could get around the trickiest constraint, which is how many hard drives you can plug in to a non-mainframe machine for historical image storage. Definitely more expensive than just networking a…

> which is how many hard drives you can plug in to a non-mainframe machine for historical image storage. You would be surprised . First off, SSDs are denser than hard drives now if you're willing to spend $$$. Second, "plug in" doesn't necessarily mean "in the chassis". You can expand storage with external disk arrays in all sorts of ways. Everything from external PCI-e cages to SAS disk arrays, fibre channel, NVMe-o…

That's really cool! Each year of historical images I estimate at 2.8PB, so it would need to scale quite far to handle multiple years. How would you actually connect all those external drive chassis, is there some kind of chainable SAS or PCIe that can scale arbitrarily far? I consider NVMe-over-fabrics to be cheating and just using multiple machines and calling it one machine, but "one machine" is kinda an arbitrary stunt metric.

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

#206
post #201
post #111

Earlier quoted context omitted.

Replication and simple never belong in the same sentence. DNS which is one of the simplest replication systems I know of has its own complex failure modes.

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

All complexity must be paid for and typically the more complex the problem the higher the cost to manage.

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

#207
This is in no way a criticism of the analysis. But what I think is a hidden cost of an idea like this (that hasn't been pointed out) is the ability to extend the features. With a tightly integrated system like that you may want to add a frobnicator as a test - now that whole system would need to change to accommodate that, because all the timeline processing happens more or less in memory. Making things external / network based adds overhead, but makes plugging in / removing an extra feature much easier. If you count the cost of work required for making changes, then burning money on the "unnecessary" horizontal scaling may not be a bad idea. Wanna add new ads analytics? Just plug into this common firehouse/summary endpoint without worrying about the internals. Wanna test a new implementation of some component? Run both in parallel, plugging into same inputs. Etc.

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

#208

Earlier quoted context omitted.

If an inspector reviews your house and finds no issues, that is indeed evidence of absence.

But evidence is not necessarily proof.

Sure, but if someone accuses your house of having issues, and you retort that you've had it inspected by professionals, a reply of "Hah! That's evidence, not proof!" is just a bit smarmy.

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

#209

This post reminds me of an experience I had in ~2005 while @ Hostway Chicago. Unsolicited story time: Prior to my joining the company Hostway had transitioned from handling all email in a dispersed fashion across shared hosting Linux boxes with sendmail et al, to a centralized "cluster" having disparate horizontally-scaled slices of edge-SMTP servers, delivery servers, POP3 servers, IMAP servers, and spam scanners. T…

Thank you for writing this.

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

#210

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…

I must admit, as a bystander I'm torn here. I love that Tristan put out this post and made it so detailed with plenty of assumptions to cover. I also like to hear about possible issues and assumptions which the crowd calls out. Even naysayers can be helpful. I want both, but I don't want to crowd to go to far and kill the desire to produce this kind of content.

> I want both, but I don't want to crowd to go to far and kill the desire to produce this kind of content.

I think it's easy to have both. It's all about the tone of the responses.

For example, instead of "your assumptions are wrong, this would collapse because X" or "this is dumb because real Twitter does Y which yours doesn't handle," I think responses could be framed as:

"Wow, neat thought experiment! If I were to approach this same problem, I might make an allowance of more than 280 bytes of storage per tweet to allow for additional metadata that is probably needed to make everything work together; I wonder if that can be accommodated with an even beefier big computer?"

Or "What a great writeup of building a simplified Twitter! After the features you've accounted for, the next most important feature of Twitter for me personally is Y. What kinds of things would we have to do to stretch your idea to handle that? [or, I bet with the addition of X we could make that happen in this setup too!]"

I think many criticisms could be turned into constructive positive additions to the original article versus attacks against the idea of the article.

Post reply on HN