Live data from Hacker News

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

thume.ca

31–40 of 500 posts

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

#31
post #22

Why not a single FPGA with 100Gbps ethernet or pcie with NVM attached? Around $5K for the hardware and $5K for the traffic per month. The software would be a bit trickier to write, but you now get 100x performance for the same price

That would be quite a nice project for fun.

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

#32

Earlier quoted context omitted.

Kubernetes and containers are a means to service architecture; It enabled scalability but does not require it. You should still be containerizing your applications to ensure a consistent environment, even if you only throw it in a docker-compose file on your production server.

I don't even use containers - I aim primarily for simplicity and so far I have found I am able to build entire sophisticated systems without a single container. Containers I find make things much more complex.

That just means you don't know how to architect a machine with containers (and if you're effective in what you do, that's ok).

But it's a pretty objective notation that manually scaled single machines don't scale as well as automation.

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

#33

Good analysis. Obviously, this doesn't handle cases like redundancy and doesn't handle some of other critical workloads the company has. However, it does show how much real compute bloat these companies actually have - https://twitter.com/petrillic/status/1593686223717269504 where they use 24 million vcpus and spend 300 million a month on cloud.

On the other hand, Twitter does (or did) handle over 450 million monthly active users (based on stats websites), with a target for 315 monetizable daily active users (based on their earnings calls pre-privatization). Handling that amount of concurrency and beaming millions of tweets a day to home feeds and notifications is going to be logistically hard.

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

#34
post #12

I like this kind of exercise. One thing I am not seeing is analytics, logs and so forth that as I understand it are significant portions of Twitter's production cost story.

Anyone have a complete list of functional blocks that form Twitter? Beyond the obvious and what we see?

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

#35

Most projects I encounter these days instantly reach for kubernetes, containers and microservices or cloud functions. I find it much more appealing to just make the whole thing run on one fast machine. When you suggest this tend to people say "but scaling!", without understanding how much capacity there is in vertical. The thing most appealing about single server configs is the simplicity. The more simple a system ea…

> I find it much more appealing to just make the whole thing run on one fast machine.

Indeed.

Lots of examples out there, one being Let's Encrypt[1] who run off one MySQL server (with a few read replicas but only one write).

[1] https://letsencrypt.org/2021/01/21/next-gen-database-servers...

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

#36

Most projects I encounter these days instantly reach for kubernetes, containers and microservices or cloud functions. I find it much more appealing to just make the whole thing run on one fast machine. When you suggest this tend to people say "but scaling!", without understanding how much capacity there is in vertical. The thing most appealing about single server configs is the simplicity. The more simple a system ea…

>… without understanding how much capacity there is in horizontal.

I think you mean vertical, right?

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

#37

Most projects I encounter these days instantly reach for kubernetes, containers and microservices or cloud functions. I find it much more appealing to just make the whole thing run on one fast machine. When you suggest this tend to people say "but scaling!", without understanding how much capacity there is in vertical. The thing most appealing about single server configs is the simplicity. The more simple a system ea…

Kubernetes is useful if you have many teams working on things in parallel and you want them to deploy in similar ways to not have to reinvent the same wheel in 5 different ways by 5 different teams. If you don't have multiple teams, you don't need it.

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

#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?

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

#39

Most projects I encounter these days instantly reach for kubernetes, containers and microservices or cloud functions. I find it much more appealing to just make the whole thing run on one fast machine. When you suggest this tend to people say "but scaling!", without understanding how much capacity there is in vertical. The thing most appealing about single server configs is the simplicity. The more simple a system ea…

>… without understanding how much capacity there is in horizontal. I think you mean vertical, right?

Ha ha yes I do! (corrected)

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

#40
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 other in place of the text of the quoted tweet itself but regardless a tweet takes up more than 280 unicode characters.

Also, nowhere in the article are hashtags mentioned. For a system like this to work you need some indexing of hashtags so you aren't doing a full scan of the entire tweet text of every tweet anytime someone decides to search for #YOLO. The system as proposed is missing a highly critical feature of the platform it purports to emulate. I have no insider knowledge but I suspect that index is maybe the second largest thing on disk on the entire platform, apart from the tweets themselves.

Post reply on HN