For problems that are embarrassingly parallel, it is recommended that you write your
application so that it can scale horizontally. This means that you can take instances of
your program, run it on more CPUs, or machines, and this will cause the runtime of
the system to improve. Embarrassingly parallel problems fit this model so well
because it’s very easy to structure your program in such a way that you can send
chunks of a problem to different instances of your application.
Scaling horizontally became much easier in the early 2000s when a new paradigm
began to take hold: cloud computing. Although there are indications that the phrase
had been used as early as the 1970s, the early 2000s are when the idea really took root
in the zeitgeist. Cloud computing implied a new kind of scale and approach to appli‐
cation deployments and horizontal scaling. Instead of machines that you carefully
curated, installed software on, and maintained, cloud computing implied access to
vast pools of resources that were provisioned into machines for workloads on-
demand. Machines became something that were almost ephemeral, and provisioned
with characteristics specifically suited to the programs they would run. Usually (but
not always) these resource pools were hosted in data centers owned by other compa‐
nies.
This change encouraged a new kind of thinking. Suddenly, developers had relatively
cheap access to vast amounts of computing power that they could use to solve large
problems. Solutions could now trivially span many machines and even global regions.
Cloud computing made possible a whole new set of solutions to problems that were
previously only solvable by tech giants.
But cloud computing also presented many new challenges. Provisioning these resour‐
ces, communicating between machine instances, and aggregating and storing the
results all became problems to solve. But among the most difficult was figuring out
how to model code concurrently. The fact that pieces of your solution could be run‐
ning on disparate machines exacerbated some of the issues commonly faced when
modeling a problem concurrently. Successfully solving these issues soon led to a new
type of brand for software, web scale.
If software was web scale, among other things, you could expect that it would be
embarrassingly parallel; that is, web scale software is usually expected to be able to
handle hundreds of thousands (or more) of simultaneous workloads by adding more
instances of the application. This enabled all kinds of properties like rolling upgrades,
elastic horizontally scalable architecture, and geographic distribution. It also intro‐
duced new levels of complexity both in comprehension and fault tolerance.
And so it is in this world of multiple cores, cloud computing, web scale, and problems
that may or may not be parallelizable that we find the modern developer, maybe a bit
overwhelmed. The proverbial buck has been passed to us, and we are expected to rise
to the challenge of solving problems within the confines of the hardware we’ve been
handed. In 2005, Herb Sutter authored an article for Dr. Dobb’s, titled, “The free lunch
Moore’s Law, Web Scale, and the Mess We’re In | 3