liveBook · Manning

Uptime

As explained in Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu

High availability is a system design property that minimizes service interruption by avoiding dependence on a single failure domain.

A Terraform state store can preserve every byte of data and still block a deployment if it is inaccessible. Uptime measures how often a system is up and accessible. For state storage, that makes availability an operational requirement: teams need access during routine changes and, especially, during emergencies. section 6.2.3

Uptime is commonly expressed in “nines”: 99.99% is four nines, and 99.999% is five nines. For critical Terraform state storage, four nines is a suggested minimum. When choosing a provider, check both its outage history and its service-level agreement; a promise without a transparent record is weak evidence of availability. section 6.2.3

Application uptime also depends on where resources run. If an entire application occupies one availability zone, an outage there takes down the application. Spreading the network across locations reduces dependence on that single failure domain, but costs more. A network module can therefore accept an availability-zone count, allowing a cheaper single-location development environment and a multi-location production environment to use the same module. section 10.2.2 section 10.2.4

Listing 10.9 Network module example usage
module "network" {
  source                 = "./top_level"     #1
  enable_isolated_subnet = true              #2
  availability_zones     = 3                 #3
  cidr_block             = "192.168.0.0/16"  #4
}

This module call sets availability_zones to 3 alongside the network CIDR block and isolated-subnet option. Changing the zone count selects the intended topology without switching modules; the module’s validation permits one through four zones. section 10.2.4

How Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu covers it

How deep it goes
Defines uptime, gives percentage conventions and evaluation criteria, then illustrates a configurable network module without deriving an uptime calculation.
Examples
Uses four- and five-nines targets, an inaccessible state store, and a Terraform network module configured for three availability zones.
What it assumes
Assumes familiarity with Terraform deployments and network modules while defining availability as accessibility, not merely data survival.
What you can do after
Apply it via a Terraform network module by choosing a zone count appropriate to each environment’s availability and cost needs.
How it connects
Connects uptime to Terraform state, resiliency, service-level agreements, availability zones, and network modules.

Also explained in

Compare how 20 books explain uptime →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu. The section links point to the parts of the book it draws on.