AWS Cloud Developer: Microservices Design Principles Flashcards

1
Q

Benefits of Microservices

A

Scale
Lean applications that are able to tailor their logic and infrastructure to their specific business needs. More-easily architected for horizontally-scaling.

Development in Parallel
Teams can develop and deploy their own codebases.

Cost Effectiveness
Utilize resources only for what is necessary for the specific microservice.

Flexibility Choose technologies that make the most sense for the team and business.

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

When in doubt about which architecture to use, which one should you choose?

A

monolith

it is much easier to refactor a monolith than what it is to refactor microservices

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

Technical Properties of microservices

A

Communication
Services communicate through a network
REST is currently the most-commonly used network interface

Independently Deployed
Deployment to one service should not affect another

Fault tolerant
Diligence in writing code that can anticipate when another microservice isn’t working

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

Fault Tollerance

A

The ability to continue operating in the event of a failure

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

REST

A

Architectural style of communication across a network

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

Vertical Scaling

A

Scaling by increasing the capacity of existing machines

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

Horizontal Scaling

A

Scaling by adding more machines

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

Alternatives to REST

A
Publish-Subscribe
Queues
gRPC
SOAP
GraphQL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Steps in Refactoring a Monolith

A
  1. Map dependencies using a dependency graph
  2. Start with components that have the least dependencies or downstream effects
  3. Use the strangler patttern to migrate code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

dependency Graph

A

A diagram that maps out the relationships between components to understand which parts of the system rely on the other

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

Module

A

Program that is logically grouped together to execute a specific functionality

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

Strangler Pattern

A

Strategy of refactoring code by incrementally replacing components of the codebase

Incrementally replace specific pieces of functionality with new applications and services.

Create a façade that intercepts requests going to the backend legacy system. The façade routes these requests either to the legacy application or the new services. Existing features can be migrated to the new system gradually, and consumers can continue using the same interface, unaware that any migration has taken place.

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

Technical Debt

A

The concept of choosing an easier implementation of software that will need to be reworked

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

2 important consideration before refactoring architecture

A
  1. Trade-offs: Cost, Time, Technical debt

2. Scope

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

Request/Response Model

A

In the request-response model, a client computer or software requests data or services, and a server computer or software responds to the request by providing the data or service.

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

Publish/Subscribe Model

A

a central source called a broker (also sometimes called a server) receives and distributes all data. Pub-sub clients can publish data to the broker or subscribe to get data from it—or both.

17
Q

gRPC Model

A

In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types.

18
Q

SOAP (formerly an acronym for Simple Object Access Protocol)

A

As an example of what SOAP procedures can do, an application can send a SOAP request to a server that has web services enabled—such as a real-estate price database—with the parameters for a search. The server then returns a SOAP response (an XML-formatted document with the resulting data), e.g., prices, location, features. Since the generated data comes in a standardized machine-parsable format, the requesting application can then integrate it directly.

19
Q

GraphQL Model

A

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

20
Q

When not to use the Strangler pattern?

A

This pattern may not be suitable:

When requests to the back-end system cannot be intercepted.
For smaller systems where the complexity of wholesale replacement is low.