Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Implementing Cloud Design Patterns for AWS
Implementing Cloud Design Patterns for AWS

Implementing Cloud Design Patterns for AWS: Create highly efficient design patterns for scalability, redundancy, and high availability in the AWS Cloud

eBook
$35.98 $39.99
Paperback
$48.99
Hardcover
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Implementing Cloud Design Patterns for AWS

Chapter 2. Basic Patterns

The first patterns we will learn are considered to be the most rudimentary patterns for Cloud infrastructure. Many patterns throughout this book will be very heavily tied to AWS-specific services while the patterns here can be applied in many other Cloud virtualization infrastructures that have similar capabilities. In this chapter we will cover the following topics:

  • Snapshot pattern
  • Stamp pattern
  • Scale up pattern
  • Scale out pattern
  • On-demand disk pattern

For this chapter, I will use the Amazon provided and supported Amazon Machine Image (AMI) titled Amazon Linux AMI. The base AMI that you choose or the machine type to launch the AMI is not important for this chapter, as long as it is a Linux image. Images based on Windows have some inconsistencies and require special steps to be taken to create reusable images and snapshots. While following along, if you decide to use an alternate image, the code snippets may not work as expected.

Note

For more information on...

Introducing Vagrant

Throughout this book, the user will be creating running instances to follow along. The AWS console is suitable for all examples, as well as Vagrant, and will be demonstrated as such.

Vagrant, as described in the introduction, is a piece of software that has a configuration file, or Vagrantfile, which describes how to run a virtual machine under a provider. Vagrant, by default, does not have the AWS provider built in and requires a plugin Vagrant-AWS. To install Vagrant, download the latest version from their website http://www.vagrantup.com and install it as described in their HOWTO.

Once Vagrant is installed correctly, the AWS plugin can be installed as follows:

$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.5.0)'!

Every provider for Vagrant requires a base box, which is not applicable for AWS. A box file is a compressed virtual machine disk with its configuration...

Snapshot pattern

The first basic pattern that we will cover is the snapshot pattern. This pattern is the basis for many other patterns described throughout this book and includes the way to create an S3-backed, point-in-time snapshot of a running instance from the AWS console. To do this, we will select a running instance from the EC2 console and select the root device volume from the instance pull-up frame, which will bring up a pop-up for the volume as shown in the following screenshot:

Snapshot pattern

Click the EBS ID link from the pop-up. This will bring you to the Volumes section of the AWS console with the previously selected volume in context. From here, select the Actions drop-down and select Create Snapshot as shown in the following screenshot:

Snapshot pattern

You will now be prompted for a name and description, but they are optional so go ahead and click Create. The next window will give you a success prompt with a snapshot identifier. If you select the snapshot id, it will take you to the Snapshot section of...

Stamp pattern

The pattern covered here is called the stamp pattern because it covers how to replicate a bootable operating system similar to a rubber stamp of sorts. By creating an image of an operating system that is pre-configured for a purpose, it can be easily replicated by simply bringing it up when needed in the same way a stamp works by creating a template.

We will actually create a new AMI to use throughout this book from this method. The AWS Linux AMI, by default, does not allow sudo without a TTY terminal. There's a simple fix for this but it must be run every time we boot from the AWS Linux AMI unmodified. Instead, we will make this fix to their image and package it into our own AMI.

This is useful because Vagrant requires sudo to be usable for many of its features such as folder synchronization, and provisioners such as Puppet and Chef. If you were to try to run Vagrant on their base AMI, you would get an output such as:

$ vagrant up --provider aws
Bringing machine &apos...

Scale up pattern

The scale up pattern is a method that allows a server to change size and specifications dynamically, and as needed. Imagine a running web instance that does a bit of computation per request. Initially, it performs extremely well, but over time traffic becomes heavier and causes the computation time to increase. A couple of options exist to solve this problem, but all have their own benefits and issues.

One option could be to spin up a second instance (or scale outwards), but this means double the cost, as well as any maintenance required to be performed on each server. For applications in the Cloud, it is important not only to think of the cost involved in the server, but also the implied costs, such as operational. The easiest solution might be to change the specs on the current server or scaling up. A benefit of this method is that, if the processing peak can be predicted, such as the beginning of the month or the end of the month transactions, this method can be automated...

Scale out pattern

