DEV Community

Lochie
Lochie

Posted on

Notes on Resilient Services

Resilience = a systems capability to withstand errors and faults and the effectiveness at recovering.

Reliability = the measurement of a system ability to behave as expected for a given time interval.

Observability = how well a systems internal states can be inferred from knowledge of its external outputs. A system can be considered observable when it's possible to quickly and consistently ask novel questions about it with minimal prior knowledge.

Detecting and debugging problems is a fundamental requirement if we wish to produce a robust and painless system. Distributed systems are complex and often even locating where a problem is can be time consuming.

The number of possible failure states for any given system is proportional to the product of the number of possible partial and complete failure states of each of its components, and it's impossible to predict them all.

Scaling:

Vertical = Upsize (or downsize) RAM or CPU etc. Technically speaking it's relatively straightforward but a system can only be vertically scaled so much.

Horizontal = Adding (or removing) service instances. For example adding more service nodes behind a load balancer or containers in kubernetes / ECS. More replicas = greater design and management complexity, not all services can be horizontally scaled.

Concurrency is not Parallelism

Parallelism refers to the execution of multiple processes simultaneously. The processes must be executing at the same time, which is impossible on a single processor. Multi core processors allow for parallel execution.

Concurrency refers to the composition of independently executing procedures. This idea is about structuring a set of managed processes to increase performance regardless of executing the processes in parallel.

We can use the ACP (algebra of communicating processes) describe what concurrency might look like. In this framework processes are considered control mechanisms for the manipulation of data.

For more in-depth reading on process algebra:
http://www.few.vu.nl/~wanf/BOOKS/procalg.pdf

Top comments (0)