Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Implementing Cloud Design Patterns for AWS. - Second Edition
Implementing Cloud Design Patterns for AWS. - Second Edition

Implementing Cloud Design Patterns for AWS.: Solutions and design ideas for solving system design problems, Second Edition

By Sean Keery , Clive Harber , Marcus Young
S$47.99 S$32.99
Book Apr 2019 274 pages 2nd Edition
eBook
S$47.99 S$32.99
Print
S$59.99
Subscription
Free Trial
eBook
S$47.99 S$32.99
Print
S$59.99
Subscription
Free Trial

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
Buy Now

Product Details


Publication date : Apr 30, 2019
Length 274 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781789136203
Category :
Table of content icon View table of contents Preview book icon Preview Book

Implementing Cloud Design Patterns for AWS. - Second Edition

Chapter 1. Introduction to Amazon Web Services

Welcome to the first chapter of this book, Implementing Cloud Design Patterns for AWS, Second Edition. After a brief history of the development of the cloud and the part that AWS plays in it, we'll look into the Amazon philosophy. An exploration of some of its most well-known customers will give us a platform to dive into the reasons why it's a good choice for your product development effort. We'll survey the service offerings from AWS and create a trial account, which you can use to develop your products.

This chapter will briefly cover the following topics:

  • Introduction to AWS
  • Utility computing
  • Categories of service offerings
  • Benefits of moving to the cloud

 

Introduction to AWS


Amazon—aren't they an online bookstore? This is what someone in the late 1990s might have asked. Nowadays, with nearly 40% of the e-commerce market in the US and over 30% in India, everyone knows who they are. But not so well-known outside of technology circles is Amazon Web Services (AWS). Amazon describes this part of the business as follows:

