Monoliths and Microservices Flashcards

(51 cards)

1
Q

A monolithic system consists of [multiple/a single] program run by [multiple/a single] process(es).

A

A single, a single

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

Each process in a monolithic system is formed into a collection of modules, that communicate via…

A

Function calls

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

Monolithic systems are easy to implement because we don’t need to deal with…

A

Asynchronous connections and communications

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

Modules in a monolithic system communicate via…

A

Event callbacks and polling

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

Monolithic systems are easy to hire for because…

A

You can look specifically for experts in your given language

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

Monolithic systems are scaled by…

A

Buying a better computer

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

Monolithic systems typically use a [decentralised/centralised] database.

A

Centralised

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

Transactions in a database will either…

A

Commit or abort, there is no half-measure

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

Atomicity is the property of a database transaction that states…

A

A transaction will either fail completely or succeed completely, even if the system fails

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

Consistency is the property of a database transaction that states…

A

The database must always be in a consistent state, meaning that data must be moved correctly and removed data handled accordingly

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

Isolation is the property of a database transaction that states…

A

Transactions cannot see or interact with eachother, performing concurrently as if they were being performed sequentially

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

Durability is the property of a database transaction that states…

A

Once a transaction has succeeded, its effects persist, even if the system fails

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

ACID is an acronym that defines the four desired properties of a database transaction…

A

Atomicity, Consistency, Isolation and Durability

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

In the design of monolithic systems, the statement “you should throw one of these away” means…

A

A team should seek to make their first MVP as fast as possible, because it’s likely to be completely discarded anyway

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

In the design of monolithic systems, Gall’s Law states…

A

A team should seek to make the simplest possible MVP

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

In the design of monolithic systems, You Aren’t Gonna Need It (YAGNI) states…

A

A team should seek to build an MVP that only has the functionality it needs right now

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

In the design of monolithic systems, Conway’s Law states…

A

A team should structure their MVP so that they have a department for each module

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

In the design of monolithic systems, Dogfooding means…

A

You should use your own product regularly, but not exclusively, to gain experience as a customer

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

According to eBay, the best architecture for the starting phase of an enterprise is…

A

Monolithic, using familiar technology, aiming to delete it all in a few years

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

According to eBay, cloud architecture is something you should buy and not build, because…

A

It is faster and cheaper than anything we can build, while also being auto-scalable

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

According to eBay, the best architecture for the scaling phase of an enterprise is…

A

Monolithic, unless we reach the point where we require microservices to function, at which we should switch to microservices

22
Q

How do we know when to switch to microservices? (pick two)

A

When changes made by teams have to be communicated in advance to avoid conflicts, when it takes too long for features to hit the market, when vertical scaling is no longer sufficient

23
Q

According to eBay, incremental changes should be…

A

As small as possible, and large changes should be decomposed into smaller ones

24
Q

According to eBay, the best architecture for the optimizing phase of an enterprise is…

A

The one that is the most stable, making only sustainable, incremental improvements in functionality

25
A microservice system is a system that consists of...
Multiple programs that run as multiple processes
26
Microservice systems communicate by...
Sending messages across a network
27
The most commonly used microservice network protocol is...
Representational State Transfer (REST)
28
Representational State Transfer (REST) is a network protocol that uses the four standard HTTP protocols...
GET, POST, DELETE, PUT
29
Microservices are said to provide resources described by four archetypes...
Document, control, collection and storage
30
The document archetype of microservice represents...
Where a GET operation reads the resource, a PUT operation updates it, and a DELETE operation deletes it
31
The collection archetype of microservice represents...
Where a GET operation lists the resources in the directory, and a POST operation creates a new resource with a system-generated name (i.e. Image(1).tif)
32
The controller archetype of microservice represents...
Where a POST operation causes the resource to carry out some external task
33
The store archetype of microservice represents...
Where a GET operation lists directory resources, and PUT creates a new resource with a given name (i.e. Friends.tif)
34
An enterprise that uses microservices is likely to store its data in a...
Distributed database
35
A distributed database is...
A set of databases connected over a network that are accessed by individual microservices
36
The two-phase commit process involves... (HINT: Three-step process)
A coordinator transaction asking any number of participants to vote on whether or not they are prepared to commit to a change. Then, each participant holds locks on its data until the coordinator decides to commit or abort. We only commit if all participants votes yes, otherwise all participants abort.
37
The saga commit process involves... (HINT: Three-step process)
A coordinator transaction asking each participant to commit or abort in sequence, and each participant holds locks on its data until the coordinator decides. If any participant aborts, the sequence ends, and we perform compensating transactions to undo the work of the previous participants in the sequence.
38
The 'saga' commit process is said to sacrifice [atomicity/confidentiality/isolation/durability] in exchange for [absolute/eventual/failing] consistency.
Atomicity in exchange for eventual consistency
39
A system of microservices is most easily scaled by [vertical/horizontal scaling].
Horizontal
40
Horizontal scaling involves...
Adding machines that can each run one or more microservice instances
41
The number of machines allocated to run one microservice should be...
The same any other microservice in the system
42
The strangler fig design pattern is a method of migrating monoliths to microservices by...
Creating a 'facade' - a microservice that queries the monolith - to act as a proxy between user and monolith, which is then slowly replaced over time with real microservices
43
The 'second system effect' is a consequence of migration that states that...
Small, elegant monolithic systems can tend to become overengineered microservices due to overconfidence
44
The 'two pizza teams' statement is a consequence of migration that states that...
No team should be large enough that two pizzas cannot feed them - microservice teams should be small
45
The 'big ball of mud' effect is a consequence of migration that states that...
Over time, the design of a system may become spaghetti code - then, we should begin migration when the migration code becomes unmanageable
46
The 'technical debt' effect is a consequence of migration that states that...
By coding functionality in a "quick and dirty" fashion, the code becomes increasingly costly to maintain, hence a team should pay down any of this 'debt' when they create the microservice
47
CAP theorem states that a team migrating from a monolithic MVP to a microservice system must choose any two of...
Consistency, availability, partition-tolerance
48
Endpoints should be [smart/dumb], and the pipes should be [smart/dumb].
Smart, dumb
49
A component is something that is...
Replaceable and upgradable
50
The rule for microservice data management is that...
All data should be self-contained, and persist through changes
51
What should be sorted out before going down the microservices route?
Provisioning, monitoring, rapid application development and DevOps