We have discussed up to this point how to scale up in resources on an instance but not how to scale out. Scaling up an instance can only help in a few limited examples, but the more important issue is how to add processing power without affecting the client or the systems interacting with our services. To do this, we will tie together a few different EC2 resources. The resource diagram, as shown, will help to visualize what we are trying to accomplish:

Scale out pattern

The general process for this pattern is:

  • Create an elastic load balancer with forwarding ports and health checks
  • Create a launch configuration for the instance
  • Create an auto scaling group with configured CloudWatch alarms and scaling policies

To demonstrate this, we will first create an elastic load balancer. Browse to the Load Balancers portion of the AWS console and select Create Load Balancer as seen in the following screenshot:

Scale out pattern

At the Define Load Balancer prompt, give it a descriptive name in the Load Balancer Name text box...

Introducing Vagrant


Throughout this book, the user will be creating running instances to follow along. The AWS console is suitable for all examples, as well as Vagrant, and will be demonstrated as such.

Vagrant, as described in the introduction, is a piece of software that has a configuration file, or Vagrantfile, which describes how to run a virtual machine under a provider. Vagrant, by default, does not have the AWS provider built in and requires a plugin Vagrant-AWS. To install Vagrant, download the latest version from their website http://www.vagrantup.com and install it as described in their HOWTO.

Once Vagrant is installed correctly, the AWS plugin can be installed as follows:

$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.5.0)'!

Every provider for Vagrant requires a base box, which is not applicable for AWS. A box file is a compressed virtual machine disk with its configuration. For example...

Snapshot pattern


The first basic pattern that we will cover is the snapshot pattern. This pattern is the basis for many other patterns described throughout this book and includes the way to create an S3-backed, point-in-time snapshot of a running instance from the AWS console. To do this, we will select a running instance from the EC2 console and select the root device volume from the instance pull-up frame, which will bring up a pop-up for the volume as shown in the following screenshot:

Click the EBS ID link from the pop-up. This will bring you to the Volumes section of the AWS console with the previously selected volume in context. From here, select the Actions drop-down and select Create Snapshot as shown in the following screenshot:

You will now be prompted for a name and description, but they are optional so go ahead and click Create. The next window will give you a success prompt with a snapshot identifier. If you select the snapshot id, it will take you to the Snapshot section of the...

Left arrow icon Right arrow icon

Description

This book is aimed at architects, solution providers, and those of the DevOps community who are looking to implement repeatable patterns for deploying and maintaining services in the Amazon cloud infrastructure. Prior experience using AWS is required as the book focuses more on the patterns and not on the basics of using AWS.

Who is this book for?

This book is aimed at architects, solution providers, and those of the DevOps community who are looking to implement repeatable patterns for deploying and maintaining services in the Amazon cloud infrastructure. Prior experience using AWS is required as the book focuses more on the patterns and not on the basics of using AWS.

What you will learn

  • Create and maintain server backups
  • Implement scaling policies on schedules, influxes in traffic, and deep health checks
  • Provision servers and data that persist through termination
  • Make complete use of high availability storage and redundancy storage
  • Design content delivery networks to improve user experience
  • Optimize databases through caching and sharding
  • Monitor and queue data for processing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 29, 2015
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781782177357
Vendor :
Amazon
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 29, 2015
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781782177357
Vendor :
Amazon
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 152.97
Learning AWS
$54.99
AWS Administration ??? The  Definitive Guide
$48.99
Implementing Cloud Design Patterns for AWS
$48.99
Total $ 152.97 Stars icon

Table of Contents

