Distributed Systems Flashcards

1
Q

What is the difference between an application and a system?

A

Application is standalone (e.g ms words) and program is connected to something - has multiple pieces, e.g browser, static file server, backend, db and etc.

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

Is “The network is reliable” statement a fallacy? How to handle a HttpTimeoutException? What not to do?

A

Yes. Retry. Dot not simply log or show the error to the user (so he has to figure it out).

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

What is the problem of using a message queue?

A

It is asynchronous (not as simple as a request-response model).

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

Why distributing objects is a bad idea (martin fowler example)?

A

Because if you need more than one object from different services/systems to solve a single issue then probably you designed your services wrongly.

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

Is “Latency isn’t a problem” (==0) statement a fallacy? Why? How to solve it?

A

Yes. Distributed systems tend to do remote calls, the remote calls has round trips, the order of magnitude of processing something locally vs in a distributed manner is much higher.

Avoid network calls. If you have to cross the network, do it once, asking for the whole data you might need (DTO).

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

What is the difference between DTO and an object itself?

A

DTO were created to avoid multiple remote calls to retrieve pieces of the DTO itself (which are objects). Instead we call the server once, and the server sends all the data the client need.

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

Is “Bandwidth isn’t a problem” a fallacy? Why? How to solve it?

A

Yes. Because the network relatively evolved evolved a little if compared to CPU, MEM and DISK. Therefore, gigabit networks are getting slower and slower overtime.

Solve by moving time-critical stuff to different network (decompose your service accordingly).

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

Why bandwidth and latency are two conflicting forces? What does it mean?

A

The more network calls the higher the latency, the less network calls the higher the bandwidth is consumed. Means that we should not do too many round trips, nor sending petabytes of data at once, but find a balance.

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

Is “Network is secure” a fallacy? Can it be solved?

A

Yes. Social engineering usually is used to get access to a system or a network (even physical computers connected to a network).

Cannot be solved, only mitigated. Threat-model analysis will define the biggest risks that worth to be fixed.

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

Is “The topology won’t change” a fallacy?

A

Yes. Hard-code address is a problem since servers can move around (to another IPs or even networks). To solve that use configurable IP addresses, use DNS… the system should be able to respond in a timely manner when a server is rebooting (async on client/server, retries etc).

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

Is “The admin will know what to do” a fallacy?

A

Yes. The people that administer the system don’t know everything about the system. As a solution: consider pinpoint problems in prod (logs), consider multiple versions running in parallel, enable the admin to take parts of the system down for maintenance (cache last working state of a dependency, for example).

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

What happens if you add too many configs? Will the sysadmin know how the system will behave with every single combination? Will someone know?

A

The system become much more complex overtime. Nor the sys-admin, nor the developers will know every single possible configuration state.

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

What happens if you can upgrade without downtime and side effects? Does backwards compatibility useful here?

A

Then we can deploy frequently… backwards compatibility is very importante, since some replicas might be running in newer versions and other running in older versions.

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

Is “Transport cost isn’t a problem” a fallacy?

A

Yes. In the cloud it can be a big cost (has to do with distributed objects problem as well…). Fallback links, just a cellular or satellite is much more expensive and sometimes is not financially feasible.

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

Is “The network is homogeneous” a fallacy?

A

Yes. More and more we have different language, protocols and technologies exchanging information. There’s no solution for that… you just have to take into account that the system is going to talk to different technologies.

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