Design Patterns for Cloud Native Applications Flashcards

1
Q

What are the characteristics of Cloud Native Applications?

A
  • They consist of independent loosely coupled services. They are autonomously developed, deployed, and scaled independently
  • They run on dynamic environments(public, private, hybrid, poly cloud)
  • They are Observable, Resilient, Scaleable, Manageable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the characteristics of a Microservice architecture?

A

A collection of loosely coupled services that achieve business value. These services are developed, scaled, deployed independently

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do microservices communicate

A

They communicate over a light weight interservice communication. The pipes are considered dumb but the endpoints are are considered smart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do Microservices execute as a cloud native application

A

They are packaged and executed as containers running on a container host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the characteristics of a container?

A
  • It’s a running process that’s isolated from the host OS and other running processes in the system
  • It interacts with it’s own private filesystem
  • It shares the host OS with other containers and are much lighter weight then VM’s
  • Are independent portable and have execution consistency across multiple environments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a container image?

A

It’s a binary that consists of everything you need to run an application:

  • code
  • dependencies
  • runtime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are containers stored?

A
  • In a container registry
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the key features of a container orchestration system

A
  • Automatic provisioning - takes care of provisioning container instances and deployment of containers
  • High availability - auto provision container if other’s fail
  • Scaling - based on demand automatically add/remove container instances
  • Resource Management -
  • Service interfaces and Load balancing - exposes containers to external systems and manages the load coming into containers
  • Network interface abstractions
  • Service discovery - name based discover is build in
  • Control plane - a single place to manage an monitor
  • Afinity - provision containers near or far away depending on availability and performancy needs
  • rolling upgrades - coordinates upgrades for zero downtime
  • Componentization & isolation - logical separations between application domains
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does automation mean in the context of cloud native applications?

A

Automating the manual tasks of the development lifecycle

  • running integration tests
  • builds
  • releases
  • configuration management
  • infrastructure management
  • continuous integration and continuos delivery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between continuous delivery and continuous deployment?

A

With continuous delivery manual approval is needed to move to production

With continuous deployment the update to production happens automatically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a managed service/API

A

An API exposed through a gateway and a managment plane

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the responsibilities of a managed Service API?

A
  • Security
  • Monetization
  • Throttling
  • Caching
  • Versioning
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the context of developing an application how does an independent code base help?

A
  • Lifecycle of the service can be completely independent from the rest of the system
  • Able to explicitly import external dependencies and shouldn’t rely on any undeclared system wide dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In the context of developing an application - what is the purpose of decoupled configuration

A
  • The codebase of the service is environment agnostic
  • The application run in multiple environments(e.g., dev, test, prod) without change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In the context of developing an application - what is the purpose of independent testing

A
  • To have specific unit tests for the service to ensure it works
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In the context of developing an application how does containerization help?

A
  • Support for packaging up the service with runtimes(e.g. .Net Core, Python), dependencies(3rd party packages) and configuration is provided by containers
17
Q

What are the key characteristics of the Request Response pattern

A
  • Client sends a request and waits for a response
  • Business logic of the client is blocked until a response is received or the max time to wait is exceeded
  • Communication channel needs to be kept open until response is received
18
Q

What is the most common messaging pattern used for comms between services in a cloud native environment

A

Request/Response

19
Q

What are the common patterns are used in conjunction with Request/Response pattern

A
  • Service Orchestration and API gateway
  • Request/Reply - use an intermediary to implement similar style of communication using a queue
20
Q

What are the synchronous message patterns

A
  • Request/Response
  • Remote Procedure Calls - services exposes business logic as a method and it’s invoked remotely by a consumer the resides in a different process
21
Q

When is the RPC messaging pattern commonly used?

A
  • For internal(not public facing) inter-service communication
22
Q

When is the RPC messaging pattern not commonly used?

A
  • When exposing public interface that needs to be used by web/mobile clients
23
Q

When to use the request/response pattern in a microservice

A
  • Services need real-time response
  • Need to interoperate with many different consumers
  • Service contracts need to be flexible
  • Services are exposed to external consumers
24
Q

When should the request/response pattern not be used by a microservice?

A
  • Low latency and high throughput communication is required
  • Strict contract first interactions are required.
25
Q

Asynchronous Messaging

What are key characteristics of the Async Messaging pattern?

A
  • sender of a message doesn’t expect a response to the request message
  • communication is facilitated with a message/event broker
  • consumers of a message interact with message/event broken
    *
26
Q

Asynchronous Messaging

What category of patterns does Single-Receiver fall in?

A
  • Async Messaging
27
Q

Asynchronous Messaging

What are the key characteristics of the Single-Receiver pattern

A
  • Service delivers messages to one target service
  • Messages are usually commands
  • Message producer only cares that the message was delivered to the queue successfully
  • Message producer doesn’t care if the message was processed by the target
28
Q

Asynchronous Messaging

What category of patterns does Single-Receiver fall in?

A
  • Async Messaging
29
Q

Asynchronous Messaging

What is the most widely used queuing protocol implemented by message brokers

A
  • AMQP - Asynchronous message queuing protocol