Richard Bucker

The secret sauce for effective scaling

Posted at — Jul 19, 2012

Many people think that scaling is a matter of selecting one programming language over another. I do not think that anyone would argue that there are plenty of advantages in most proper functional languages like erlang over dynamic languages like python or ruby. What most developers fail to recognize is all software that needs to scale is actually a business with a profit motive. And most executives under emphasize “business” in their technology business.Going back to the lessons of Henry Ford. Scaling production came from 2 key areas. (a)¬†interchangeable¬†parts. (b) the assembly line. While it was not particularly motivating for workers to be on the assembly line, in the same role, day after day. It paid the bills.So which is cheaper? Cloning a machine or rewriting your application for some fractional gain? Even if rewriting your rewrite was to get 2 - 3 times performance increase, it’s simply not sustainable over time and the next rewrite. I wish there were a study on the cost per LOC(lines of code) for the different languages… my personal experience has been that demanding erlang coding will pay 2x the most demanding ruby. For any project there is a 1:1 ratio of LOC between erlang and ruby.So the secret sauce: know what your costs are and when you need your ROI to be decide on a strategy and architecture that will scale to thousands of nodes; you do not have to implement this day one but you have to know where you are going. Do not get wrapped up in the GIL, instead concentrate on IPC between processes on the same LAN and virtual WAN. code to the roadmap and plan not to rewrite anything segment responsibility into teams (tools, core, UI, etc) always think about LTS from your providers. While you might not like Windows they are the kings of LTS these days. And if not them, at least there is Ubuntu and Red Hat build tools tools tools Don’t repeat yourselfSimply put, writing new code in order to scale to infinite levels suffers from the law of diminishing and delayed returns. Cloning hardware is a fixed and capitalizable expense with immediate returns.