Book Image

Implementing Cloud Design Patterns for AWS - Second Edition

By : Sean Keery, Clive Harber, Marcus Young
Book Image

Implementing Cloud Design Patterns for AWS - Second Edition

By: Sean Keery, Clive Harber, Marcus Young

Overview of this book

Whether you're just getting your feet wet in cloud infrastructure or already creating complex systems, this book will guide you through using the patterns to fit your system needs. Starting with patterns that cover basic processes such as source control and infrastructure-as-code, the book goes on to introduce cloud security practices. You'll then cover patterns of availability and scalability and get acquainted with the ephemeral nature of cloud environments. You'll also explore advanced DevOps patterns in operations and maintenance, before focusing on virtualization patterns such as containerization and serverless computing. In the final leg of your journey, this book will delve into data persistence and visualization patterns. You'll get to grips with architectures for processing static and dynamic data, as well as practices for managing streaming data. By the end of this book, you will be able to design applications that are tolerant of underlying hardware failures, resilient against an unexpected influx of data, and easy to manage and replicate.
Table of Contents (20 chapters)
Title Page
Dedication
About Packt
Contributors
Preface
Free Chapter
1
Introduction to Amazon Web Services
Index

Load balancing


Our instances are running, but there is no way to access them outside of AWS. We will use a classic Elastic Load Balancing (ELB) for our examples, but the ALB offers a number of additional features for web traffic. These include more advanced health checks, better redirection, and a more complete pool management component.

Global Traffic Manager

In this case, we will use a DNS record to point at the public IP addresses of both instances. This creates a Global Traffic Manager (GTM) service in front of them by adding this to the bottom of main.tf:

# Global Traffic Management using DNS
resource "aws_route53_record" "www" {
  zone_id = "${aws_route53_zone.book.zone_id}"
  name = "www.book.cloudpatterns.cuk"
  type = "A"
  ttl = "300"
  records = [
    "${aws_instance.cheap_worker.public_ip}",
    "${aws_instance.cheap_worker_west.public_ip}"
  ]
}

Run your terraform plan command and then terraform apply -auto-approve (since I'm getting tired of typing yes at the prompt). You should...