Cloud computing provides - **on-demand self service**: consumer can provision compute as needed without human intervention - **broad network access**: capabilities are available over the network through standard mechanisms - **resource pooling**: the provider's computing resources are pooled together to service multiple consumers - **rapid elasticity**: easy to scale up or down provisioned computational resources - **measured service**: resource usage can be monitored and reported to the consumer Cloud computing started in the 1960s and 70s with time-sharing. There was a big computer in a room, and anyone who wanted to use it had to share time with others who wanted to use it. Next came **virtualization**, where computing hardware was centrally located but still owned and managed by each organization. Internet startups in the 90s would "rack their own server" in the data center. **Serverless** followed in the early 00s and continues today, where cloud providers allocate machine resources and compute capabilities on demand (so, "serverless" only to the client). ## replication Replication is central to the cloud computing revolution. Replication entails creating multiple redundant systems across server nodes. A **watcher** or **coordinator** manages traffic from the application to nodes, detecting when a node is down and re-routing traffic to available nodes. This eliminates any single point of failure. ## parallelization Parallelization allows operations to be broken into chunks and run at the same time across CPUs or server nodes. **Primary-secondary replication** is when all updates go to the primary nodes and reads can run against any node. Here parallelization is constrained by the primary node. **Peer-to-peer replication** is when updates and reads go to any node. Update propagation becomes complex but it has good scalability. ## sharding Sharding refers to distributing the data in a database into partitions running across nodes, typically based on key range values. The watcher directs query traffic based upon key values. Queries that span multiple partitions can be more costly, but in general good sharding will support faster queries. Sharding can also be combined with replication to support parallelization and [[database backup]]. The term "sharding" comes from archeology, where the study of cultures is based in large part on shards of clay pots found at archeological sites.