News for hackers. Stuff that matters.
Re:Scalability, but at what cost? (2015) by ben_jones on Tuesday June 07, 2016 @01:30PM (#11856034)
People forget that the two methods of scaling are HORIZONTAL and VERTICAL. They think: "I can just put some micro-services behind HA proxy and boom, more capacity!".

And then they forget if they had just modified that one query and tweaked that one for-loop they could've had that same capacity without launching six new servers with all kinds of potential for the wiring to go down and cause downtime. Plus the dev time to build the services.

Re:Scalability, but at what cost? (2015) by bane on Tuesday June 07, 2016 @09:34PM (#11859402)
I usually think of scaling in 3 methods: horizontal (add more machines), vertical (get a bigger machine) and inward (improve your algorithms).

The largest performance gains I've seen are most often of the inward type -- like multi-thousands of percent, just by rethinking the code or the approach.

Bonus, improving inward scaling multiplies investments in horizontal and vertical scaling.

Re:Scalability, but at what cost? (2015) by aianus on Tuesday June 07, 2016 @02:14PM (#11856435)
Vertical scaling requires hiring good engineers instead of mediocre ones (additional cost of $100,000s per year across the team). Horizontal scaling in comparison is much, much cheaper for your average CRUD app.
Re:Scalability, but at what cost? (2015) by brianwawok on Tuesday June 07, 2016 @03:19PM (#11857003)
Maybe, maybe not.

For example choosing Java over Ruby would give you 2-10x better perf per server... and I am not sure that Java devs cost any more or less than Ruby devs.

Now we can get into an argument about developer productivity and all that.. but form a purely "i want to run 10x more users per server"... something like Java / Ruby gets you a long ways.

Re:Scalability, but at what cost? (2015) by joslin01 on Tuesday June 07, 2016 @03:36PM (#11857135)
I talked to a CTO once that said he brought his RoR fleet down from 60 servers to 6-8 by switching to Scala.
Re:Scalability, but at what cost? (2015) by matthewmacleod on Tuesday June 07, 2016 @04:01PM (#11857325)
When he said "switching to Scala" I reckon he probably meant "rewriting our platform."

It's very difficult to do a comparison like this in practice, because switching languages inherently involves a rewrite of a platform.

Re:Scalability, but at what cost? (2015) by collyw on Wednesday June 08, 2016 @07:49AM (#11861540)
I am curious how much a rewrite staying in Ruby could have saved. Its always easier to write code when you have a good specification, and a working application would fulfill that role well.
Re:Scalability, but at what cost? (2015) by FooBarWidget on Tuesday June 07, 2016 @04:50PM (#11857700)
I was once involved in a large-scale government project that rewrote a Java app to RoR. They went from 50 servers to 10.

It has probably got more to do with the rewrite and the new architecture than whatever language it was written in.

Re:Scalability, but at what cost? (2015) by joslin01 on Wednesday June 08, 2016 @10:12AM (#11862378)
What? It absolutely has to do with the language.

Ruby binary trees: 57 seconds Scala binary trees: 11 seconds

[1] - http://benchmarksgame.alioth.debian.org/u64q/ruby.html [2] - http://benchmarksgame.alioth.debian.org/u64q/scala.html

Re:Scalability, but at what cost? (2015) by FooBarWidget on Thursday June 09, 2016 @09:25AM (#11869192)
That would mean something if Ruby apps are 100% Ruby and/or are performing binary tree operations all the time, or doing similar kinds of CPU-intensive operations as depicted in the alioth benchmarks. But they don't. Ruby web apps perform lots of string manipulation, memory allocation, I/O. A lot of expensive things are offloaded to C libraries. Things like XML parsing are offloaded to native libraries like libxml; nobody uses an XML parser fully implemented in Ruby. Ruby does not reimplemented gzip compression in Ruby, it uses zlib. So the alioth benchmarks are not representative of real-world performance.
Re:Scalability, but at what cost? (2015) by igouy on Sunday June 12, 2016 @07:51PM (#11890928)
>> Ruby web apps perform lots of string manipulation, memory allocation, I/O. <<

    string manipulation
http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

    memory allocation
http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

    I/O
fasta, fasta-redux, reverse-complement write 250MB

regex-dna reads 50MB; k-nucleotide, reverse-complement read 250MB

>> …offloaded to native libraries… So the alioth benchmarks are not representative of real-world performance. <<

The benchmarks game does show C programs ;-)

The benchmarks game does show scripting-languages explicitly using native libraries:

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

Re:Scalability, but at what cost? (2015) by FooBarWidget on Wednesday June 15, 2016 @05:05AM (#11908009)
> string manipulation

That benchmark performs string manipulations that rarely occur in web apps. Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C.

> memory allocation

Web apps don't tend to implement entire trees in pure Ruby. That benchmark is completely non-representative of real-world performance.

What exactly are you getting at? Of course it's easy to find a bunch of synthetic benchmarks that show weaknesses in particular cases. Still doesn't prove anything.

Re:Scalability, but at what cost? (2015) by igouy on Wednesday June 15, 2016 @01:25PM (#11910665)
> Web apps need: concatenation, substring, find/replace, maybe with regexps. All of those are implemented in C.

join and gsub?

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

> Web apps don't tend to implement entire trees in pure Ruby.

Nor do other apps but that is what Hans Boehm came up with as a simple GC benchmark.

http://hboehm.info/gc/gc_bench/

> What exactly are you getting at?

You don't seem to know what is shown on the benchmarks game website.

Re:Scalability, but at what cost? (2015) by FooBarWidget on Thursday June 16, 2016 @10:16AM (#11916228)
Doesn't your regex-dna benchmark kind of prove my point? Just look at the comparisons here: http://benchmarksgame.alioth.debian.org/u64q/performance.php...

C GCC: 2.46 sec

Java: 8.23 sec

Ruby #8: 9.35 sec

It's only about 4x slower than pure C in this case, and only a little slower than Java which has a very good JIT.

> You don't seem to know what is shown on the benchmarks game website.

How funny of you to say that while acting as if the benchmarks "prove" Ruby is the ultimate spawn of the devil that eats away any and all performance. The website itself tells you not to jump to conclusions and that the app itself is the ultimate benchmark: http://benchmarksgame.alioth.debian.org/dont-jump-to-conclus...

Re:Scalability, but at what cost? (2015) by igouy on Thursday June 16, 2016 @01:42PM (#11917667)
>> Doesn't your regex-dna benchmark kind of prove my point? <<

7 days ago, you could have used the data shown on the benchmarks game website to try and make your point to joslin01.

Instead you chose to dismiss the data.

>> acting as if <<

You seem to have confused me with joslin01.

Re:Scalability, but at what cost? (2015) by wstrange on Wednesday June 08, 2016 @12:20AM (#11859991)
Or the fact that new servers are an order of magnitude faster than the ones they replaced.
Re:Scalability, but at what cost? (2015) by Drdrdrq on Wednesday June 08, 2016 @01:24AM (#11860210)
Order of magnitude faster? I doubt that. Unless the old ones were really old / slow to begin with. But really, we are both speculating without knowing the facts.
Re:Scalability, but at what cost? (2015) by aianus on Tuesday June 07, 2016 @04:04PM (#11857359)
> I am not sure that Java devs cost any more or less than Ruby devs

I don't know about that, how many bootcamps are pumping out Java programmers instead of Python/Ruby programmers?

Re:Scalability, but at what cost? (2015) by brianwawok on Tuesday June 07, 2016 @04:10PM (#11857400)
Well in Chicago some of the colleges are pumping out Java Devs...

I guess if you are comparing a 4 year college Java dev to a 6 week bootcamp Ruby dev you have something, but that seems weird...