12 Chapters
1. Introduction Chevron down icon Chevron up icon
2. Basic Patterns Chevron down icon Chevron up icon
3. Patterns for High Availability Chevron down icon Chevron up icon
4. Patterns for Processing Static Data Chevron down icon Chevron up icon
5. Patterns for Processing Dynamic Data Chevron down icon Chevron up icon
6. Patterns for Uploading Data Chevron down icon Chevron up icon
7. Patterns for Databases Chevron down icon Chevron up icon
8. Patterns for Data Processing Chevron down icon Chevron up icon
9. Patterns for Operation and Maintenance Chevron down icon Chevron up icon
10. Patterns for Networking Chevron down icon Chevron up icon
11. Throw-away Environments Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8
(5 Ratings)
5 star 20%
4 star 0%
3 star 40%
2 star 20%
1 star 20%
Krzysztof Satola Sep 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
ShortA great reference guide filled with detailed implementation design examples in the do-it-yourself fashion, showing best practices to cloud applications design. Can serve as a basic toolkit for building more complex designs as well as practical guide to AWS operations. Complements nicely AWS Cloud Design Patterns (CDP).FullThis book is aimed at architects, solution providers, and DevOps interested in repeatable implementation patterns for deploying and maintaining services in the Amazon Cloud infrastructure. The beginning of the Implementing Cloud Design Patterns for AWS covers general cloud-related introductory topics, cloud computing service models, benefits of moving to the cloud, and some specific concerns related to AWS (i.e. over- and under-provisioning). The rest of the book is focused on different patterns in high availability, data processing, operations and maintenance, networking, and dynamic infrastructure.I like the way the content of this book is organized. The author introduces some atom patterns (i.e. Stamp pattern) and then reuses them while explaining more complicated scenarios (i.e. Multi-server pattern). He starts with the very basic topics to finish with the more complex ones: microservices, DevOps and infrastructure as code, temporary development environments or continous integration. I wish the latter topics were described in greater detail. Maybe this would happen in the next release of this useful book?The structure of the book is based on AWS Cloud Design Patterns (CDP), a collection of solutions and design ideas for using AWS cloud technology to solve common systems design problems. I find it as an implementation guide for the patters defined on the CDP website. All use cases are shown in a consistent way with step-by-step instructions of how to simulate/accomplish them using AWS Management Console or third party tools like Vagrant or Varnish. Readers will need some basic AWS knowledge though to better understand what is happening in the background while performing these hands-on exercises. As the book complements the CDP, I would recommend readers to start with the pattern descriptions on the CDP website and then refer to the book, to see how to implement specific patterns. Both, the book and the website, play very nice together and can become a valuable asset in a cloud architect’s library.I like the author’s recommendations and caution points which can be found throughout the book. In my opinion the are very valid and represent quite pragmatic approach to topics being discused. The book consists of screenshots, short comments and command-line or code snippets, very concise and straight to the point.The book could be also used by readers not very interested in the cloud design but just wanting to get some guidance on how to play with some AWS-based services (instantiating EC2 images, configuring ELBs, working with S3 and so on). Links to specific sections of AWS documentation available in the book may also help with deeper understanding of how services described in the book actually work.As the move to cloud infrastructure brings to the table a huge set of questions on how to handle issues such as load balancing, content delivery networks, failover, and replication, this book can definitely help to tackle all of them one by one.
Amazon Verified review Amazon
I.F. Jun 25, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Very essential and yet effective. A perfect introduction to the Amazon AWS service
Amazon Verified review Amazon
david Aug 14, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
It covers all deployment patterns on AWS: Networking, Maintenance, Monitoring, DB, Backup, Data, etc .. in a very practical way with easily implementable simple examples. It is an interesting guide that offers ideas for deploying applications on Amazon AWS.Also in the final chapters refers to the interaction with other applications to integrate with AWS CI: Packer, Vagrant, etc ...Recommended to have an overview of what Amazon AWS can offer and provides different deployment patterns.
Amazon Verified review Amazon
FireTV is unreliable as HELL ! Jun 19, 2017
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
By definition a design pattern is a tried and tested production grade solution, this book is just a collection of basic ideas which describe how a handful of AWS features work, it is full of caveats saying how the solution would not work in the real world.All in it's not worth much, the free AWS white papers contain better information, this is not even a 'complete' beginners guide.
Amazon Verified review Amazon
Dirk Estievenart Dec 08, 2015
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I bought the Kindle edition.- The table of contents is not working on Kindle, so each time you need to jump to another chapter, you'll have to scroll back to the beginning of the book. This is quite annoying for a tech book!- The book is difficult to read and navigate overall.- All the examples are written in bash which is OK for sysadmin tasks, but this will hardly be the way you'll implement your applications.- The patterns are obvious and any developer with some experience can figure them out by thinking 5 minutes.- Worst of all, this book hardly handles any AWS service!! Kinesis? SNS? DynamoDB? Elasticache? Lambda?I'd expect from a book about patterns for AWS to use ElastiCache instead of setting up a Redis yourself.Don't waste your money on this.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon