I'm 15 years in writing high performance Internet servers in C++, and I can confirm higher level languages provide an illusion of capability, but once you're talking high performance with high compute requirements and scaling your service, the cost efficiency of C++ is exponential better than any other language. The higher level language ecosystems are bloated beyond repair. I was able to use one 32-core physical ser…
This sounds like an amazing war story that I just want to hear more of. Is there any more? What's your c++ stack like?
A lot of complex “scalable” systems can be done with a simple, single C++ server
151–160 of 376 posts
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#152Earlier quoted context omitted.
This sounds like an architecture problem, not a language problem. Can you elaborate?
Of course it's possible to write a horizontally scaled application in Java or C++. But once you have to deal with horizontal scaling anyway , language performance is much less of an advantage: as Carmack says, the difference between 100 servers and 10 is just accounting.
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#153Earlier quoted context omitted.
Stack overflow hosts all (most?) Of their own baremetal servers in their own data center. Looking at the specs of the machines, they are actually pretty basic as far as servers go. A server isn't barely worth the cost of it's chassis and motherboard if you put less than 64 G ram and 24 CPUs in it. In other words, these are about the lowest specd proper servers you can get. So yeah, even their modest hardware is still…
"Their own data center" implies (to me at least) that they built their own data center. That doesn't sound right, so I looked it up, and it seems like they're colocating. That might be what you meant, but the data centers they use certainly weren't built or owned by SO.
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#154Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#155This is precisely the point made by McSherry, Isard and Murray in their lovely paper, "Scalability! But at what COST?" (Usenix HotOS '15). They demonstrate how much performance headroom there is in modern CPU and memory, and show how simple cache-sensitive batch algorithms running on a single core can outperform hundreds of cores running distributed map-reduce style jobs. https://www.usenix.org/system/files/conferenc…
But nobody in BigCo(tm) would do that, because everyone (including the executives) involved want to have Hadoop/BigData(tm) in their resume. /sarcasm
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#156Many developers severely underestimate how much workload can be served by a single modern server and high-quality C++ systems code. I've scaled distributed workloads 10x by moving them to a single server and a different software architecture more suited for scale-up, dramatically reducing system complexity as a bonus. The number of compute workloads I see that actually need scale-out is vanishingly small even in indu…
Can you expand on this? I have some pretty massive compute loads that need to be scaled onto a cluster with 100+ workers for most computations. This is after I use a library called dask that graphically does its own mapreduce optimisation inside its modules. This is all for a relatively small 250GB raw data file that I keep in a csv (and need to convert to SQL at some point). Are you saying this can be optimised to f…
You use a cluster when your data and compute requirements are large and parallel enough that the tax paid on network latency trumps the 10-20X speedup you get on SSD and 1000X speedup you get from just keeping data in RAM.
250 Gigs is tiny enough that you could probably much get better performance running on high memory instance in AWS or GCP. You'll generally have to write your own multiprocessing code though which is fairly simple - your existing library may also be able to support it.
I once actually ran this kind of workload on just my laptop using a compiled language that performed better than pyspark on a cluster.
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#157Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#158Earlier quoted context omitted.
This sounds like an architecture problem, not a language problem. Can you elaborate?
Of course it's possible to write a horizontally scaled application in Java or C++. But once you have to deal with horizontal scaling anyway , language performance is much less of an advantage: as Carmack says, the difference between 100 servers and 10 is just accounting.
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#159Earlier quoted context omitted.
Two. The number is two. You always need a backup server :)
I used to think that. But there are a couple of notable exceptions at either end of the latency spectrum. If your latency requirements are slack, then you can get away with one machine, because you can reboot or reprovision it and carry on processing without meet your requirements. If your latency requirements are tight, you don't have time to fail over anyway, so you might as well run one machine and make sure you c…
Re: A lot of complex “scalable” systems can be done with a simple, single C++ server
#160Earlier quoted context omitted.
But nobody in BigCo(tm) would do that, because everyone (including the executives) involved want to have Hadoop/BigData(tm) in their resume. /sarcasm
No doubt there are people who do it for cynical reasons. But at least some people do it sincerely thinking it’s the right choice. It’d be more interesting to talk about them, and how they came to make the wrong decision for what they thought were the right reasona.