Cloud Native Patterns
Designing change-tolerant software
Cornelia Davis
Foreword by Gene Kim
  • May 2019
  • ISBN 9781617294297
  • 400 pages
  • printed in black & white

This book fills a gap between theory and practice...entertaining and educational.

From the Foreword by Gene Kim, coauthor of The Phoenix Project

Cloud Native Patterns is your guide to developing strong applications that thrive in the dynamic, distributed, virtual world of the cloud. This book presents a mental model for cloud-native applications, along with the patterns, practices, and tooling that set them apart.

Table of Contents detailed table of contents

Part 1: The Cloud-native Context: What are we Designing to? Defined

1 You keep using that word: Defining “cloud-native”

1.1 Today’s application requirements

1.1.1 Zero Downtime

1.1.2 Shortened Feedback Cycles

1.1.3 Mobile and multidevice support

1.1.4 Connected devices—​also known as the Internet of Things

1.1.5 Data-driven

1.2 Introducing cloud-native software

1.2.1 Defining “cloud-native”

1.2.2 A mental model for cloud-native software

1.2.3 Cloud-native software in action

1.3 cloud-native and world peace

1.3.1 Cloud and cloud-native

1.3.2 What isn’t cloud-native

1.3.3 Cloud-native plays nice

Summary

2 Running cloud-native applications in production

2.1 The obstacles

2.1.1 Snowflakes

2.1.2 Risky deployments

2.1.3 Change is the exception

2.1.4 Production instability

2.2 The enablers

2.2.1 Continuous delivery

2.2.2 Repeatability

2.2.3 Safe deployments

2.2.4 Change is the rule

Summary

3 The platform for cloud-native software

3.1 The cloud(-native) platform evolution

3.1.1 It started with cloud

3.1.2 Cloud-native dial tone

3.2 Core tenets of the cloud-native platform

3.2.1 First, let’s talk about containers

3.2.2 Support for “constantly changing”

3.2.3 Support for “highly distributed”

3.3 Who does what?

3.4 More cloud-native platform capabilities

3.4.1 The platform supports the entire SDLC

3.4.2 Security, change-control, compliance (the control functions)

3.4.3 Controlling what goes into the container

3.4.4 Upgrading and patching vulnerabilities

3.4.5 Change control

Summary

Part 2: Cloud-native patterns

4 Event-driven microservices: It’s not just request/response

4.1 We’re (usually) taught imperative programming

4.2 Reintroducing event-driven computing

4.3 My global cookbook

4.3.1 Request/response

4.3.2 Event-driven

4.4 Introducing Command Query Responsibility Segregation

4.5 Different styles, similar challenges

Summary

5 Scale Out and Statelessness

5.1 Cloud-native apps have many instances deployed

5.2 Stateful apps in the cloud

5.2.1 Decomposing the monolith and binding to the database

5.2.2 Poorly handling session state

5.3 HTTP sessions and sticky sessions

5.4 Stateful services and stateless apps

5.4.1 Stateful services are special services

5.4.2 Making apps stateless

Summary

6 Application configuration: Not just environment variables

6.1 Why are we even talking about config?

6.1.1 Dynamic scaling—​increasing and decreasing the number of app instances

6.1.2 Infrastructure changes causing configuration changes

6.1.3 Updating application configuration with zero downtime

6.2 The app’s configuration layer

6.3 Injecting system/environment values

6.3.1 Let’s see this in action: Using ENV variables for configuration

6.4 Injecting application configuration

6.4.1 Introducing the configuration server

6.4.2 Security adds more requirements

6.4.3 Let’s see this in action: Application configuration using a config server

Summary

7 The Application Lifecycle

7.1 Having empathy for operations

7.2 Single-app lifecycle, multiple-instance lifecycles

7.2.1 Blue/green upgrades

7.2.2 Rolling upgrades

7.2.3 Parallel deployments

7.3 Coordinating across different app lifecycles

7.4 Let’s see this in action: Credential rotation and app lifecycle

