Live data from Hacker News

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

thume.ca

81–90 of 500 posts

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

#81

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.

Are you at least using Ansible or Chef or something?

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

#82

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…

Projects are optimized to be developed by so-called ordinary developers.

We have python service which consumes gigabytes of RAM for quite simple task. I'm sure that I'd rewrite it with Rust to consume tens of megabytes of RAM at most. Probably even less.

But I don't have time for that, there are more important things to consider and gigabytes is not that bad. Especially when you have some hardware elasticity with cloud resources.

I think that if you can develop world-scale twitter which could run on a single computer, that's a great skill. But it's a rare skill. It's safer to develop world-scale twitter which will run on Kubernetes and will not require rare developer skills.

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

#83

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

So the goal is basically being able to do builds whilst running as few setup steps as possible.

Containers are a good common denominator because you essentially start with the OS, and then there's a file that automates installing further dependencies and building the artifact, which typically includes the important parts of the runtime environment.

  - They're stupidly popular, so it basically nullifies the setup steps.
  - Once setup, they by combinding both OS layers and App, they solve more of the problem and are therefore slightly more reliable.
  - They're self-documenting as long as you understand bash, docker, and don't do weird shit like build an undocumented intermediary layer.
Infrastructure as Code does the same thing for the underlying infra layers and kuberenetes is one of the nicer / quicker implementations of this, but requires you have kubernetes available.

Together they largely solve the "works on my PC" problem.

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

#84

Earlier quoted context omitted.

> The thing most appealing about single server configs is the simplicity. The more simple a system easy, likely the more reliable and easy to understand. What if your unique machine crash?

I think you should always plan for failures, but modern enterprise hardware is quite reliable. I would even posit that if you stood up a brand new physical server today, it has a good chance of beating AWS uptime (well, not the AWS dashboard numbers) over a one year period.

"hardware is quite reliable" is not a valid strategy. Hardware fails with some non-zero probability. You need to have a plan in place what to do if that happens, taking into account service disruption, backups etc.

Having a system in place that handles most of this gracefully (like kubernetes) is one way of having such a plan, there are others. Which one works best is dependent on your app, cost of downtime, your team that's tasked with bringing everything back up in the middle if the night, etc.

People who leave details like this out when they say "kubernetes is complicated" just haven't seen the complexities of operating a service well.

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

#85
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.

If it's this cheap to run you don't need analytics because you don't need to monetize it, and if it's this simple you don't need logs because it'll all work correctly the first time!

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

#86
post #43

Earlier quoted context omitted.

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.

Docker can be super simple. Like, if I want to run a Python service, that's just a few lines in a Dockerfile and a docker-compose.yml stub. Then I can trivially deploy that anywhere.

Simple to start. Yet it is more complex at run time, which can complicate (or simplify) debugging, depending on the problem.

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

#87

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…

If I remember correctly, Lichess runs on a single server.

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

#88

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 tend to agree on simplicity. Really just depends on whether you can tolerate downtime for either outages or deployments.

As soon as you start accounting for redundancy you have to fan out anyway.

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

#89
post #70

Earlier quoted context omitted.

It's also useful if you want your app to update without being down, which even a single team might want to do.

You don't need k8s for that, teams have been doing that for decades before k8s was ever a thing

Sure, but whatever they built themselves to accomplish this is also complicated. I know because I have built such systems (and replaced them by k8s).

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

#90
post #62

He 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…

I agree most HTTP server benchmarks are highly misleading in that way, and mention in my post how disappointed I am at the lack of good benchmarks. I also agree that typical HTTP servers would fall over at much lower new connection loads.

I'm talking about a hypothetical HTTPS server that used optimized kernel-bypass networking. Here's a kernel-bypass HTTP server benchmarked doing 50k new connections per core second while re-using nginx code: https://github.com/F-Stack/f-stack. But I don't know of anyone who's done something similar with HTTPS support.

Post reply on HN