Implementing Cloud Design Patterns for AWS
By Marcus Young
()
About this ebook
- Create highly robust systems using cloud infrastructure
- Make web applications resilient against scheduled and accidental down-time
- Explore and apply Amazon-provided services in unique ways to solve common problems
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.
Related to Implementing Cloud Design Patterns for AWS
Related ebooks
Implementing DevOps on AWS Rating: 0 out of 5 stars0 ratingsGetting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratingsPractical DevOps Rating: 3 out of 5 stars3/5Getting Started with Terraform Rating: 5 out of 5 stars5/5Implementing Azure Solutions Rating: 0 out of 5 stars0 ratingsDeveloping with Docker Rating: 5 out of 5 stars5/5Mastering Cloud Development using Microsoft Azure Rating: 0 out of 5 stars0 ratingsMicroservices with Azure Rating: 0 out of 5 stars0 ratingsAmazon S3 Essentials Rating: 0 out of 5 stars0 ratingsLearning Docker - Second Edition Rating: 0 out of 5 stars0 ratingsLearning .NET High-performance Programming Rating: 0 out of 5 stars0 ratingsMicrosoft Azure Storage Essentials Rating: 0 out of 5 stars0 ratingsLearning AWS Rating: 4 out of 5 stars4/5AWS Administration – The Definitive Guide Rating: 5 out of 5 stars5/5AWS Solution Architect Certification Exam Practice Paper 2019 Rating: 4 out of 5 stars4/5AWS Certified Advanced Networking Official Study Guide: Specialty Exam Rating: 5 out of 5 stars5/5Amazon Web Services in Action Rating: 0 out of 5 stars0 ratingsAWS Certified Solutions Architect - Professional Rating: 0 out of 5 stars0 ratingsAWS Security Cookbook: Practical solutions for managing security policies, monitoring, auditing, and compliance with AWS Rating: 0 out of 5 stars0 ratingsServerless Architectures on AWS Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsInfrastructure as Code (IAC) Cookbook Rating: 0 out of 5 stars0 ratingsAWS Lambda in Action: Event-driven serverless applications Rating: 0 out of 5 stars0 ratingsAmazon EC2 Cookbook Rating: 0 out of 5 stars0 ratingsLearn Kubernetes - Container orchestration using Docker: Learn Collection Rating: 4 out of 5 stars4/5AWS Certified Solutions Architect Associate All-in-One Exam Guide, Second Edition (Exam SAA-C02) Rating: 5 out of 5 stars5/5Amazon S3 Cookbook Rating: 0 out of 5 stars0 ratings
Databases For You
SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Blockchain Basics: A Non-Technical Introduction in 25 Steps Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Practical Data Analysis Rating: 4 out of 5 stars4/5100+ SQL Queries T-SQL for Microsoft SQL Server Rating: 4 out of 5 stars4/5Learn Git in a Month of Lunches Rating: 0 out of 5 stars0 ratingsExcel 2021 Rating: 4 out of 5 stars4/5Relational Database Design and Implementation Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5Beginning Microsoft SQL Server 2012 Programming Rating: 1 out of 5 stars1/5Learning PostgreSQL Rating: 1 out of 5 stars1/5Business Intelligence Guidebook: From Data Integration to Analytics Rating: 4 out of 5 stars4/5Learn SQL Server Administration in a Month of Lunches Rating: 0 out of 5 stars0 ratingsBehind Every Good Decision: How Anyone Can Use Business Analytics to Turn Data into Profitable Insight Rating: 5 out of 5 stars5/5COMPUTER SCIENCE FOR ROOKIES Rating: 0 out of 5 stars0 ratingsThe Data and Analytics Playbook: Proven Methods for Governed Data and Analytic Quality Rating: 5 out of 5 stars5/5Data Governance: How to Design, Deploy and Sustain an Effective Data Governance Program Rating: 4 out of 5 stars4/5Python Projects for Everyone Rating: 0 out of 5 stars0 ratingsCodeless Data Structures and Algorithms: Learn DSA Without Writing a Single Line of Code Rating: 0 out of 5 stars0 ratingsArtificial Intelligence for Fashion: How AI is Revolutionizing the Fashion Industry Rating: 0 out of 5 stars0 ratingsAccess 2019 For Dummies Rating: 0 out of 5 stars0 ratingsSQL: Practical Guide for Developers Rating: 2 out of 5 stars2/5SQL Clearly Explained Rating: 5 out of 5 stars5/5Access 2010 All-in-One For Dummies Rating: 4 out of 5 stars4/5Query Store for SQL Server 2019: Identify and Fix Poorly Performing Queries Rating: 0 out of 5 stars0 ratingsBeginning Microsoft Power BI: A Practical Guide to Self-Service Data Analytics Rating: 0 out of 5 stars0 ratingsThe AI Bible, Making Money with Artificial Intelligence: Real Case Studies and How-To's for Implementation Rating: 4 out of 5 stars4/5
Reviews for Implementing Cloud Design Patterns for AWS
0 ratings0 reviews
Book preview
Implementing Cloud Design Patterns for AWS - Marcus Young
Table of Contents
Implementing Cloud Design Patterns for AWS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction
Introduction to AWS
Cloud computing service models
Infrastructure as a Service
Platform as a Service
Software as a Service
Benefits of moving to the Cloud
Common problems encountered at AWS
Underlying hardware failures
Over-provisioning
Under-provisioning
Replication
Redundancy
Improving the end user experience
Monitoring and log-gathering
Summary
2. Basic Patterns
Introducing Vagrant
Snapshot pattern
Stamp pattern
Scale up pattern
Scale out pattern
On-demand disk pattern
Volume resize
Change volume from magnetic to SSD
Increase I/O through software RAID
Summary
3. Patterns for High Availability
Multi-server pattern
Multi-data center pattern
Floating IP pattern
Deep health check pattern
Summary
4. Patterns for Processing Static Data
High availability storage
Direct storage hosting
Private data delivery
Content delivery networks
Rename distribution pattern
Summary
5. Patterns for Processing Dynamic Data
Clone server pattern
NFS sharing pattern
State sharing pattern
URL rewriting pattern
Cache proxy pattern
Summary
6. Patterns for Uploading Data
Write proxy pattern
Storage index pattern
Direct object upload pattern
Summary
7. Patterns for Databases
Database replication pattern
Read replica pattern
In-memory cache pattern
Sharding write pattern
Summary
8. Patterns for Data Processing
Queuing chain pattern
Priority queue pattern
Job observer pattern
Summary
9. Patterns for Operation and Maintenance
Bootstrap pattern
Cloud dependency injection pattern
Stack deployment pattern
Monitoring integration pattern
Web storage archive pattern
Weighted transition pattern
Hybrid backup pattern
Summary
10. Patterns for Networking
OnDemand NAT pattern
Management network pattern
Functional firewall pattern
Operational firewall pattern
Web application firewall pattern
Multiple load balancer pattern
Summary
11. Throw-away Environments
Infrastructure as code
CloudFormation
Packer
Fugue
Temporary development environments
Continuous integration
Summary
Index
Implementing Cloud Design Patterns for AWS
Implementing Cloud Design Patterns for AWS
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1240415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78217-734-0
www.packtpub.com
Credits
Author
Marcus Young
Reviewers
João Ferreira Loff
Robert M. Marks
Somanath Nanda
Philip O'Toole
Fred Stluka
Commissioning Editor
Dipika Gaonkar
Acquisition Editor
Nikhil Karkal
Content Development Editor
Merwyn D'souza
Technical Editor
Mitali Somaiya
Copy Editors
Trishya Hajare
Sonia Mathur
Alpha Singh
Project Coordinator
Neha Bhatnagar
Proofreaders
Joanna McMahon
Paul Hindle
Indexer
Mariammal Chettiyar
Graphics
Abhinash Sahu
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Author
Marcus Young recently graduated with a degree in computer science and mathematics before getting involved in system administration and DevOps. He currently works in software automation using open source tools and technologies. His hobbies include playing ice hockey and brewing homebrew beer. He also enjoys hardware projects based on microcontrollers and single board computers.
I'd like to thank my beautiful wife for putting up with the many projects and work items that make their way into my free time. Also to my son who continues to inspire me to keep pushing myself.
About the Reviewers
João Ferreira Loff has an MSc in Computer Science and Engineering with a major in software engineering from Instituto Superior Técnico (www.tecnico.ulisboa.pt), University of Lisboa, Portugal. His interest in Cloud computing emerged from his master's thesis, where he researched predictive elasticity for Cloud applications.
He currently collaborates with the Distributed Systems Group at INESC-ID Lisboa (www.inesc-id.pt), a nonprofit computer science and electronics research institute, where he researches the latest developments in Cloud computing provisioning, elasticity, and scalability.
As a part of his research he developed Vadara, a generic Cloud computing elasticity framework that allows for the development of elasticity strategies that are decoupled from Cloud providers (https://github.com/jfloff/vadara). The foundation of this framework has been the subject of a published work at a top tier Cloud computing conference.
You can read more about him at https://jfloff.github.io.
Robert M. Marks is an experienced software developer and has spent over 12 years of his career working for a variety of software companies, ranging from large companies, such as IBM, to small start-ups. He is passionate about crafting well-tested software using best practices such as TDD, layered design, dependency injection, and so on. He has contributed to various open source projects and was the creator of JOGRE (Java Online Gaming Real-time Engine).
He is currently the head of engineering at Adoreboard, a unique platform that measures how the world feels about your brand so that marketers can make better business decisions. In his work at Adoreboard, he is a key pioneer for the development of real-time scalable architectures using a combination of technologies, including Enterprise Java, Spring Framework, Cloud computing, and NoSQL databases such as MongoDB, Elasticsearch, Solr, and Redis.
Somanath Nanda has spent the past 3 and a half years in the IT industry developing innovative methods to build new products which can fill the gap between human requirements and technology. He is interested in learning new data usage techniques, high-performance computing, and storage-related technologies. He has worked in various Cloud and big data technologies and data analysis mechanisms. His areas of interest include storage mechanisms of data and new algorithms and computational strategies, followed by high-performance, various machine learning, and data science techniques. Previously, he was involved in reviewing AWS Development Essentials, 1st Ed, 2014.
I would like to thank my parents and friends for their support in making this review successful.
Philip O'Toole has developed software and led software development teams for more than 15 years for a variety of applications including embedded software, networking appliances, web services, and SaaS infrastructure. His most recent work with AWS includes having led the infrastructure design and development of Loggly's log analytics SaaS platform, which is entirely hosted in AWS. He is based in the San Francisco Bay Area and can be found online at http://www.philipotoole.com.
Fred Stluka is an avid computer programmer and has been a mentor to hundreds of people over his 30 plus years of professional experience. He is proud to be a Fred
in the very best sense of the word. For more information, see http://bristle.com/~fred/MaximizingTheFredFactor.htm.
He wrote his first book in 1991, http://archive.adaic.com/docs/style-guide/83style/style-t.txt.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
Amazon Web Services (AWS) is arguably the most cutting-edge Cloud provider currently available. In the past, data centers were massive entities that often required days to provide resources for applications. With AWS, this barrier is nonexistent. Applications can be scaled almost instantly. Metrics can be gathered with little or no configuration. Moving into the Cloud, however, might not be easy.
This book will act as a small reference guide, with detailed implementation examples, to show how (and how not) to design your applications in a way that makes them tolerant of underlying hardware failures, resilient against an unexpected influx of data, and easy to manage and replicate. You will be able to see both the benefits and limitations of the current services available to you from the AWS infrastructure.
What this book covers
Chapter 1, Introduction, introduces you to AWS and the problems encountered when deploying and maintaining applications in the Cloud. Problems include upgrading databases, data replication, cache issues, and zero downtime SLAs.
Chapter 2, Basic Patterns, demonstrates some examples of basic patterns such as scaling instances, dynamic disk allocation, and more.
Chapter 3, Patterns for High Availability, demonstrates some examples of patterns for highly available services such as data center replication, floating IP address allocation, health checking, and more.
Chapter 4, Patterns for Processing Static Data, demonstrates some examples of patterns for static data such as cache distribution, direct hosting, web storage hosting, and more.
Chapter 5, Patterns for Processing Dynamic Data, demonstrates some examples of patterns for dynamic data such as state sharing, URL rewriting, rewrite/cache proxying, and more.
Chapter 6, Patterns for Uploading Data, provides some examples of patterns and solutions for object uploading, storage indexing, and write proxying.
Chapter 7, Patterns for Databases, provides some examples of patterns for data replication, in-memory caching, and sharding.
Chapter 8, Patterns for Data Processing, provides some examples of patterns for batch processing issues such as queuing chains, priority queues, and job observers.
Chapter 9, Patterns for Operation and Maintenance, provides some examples of patterns for server swapping, startup settings, backup patterns, and others.
Chapter 10, Patterns for Networking, provides some examples of patterns for multiload balancers, operational and functional firewalls, and on-demand NAT networking.
Chapter 11, Throw-away Environments, is the closing chapter and provides some examples of third-party tools such as CloudFormation, Terraform, and so on, which aid in infrastructure design.
What you need for this book
An Amazon AWS account
A modern web browser such as Chrome, Safari, or Firefox
An SSH client such as Putty
Who this book is for
This book is aimed at architects, solution providers, and those members of the DevOps community who are looking to implement repeatable patterns for deploying and maintaining services in the Amazon Cloud infrastructure. This book could be used by those new to the DevOps movement, as well as those who have embraced the movement and are looking to create reusable patterns. However, prior experience using AWS is required as the book focuses more on the patterns and not on the basics of using AWS.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:Once this volume is available, attach it as /dev/sdb to the instance.
A block of code is set as follows:
en>
utf-8 />
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
echo el_s3_getTemporaryLink('MY_ACCESS_KEY', 'MY_SECRET_KEY', 'a6408e3f-bc3b-4dab-9749-3cb5aa449bf6', 'importantstuff.zip');
Any command-line input or output is written as follows:
[ec2-user@ip-10-203-10-123 ~]$ TEMP_URL=$(curl --silent -X POST -d username=admin&password=legit
http://10.203.10.123/register.php) [ec2-user@ip-10-203-10-123 ~]$ curl -sL -w %{http_code}\\n
$TEMP_URL 200 [ec2-user@ip-10-203-10-123 ~]$ sleep 301 && curl -sL -w %{http_code}\\n
$TEMP_URL 403
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Clicking the Next button moves you to the next screen
.
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any