7.5 Dealing with ephemeral runtime environments

7.6 Visibility of app lifecycle state

7.6.1 Let’s see this in action: Health endpoints and probes

7.7 Serverless

Summary

8 Accessing apps: Ser vices, routing, and ser vice discovery

8.1 The service abstraction

8.1.1 Service example: Googling

8.1.2 Service example: Our blog aggregator

8.2 Dynamic routing

8.2.1 Server-side load balancing

8.2.2 Client-side load balancing

8.2.3 Route freshness

8.3 Service discovery

8.3.1 Service discovery on the web

8.3.2 Service discovery with client-side load-balancing

8.3.3 Service discovery in Kubernetes

8.3.4 Let’s see this in action: Using service discovery

Summary

9 Interaction redundancy: Retries and other control loops

9.1 Request retries

9.1.1 The basic request retry

9.1.2 Let’s see this in action: Simple retries

9.1.3 Retries: what could go wrong?

9.1.4 Creating a retry storm

9.1.5 Let’s see this in action: Creating a retry storm

9.1.6 Avoiding retry storms: Kind clients

9.1.7 Let’s see this in action: being a kinder client

9.1.8 When not to retry

9.2 Fallback logic

9.2.1 Let’s see this in action: Implementing fallback logic

9.3 Control loops

9.3.1 Understanding types of control loops

9.3.2 Controlling the control loop

Summary

10 Fronting ser vices: Circuit breakers and API gateways

10.1 Circuit breakers

10.1.1 The software circuit breaker

10.1.2 Implementing a circuit breaker

10.2 API gateways

10.2.1 The case for API gateways in cloud-native software

10.2.2 API gateway topology

10.3 The service mesh

10.3.1 The sidecar

10.3.2 The control plane

Summary

11 Troubleshooting: Finding the needle in the haystack

11.1 Application logging

11.2 Application metrics

11.2.1 Pulling metrics from cloud-native applications

11.2.2 Pushing metrics from cloud-native applications

11.3 Distributed tracing

11.3.1 Tracer output

11.3.2 Assembling traces via Zipkin

11.3.3 Implementation details

Summary

12 Cloud-native data: Breaking the data monolith

12.1 Every microservice needs a cache

12.2 Moving from request/response to event driven

12.3 The event log

12.3.1 Let’s see this in action: Implementing event-driven microservices

12.3.2 What’s new with topics and queues?

12.3.3 The event payload

12.3.4 Idempotency

12.4 Event sourcing

12.4.1 The journey so far

12.4.2 The source of truth

12.4.3 Let’s see this in action: Implementing event sourcing

12.5 We’re just scratching the surface

Summary

About the Technology

Cloud platforms promise the holy grail: near-zero downtime, infinite scalability, short feedback cycles, fault-tolerance, and cost control. But how do you get there? By applying cloudnative designs, developers can build resilient, easily adaptable, web-scale distributed applications that handle massive user traffic and data loads. Learn these fundamental patterns and practices, and you’ll be ready to thrive in the dynamic, distributed, virtual world of the cloud.

About the book

With 25 years of experience under her belt, Cornelia Davis teaches you the practices and patterns that set cloud-native applications apart. With realistic examples and expert advice for working with apps, data, services, routing, and more, she shows you how to design and build software that functions beautifully on modern cloud platforms. As you read, you will start to appreciate that cloud-native computing is more about the how and why rather than the where.

What's inside

  • The lifecycle of cloud-native apps
  • Cloud-scale configuration management
  • Zero downtime upgrades, versioned services, and parallel deploys
  • Service discovery and dynamic routing
  • Managing interactions between services, including retries and circuit breakers

About the reader

Requires basic software design skills and an ability to read Java or a similar language.

About the author

Cornelia Davis is Vice President of Technology at Pivotal Software. A teacher at heart, she’s spent the last 25 years making good software and great software developers.


combo $49.99 pBook + eBook + liveBook
eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks