Software Architecture for the Cloud

by Rob Richardson



About Me

Rob Richardson

Rob Richardson is a software craftsman building web properties in ASP.NET and Node, React and Vue. He's a frequent speaker at conferences, user groups, and community events, and a diligent teacher and student of high quality software development. You can find this and other talks on https://robrich.org/presentations and follow him on twitter at @rob_rich.

What is "the cloud"?

the cloud

source: mycloudblog7.wordpress.com/2013/06/19/who-manages-cloud-iaas-paas-and-saas-services

What is "the cloud"?

Instant hardware provisioning

Outsourced hardware management

Utility computing

What is "the cloud"?

Spin up and spin down things quickly

Pay for only what you use

What is "the cloud"?

Small bundles of elastic-scale functionality

Cattle not Pets

You name pets,
you feed pets,
you dress them up
in little dresses

Cattle not Pets

There's a whole herd
of cattle, and we tend
to the entire herd at once

Cattle not Pets

Cattle not Pets

Machine isn't durable

It may not be the same machine next time you wake up

We need to learn not to care

Disk isn't durable

  • Temp folder
  • Upload folder
  • Log files

Process isn't unique

We can't assume there's only one process running

Maybe there's 2 servers running this code

Maybe there's 1,000 servers running this code

It isn't durable

So store things off-machine

And build small stateless services

Data-store as a service

Cloud benefit: database as a service

I don't need to manage it

Nearly perfect up-time

Automatic backup and geo-redundancy

Stateless Services

Build small services that can operate independently

Whether it's 2 requests on the same box
or requests spread across 1,000 boxes

Micro-service Architecture

Provisioning is easy

Favor small, simple things over large complex things


So let's design smaller pieces

Micro-service Architecture

Small, simple services

Deploy each piece as it evolves

Micro-service Architecture

The unit of development is
a module, a feature, a tool

Micro-service Architecture

Then stitch these services into a mesh

Micro-service Architecture

We need configuration as code

We need small bundles of deployment


We need docker containers

Micro-service Architecture

How do I discover the URLs of the dependent services?

(2 boxes or 1,000 boxes)

Now I need a service discovery data store
or a load balancer in front of each piece

Micro-service Architecture

Design deterministic functions

If you play it again, you'll get the same answer


* this doesn't always work:

  • Sending an email
  • Creating a record

Micro-service Architecture

Look to eventual consistency

See also:

  • Airline ticketing
  • Shipping tracking numbers
  • Bank statements

Software Architecture for the Cloud

The cloud has opened up possibilities

We must think differently


Think: Containerized micro-services