Architecture Flashcards

To learn more about and retain architectures I have encountered in my career

1
Q

What is a distributed monolith architecture?

A

It is an anti-pattern in which a monolith is separated into multiple services that are highly dependent and do not adopt the best practices of miscroservices architecture.

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

What is a cell based architecture?

A

Multiple isolated and independent instances of a workload, called a cell, handling a subset of the overall workload.

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

What are the layers of a cell based architecture?

A

Cell router, Cell, and Control plane

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

What is a microservice based architecture?

A

A collection of small autonomous services that work together that are bounded by context, autonomously developed, independently deployable, decentralized and built and released with automated processes.

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

What kind of architecture is diagrammed in the attached image?

A

Cell based architecture

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

What is an example of a distributed monolith architecture?

A

Any instance in which two or more services cannot be deployed in isolation. One cannot be changed without the other also being changed.

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

What is an ETL pipeline?

A

A series of processes in which data is extracted from one or more sources, transformed - usually into a standardized format - and then loaded into a target repository, usually a database or data warehouse.

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

What is the purpose of cell based architecture?

A

Cell based architecture is aimed at predictable scaling and limiting impact of failures.

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

What is an example of a cell based architecture?

A

When the entire production environment is replicated. Or a logical subset.

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

How does a cell based architecture reduce the impact of failures?

A

By isolating failures to a single cell and avoiding single points of failure.

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

How does cell based architecture allow for predicable scaling?

A

By capping each cell to a fixed maximum size.

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

What does SOLID stand for?

A

SOLID stands for:

S - Single-responsibility Principle
O - Open-closed Principle
L - Liskov Substitution Principle
I - Interface Segregation Principle
D - Dependency Inversion Principle

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

What does single responsibility mean?

A

A class should have one and only one reason to change, meaning that a class should have only one job.

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

What is the open closed principle?

A

Objects or entities should be open for extension but closed for modification.

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

What is the liskov substitution principle?

A

Let q(x) be a property provable about objects of x of type T. Then q(y) should be provable for objects y of type S where S is a subtype of T.

This means that every subclass or derived class should be substitutable for their base or parent class.

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

What is interface segregation?

A

A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use.

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

What is the dependency inversion principle?

A

Entities must depend on abstractions, not on concretions. It states that the high-level module must not depend on the low-level module, but they should depend on abstractions.

18
Q

What are the typical building blocks of data intensive applications?

A
  1. Data storage (databases)
  2. Remembering the results of expensive operations to speed up reads. (caching)
  3. Allowing users to filter or search data (search indexes).
  4. Asynchronously send messages to be handled by another process. (stream processing)
  5. Periodically crunch large amounts of data (batch processing)
19
Q

How do you make systems reliable?

A
  1. Designs systems in a way that minimizes opportunities for error.
  2. Decouple the places where people make the most mistakes from the places where they can cause errors.
  3. Test thoroughly.
  4. Allow quick and easy recovery from human error.
  5. Set up clear and detailed monitoring, such as performance metrics and error rates (telemetry).
  6. Implement good management practices.
20
Q

What is scalability?

A

Scalability describes a systems ability to handle increased load.

21
Q

How do you describe load?

A

Through load parameters specific to your system (cache hits, simultaneous people in a chat room, db transactions, requests).

22
Q

Latency vs response time

A

The response time is what the user sees, latency is the duration that a request is waiting to be handled.

23
Q

What’s the best way to measure performance?

A

By using percentiles and a median value.

24
Q

What’s the best way to measure performance?

A

By using percentiles and a median value.

25
Q

How do you express percentiles?

A

P values. For example, p50 is 50th percentile, or the median.

26
Q

What is head of line blocking?

A

When a request takes a long time, preventing subsequent requests from going through.

27
Q

What is tail latency amplification?

A

When users require multiple backend calls thus increasing the proportion of slow end user requests (response times).

28
Q

What is the wrong and right way of aggregating response times?

A

The wrong way is by averaging percentiles (which is mathematically meaningless. The right way is by using a histogram.

29
Q

What is the wrong and right way of aggregating response times?

A

The wrong way is by averaging percentiles (which is mathematically meaningless). The right way is by using a histogram.

30
Q

What three factors influence the maintainability of a system?

A

Operability - make it easy for the operations team to keep the system running smoothly

Simplicity - make it easy to understand the system by removing unnecessary complexity

Elvolvability - make your system extensible and easy to evolve.

31
Q

What is normalization?

A

The process of structuring a data model to reduce data redundancy and improve database integrity.

32
Q

Give an example where document based databases might not perform well.

A

When there are multiple kinds of relationships between data objects and queries to retrieve them:

Many to one relationships are an example of this.

This can be compensated for by denormalization, but this will require additional work to ensure the denormalized data is consistent.

33
Q

What is an example of normalization.

A

Given a field school, with a value string with potential multiple repetitions of the same value, updating the field to a reference integer would be normalizing.

34
Q

What are document databases good at?

A

One to many relationships. Storing huge values of data - having flexible schemas, performing better due to locality, more fidelity to the data model used in the application layer.

35
Q

What are relational databases good at?

A

Better Support for joins, many to one and many to many relationships. Basically, highly interconnected data.

36
Q

What is data locality?

A

Data that’s all in one place as opposed to being dispersed among tables.

37
Q

What performance limitations significantly reduce the set of situations in which document databases are useful?

A

Updated to documents - if the encoded size of the document changes on update, it requires an entire rewrite as opposed to a change in place.

38
Q

What performance limitations significantly reduce the set of situations in which document databases are useful?

A

Updated to documents - if the encoded size of the document changes on update, it requires an entire rewrite as opposed to a change in place.

39
Q

What is an example of resilient routing in AWS?

A

Route 53 as DNS routes requests according to its own routing records - latency based for example - and those end requests end up at in-region load balancers which further distribute load as configured.

40
Q

Application load balancer vs network load balancer

A
  1. 7th layer path based routing, web sockets, and health checks for web apps.
  2. 4th layer tcp routing for low latency IoT applications, gaming serves, db connections