AWS is a secure cloud services platform (https://aws.amazon.com/what-is-cloud-computing/), offering compute power, database storage, content delivery, and other functionality to help businesses scale and grow. Millions of customers (https://aws.amazon.com/solutions/case-studies/) are currently leveraging AWS cloud products (https://aws.amazon.com/products/) and solutions (https://aws.amazon.com/solutions/) to build sophisticated applications with increased flexibility, scalability, and reliability (https://aws.amazon.com/what-is-aws/).

Amazon is currently the leader in the cloud infrastructure business with 33% market share—about the same as Google Cloud, Azure, and IBM combined. They're using their huge lead, and the profits from it, to invest in new services to further differentiate themselves. Since the publishing of the first edition of this book, they've added hundreds of new offerings. Millions of customers are taking advantage of these services. The initial target market of startups and small businesses has spawned web-scale enterprises such as Netflix, Pinterest, and Airbnb. The Fortune 500 and governments around the world are also on board.

Note

On an annual basis, all of Amazon's operating income derived from AWS in 2017 (https://www.zdnet.com/article/all-of-amazons-2017-operating-income-comes-from-aws/).

History

How we got here provides valuable lessons for building your product and scaling it globally. The retail business is peaky. Amazon needed capacity to meet its highest demand period during Thanksgiving and Black Friday. Come January, it had a whole lot of hardware sitting around, underutilized. Having worked for years providing e-commerce services to partners, they were able to take their internal offerings and make them available to the public. Utility computing was born.

 

This pattern has been repeated many times. Amazon is constantly adding services to tackle new and unique problems that they have encountered within their own business. Those internal services then get previewed and customer feedback is collected. When they meet a certain service level, they're released for use by anyone with a credit card. You need to use this same strategy for your products.

The future

Product-driven development will continue to evolve within the Amazon ecosystem. The benefits that are identified internally will trickle down to all of the AWS cloud users. Newer services will continue to simplify the consumption of complex offerings. Economics of scale will push prices lower while moving resources closer to your customers.

Product

Whether you're developing new features for Amazon or your local football club, or hoping to create the next Netflix, you need to be focused on your product. The patterns in this book have helped people develop and scale their products. Throughout this book, we'll build Minimum Viable Products (MVP) (http://www.startuplessonslearned.com/2009/08/minimum-viable-product-guide.html) on AWS. 

 Amazon will continue to use this pattern to develop new services, and you should too.

Data

The third part of this book looks at persistence. The item we are persisting is data. AWS offers a number of services to help us manage the volume, velocity, and variety of data. Other products will help identify the veracity and value in the flood. In Chapter 11, Data Processing - Handling Your Data Transformation, we'll use another set of tools to predict how our customers are going to react to new features. Continuous experimentation and measurement allow our product to become more successful.

 

Code

AWS also provides a number of open source projects as services (https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-open-source-at-awscontributions-support-and-engagementarc213). This allows them to leverage large active communities for product development and bug hunting. In the case of the AWS Software Development Kit for Python, Boto (https://github.com/boto/boto3), Amazon has taken over the project. We're not going to go into all of the benefits of open source here, but remember that many of the services included in our patterns are available as source code to everyone. 

Coding is going to be an important part of your product, the systems that run it, and the people that use it. We'll be writing code to allow the reuse and modification of our cloud patterns. To get into the spirit of things, we'll be using a cloud-based development tool that was originally written by the open source Mozilla foundation. A group of the developers decided to create a freemium model to provide support for people using their Integrated Development Environment (IDE), Cloud9. Amazon bought the company—another great pattern for applying to your product.

Utility computing

The cloud is an extension of the practice of co-locating hardware at a site away from your company. Historically, you would put your stuff closer to a fast connection in order to get your pages to load more quickly. Amazon stretched the market by allowing you to run your product on their hardware. They further innovated by creating a utility model that lets you pay for only what you need.

Anything as a Service

Obviously, IDE as a service was not the first service offering of AWS, but it fit well with their philosophy of Anything as a Service (often abbreviated as XaaS). By going beyond their initial offering of co-located virtual machines, Amazon has redefined existing infrastructure services. Providing configurable services and software implementations of hardware found in data centers has allowed them to develop complementary products such as load balancing, content delivery networks, and security plus, failover and replication solutions. Extending their internal tools or purchasing synergistic products such as Cloud9 has provided the full stack developer an opportunity to use a well thought out, low cost, pay for use, integrated suite.

 

AWS provides three primary categories of service offerings:

  • Infrastructure as a Service (IaaS)
  • Platform as a Service (PaaS)
  • Software as a Service (SaaS)
Infrastructure as a Service

IaaS can be described as a service that provides virtual abstractions for hardware, servers, and networking components. The service provider owns all of the equipment and is responsible for its housing, running, and maintenance. In this case, AWS provides Application Programming Interfaces (APIs), SDKs, and a web console for creating and modifying virtual machines; their network components; routers; gateways; subnets; load balancers; and much more. Where a user with a physical data center would incur charges for the hardware, power, and connectivity, this is removed by IaaS with a payment model that's per-hour (or per-use). Specific IaaS components will be the building blocks for our product. A discussion of the key pieces will take place in Chapter 2, Core Services - Building Blocks for Your Product.

Platform as a Service

While AWS doesn't provide a full-blown PaaS offering such as Cloud Foundry (https://www.cloudfoundry.org/) at the moment, it has a number of products that can simplify the product development experience. Its broad service catalog can also be used to compose a DIY platform. PaaS is described as the delivery of a computing platform, typically an operating system, programming language execution environment, database, or web server. With AWS, a user can easily turn a code base into a running environment without having to worry about any of the pieces underneath, such as setting up and maintaining the database, web server, or code runtime versions. It also allows your product to be scaled without having to do anything other than set policies through the configuration. We'll survey the services for on-demand expansion in Chapter 3, Availability Patterns - Understanding Your Needs

Software as a Service

The best interpretation for the SaaS model is on-demand software. The user need only configure the software to use and interact with it. The draw to SaaS is that there's no need to learn how to deploy the software to get it working in a larger stack, and generally the charges are per-usage-hour. In the case of AWS, much of the maintenance burden is also removed. 

The AWS suite is both impressive and unique in that it doesn't fall under any one of the cloud service models we described previously. Until AWS made its name, the need to virtualize an entire environment or stack was usually not an easy task and required integration of different providers offerings, each solving a specific part of the deployment puzzle. The cost of using many different providers to create a virtual stack might not be cheaper than the initial hardware cost for moving equipment into a data center. Besides the cost of the providers themselves, having multiple providers also created the problem of scaling in one area and notifying another of the changes. While making applications more resilient and scalable, this Frankenstein method usually did not simplify the problem as a whole.

Cloud continuum

When you build your first MVP for venture capitalists or an internal review board, we recommend you do it fast and focus on the user experience. In most cases, the monolith you create isn't going to be able to achieve web scale. The Cloud-Native Maturity Model is based on the twelve factor design principals. Its focus is on how to run your applications on the cloud: https://pivotal.io/replatforming

AWS supplies all of the services that are needed to launch cloud-native applications. We'll start with a cloud-friendly product, then in Chapter 8Application Virtualization - Using Cloud Native Patterns for Your Workloads, we'll go into great depth. First, let's look at some of the trends driving cloud adoption.

Microservices

In most cases, the monolith you create is not going to be able to achieve web scale. As you break off pieces to refactor, you'll develop smaller services. This allows for the decoupling of components upgrade schedules, which speeds up product development. By adopting the continuous delivery pattern espoused by Jez Humble, you can deploy new features and measure their success quickly. We'll take a peek at these architectures in Chapter 5, Continuous Deployment - Introducing New Features with Minimal Risk. Isolation of your microservices will be the subject of Chapter 4Security - Ensuring the Integrity of Your Systems

By providing easy to use, low cost SaaS options, AWS lets you focus on building software. High value feature development replaces low level toil. In Chapter 6Ephemeral Environments - Sandboxes for Experiments, we'll present patterns that help foster collaboration between developers and operators. AWS composable services empower all team members to participate in the product development they know best.

Crazy new services

Amazon has introduced thousands of services since the introduction of the Elastic Cloud Compute (EC2), their first publicly available multi-tenant virtualization offering.

Note

Hardware virtualization or platform virtualization refers to the creation of a virtual machine (https://en.wikipedia.org/wiki/Virtual_machine) that acts like a real computer with an operating system. 

Most of them are enhancements to their MVP. Many of the services are tucked away in the management console. All of them are constantly monitored to ensure that customers are happy and to identify opportunities for new features. The container and serverless patterns in Chapter 8Application Virtualization - Using Cloud Native Patterns for Your Workloads, promote self-contained service development for your product. Some, such as the Internet of Things (IoT) services, are out of scope for this book.

 

Free trials

If you don't have an AWS account, you can sign up for a free one at https://aws.amazon.com:

 

You'll need a valid email, phone number, and credit card (in case you go over your allotted capacity): 

 

The exercises in this book will use many of the free AWS services. We'll note when there are pay-per-use services that may be a better solution for certain classes of problems.

 

Huge catalog

AWS learned from the Amazon e-commerce team the value of partnerships. Just like you can shop the Crocs store on the parent side, you can rent an in-memory data grid powered by Apache Geode for a few hours through the AWS marketplace. The AWS marketplace provides an avenue where users can purchase or trial third-party images that provide configurable services such as databases and web applications. As a product developer, you can easily add your offerings to the exchange:

In the spirit of competition, a lot of the software in the marketplace offers competition to the AWS native services. Operations engineers may find it easier to move workloads to the cloud by reusing components that they're familiar with, such as F5 load balancers, instead of the AWS Elastic Load Balancers (Chapter 2, Core Services - Building Blocks for Your Product). Other products, such as the trend Micro Deep Security Agent, fill in gaps where AWS doesn't currently have a solution. Partnerships with Microsoft, VMware, and Tableau let you easily migrate internal workloads or extend your data center to the cloud.

 

Software defined, API driven

The adoption of a DevOps culture for your product team provides you with similar cooperation benefits. Getting operations engineers involved in product development helps eliminate hand-offs. Developers being on call for production issues acquaints them with troubleshooting practices and boosts empathy for users. By working together, the product team can establish a clear contact for use. Well-defined APIs are an excellent way to ensure that the contract can be met. AWS publishes extensive documentation for its interfaces, as well as defining service-level objectives for its products.

Benefits of moving to the cloud

For a new product, you should start development in the cloud to take advantage of Amazon's well-thought-out offerings. For existing companies, the AWS suite can handle almost everything a modern data center can while significantly reducing your operating costs. The shift suits small teams but, for mid-sized teams, the effort that's saved begins to outweigh the cost. In larger organizations, AWS can also help you get rid of some of the process bottlenecks that come with a data center. Requesting, provisioning, repairs, and scheduling downtime are all streamlined. There are many different answers to why moving to the cloud might be beneficial. We'll start at mid-sized because this is the size that usually includes the two teams that benefit the most. Let's take a look at our personas:

  • The software engineer
  • The operations engineer
  • The product owner
Software engineer

For a software developer, the ability to share code and delivery tools across teams is critical. AWS gives you the ability to enforce consistency across environments. Different versions of core languages or libraries can be avoided by having uniform templates. Chapter 5, Continuous Deployment - Introducing New Features with Minimal Risk, emphasizes how these good continuous delivery practices in the cloud can lower business risk. Chapter 3, Availability Patterns - Understanding Your Needs, goes deeper on making sure your product is available, while Chapter 4, Security - Ensuring the Integrity of Your Systems, covers how a secure groundwork can be inherited across products and services. We'll lay out how developers can easily build cost-effective products, which can grow as demand intensifies. Data management patterns in Chapter 10Databases - Identifying which Type Fits Your Needs, and Chapter 11Data Processing - Handling Your Data Transformation, will help software engineers understand the trade-offs in architecting their MVPs.

 

The ability to spin up entire environments for testing and simulation in AWS is amazing. Providing developers with their own sandboxes improves their ability to innovate and deliver new features at a high velocity. In the cloud-native world, a single environment can be encapsulated on a single EC2 instance. We'll explore how application virtualization can further improve developer productivity in Chapter 8, Application Virtualization - Using Cloud Native Patterns for Your Workloads.

Operations engineer

Throwaway environments are also be beneficial to the operations teams. In Chapter 6Ephemeral Environments - Sandboxes for Experiments, we'll show you how to take centralized configuration, which describes AWS resources, map them into a dependency graph, and create an entire stack. This flexibility would be nearly impossible in traditional hardware settings and provides an on-demand mentality—not just for the base application, but also for the entire infrastructure, leading to a more agile core. 

The operations team's responsibility differs greatly from company to company, but it's safe to assume that the team is heavily involved with monitoring the applications and systems for issues and possible optimizations. AWS provides enough infrastructure for monitoring and acting on metrics, and an entire book could be dedicated to the topic. For an operations team, the benefit of moving to Amazon might justify itself only to alleviate all of the work involved in duplicating this functionality elsewhere, allowing the team to focus on creating deeper and more meaningful system health checks. There will be more coverage of operations in Chapter 7, Operation and Maintenance - Keeping Things Running at Peak Performance, while observability will be addressed in Chapter 12Observability - Understanding How Your Products Are Behaving.

Product owner

As a product owner, the low cost of entry into very complex technology is a huge win. Chapter 3, Availability Patterns - Understanding Your Needs, will analyze the cost benefits of using AWS to provide global availability. The ability to move from hourly pricing to longer term subscriptions will give you a good baseline for product operating expenses. Avoiding inferior and counterproductive solutions will be the topic of Chapter 9, Antipatterns - Avoiding Counterproductive Solutions, and Chapter 13Anti-Patterns - Bypassing Inferior Options. The shared responsibility model AWS provides will be explored in Chapter 4, Security - Ensuring the Integrity of Your Systems. By inheriting industry standard security controls, you can concentrate on user-centric product aspects.

 

Letting AWS manage the services at scale lets you avoid investing in dedicated support staff. Amazon has also adopted the freemium pattern for their own support. Start small and expand if you need more help:

Summary


Throughout this brief introduction to AWS, we learned not only about the background and industry shift that started the movement into utility computing, but also where AWS fits into it. We touched on the kinds of problems AWS can solve and where its services are competitive. There are countless unique processes to be solved with this ever-growing environment. Picking up consistent patterns throughout this book will help you strengthen products of many forms and protect against risk. In the following chapters, we'll go over some of the core services that are used to create basic design patterns. These patterns will be used to deliver more complex architectures using DevOps and data best practices in the DevOps Patterns and Persistence Patterns sections.

 

Further reading


A crash course in virtualization is available here: https://www.packtpub.com/application-development/introduction-virtualization-one-hour-crash-course-video.

An in-depth overview of the different cloud service models can be found in the following video: https://www.packtpub.com/virtualization-and-cloud/learn-cloud-computing-scratch-video.

Left arrow icon Right arrow icon

Key benefits

  • Build highly robust systems using the cloud infrastructure
  • Make web applications resilient against scheduled and accidental downtime
  • Explore and apply Amazon-provided services in unique ways to solve common design problems

Description

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.

What you will learn

Implement scaling policies on schedules, influxes in traffic, and deep health checks Make complete use of highly available and redundant storage Design content delivery networks to improve user experience Optimize databases through caching and sharding Apply patterns to solve common problems Implement repeatable processes for deploying systems

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
Buy Now

Product Details


Publication date : Apr 30, 2019
Length 274 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781789136203
Category :

Table of Contents

20 Chapters
Title Page Chevron down icon Chevron up icon
Dedication Chevron down icon Chevron up icon
About Packt Chevron down icon Chevron up icon
Contributors Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. Introduction to Amazon Web Services Chevron down icon Chevron up icon
2. Core Services - Building Blocks for Your Product Chevron down icon Chevron up icon
3. Availability Patterns - Understanding Your Needs Chevron down icon Chevron up icon
4. Security - Ensuring the Integrity of Your Systems Chevron down icon Chevron up icon
5. Continuous Deployment - Introducing New Features with Minimal Risk Chevron down icon Chevron up icon
6. Ephemeral Environments - Sandboxes for Experiments Chevron down icon Chevron up icon
7. Operation and Maintenance - Keeping Things Running at Peak Performance Chevron down icon Chevron up icon
8. Application Virtualization - Using Cloud Native Patterns for Your Workloads Chevron down icon Chevron up icon
9. Antipatterns - Avoiding Counterproductive Solutions Chevron down icon Chevron up icon
10. Databases - Identifying Which Type Fits Your Needs Chevron down icon Chevron up icon
11. Data Processing - Handling Your Data Transformation Chevron down icon Chevron up icon
12. Observability - Understanding How Your Products Are Behaving Chevron down icon Chevron up icon
13. Anti-Patterns - Bypassing Inferior Options Chevron down icon Chevron up icon
1. Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
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.