Skip to content

Instantly share code, notes, and snippets.

@rcanepa
Last active November 27, 2017 02:07
Show Gist options
  • Save rcanepa/b73cf9eb2cad17dbec449aabd74560d8 to your computer and use it in GitHub Desktop.
Save rcanepa/b73cf9eb2cad17dbec449aabd74560d8 to your computer and use it in GitHub Desktop.
System Design

System Design

Summary

A strong process is crucial to successfully solving system design questions. We broke it down into four steps:

  • Scope the problem: Don't make assumptions; Ask questions; Understand the constraints and use cases.
  • Sketch up an abstract design that illustrates the basic components of the system and the relationships between them.
  • Think about the bottlenecks these components face when the system scales.
  • Address these bottlenecks by using the fundamentals principles of scalable system design.

The fallacies of distributed systems

The fallacies are:

  • The network is reliable.
  • Latency is zero.
  • Bandwidth is infinite.
  • The network is secure.
  • Topology doesn't change.
  • There is one administrator.
  • Transport cost is zero.
  • The network is homogeneous.

The effects of the fallacies:

  • Software applications are written with little error-handling on networking errors. During a network outage, such applications may stall or infinitely wait for an answer packet, permanently consuming memory or other resources. When the failed network becomes available, those applications may also fail to retry any stalled operations or require a (manual) restart.
  • Ignorance of network latency, and of the packet loss it can cause, induces application- and transport-layer developers to allow unbounded traffic, greatly increasing dropped packets and wasting bandwidth.
  • Ignorance of bandwidth limits on the part of traffic senders can result in bottlenecks over frequency-multiplexed media.
  • Complacency regarding network security results in being blindsided by malicious users and programs that continually adapt to security measures.[2]
  • Changes in network topology can have effects on both bandwidth and latency issues, and therefore similar problems.
  • Multiple administrators, as with subnets for rival companies, may institute conflicting policies of which senders of network traffic must be aware in order to complete their desired paths.
  • The "hidden" costs of building and maintaining a network or subnet are non-negligible and must consequently be noted in budgets to avoid vast shortfalls.
  • If a system assumes a homogeneous network, then it can lead to the same problems that result from the first three fallacies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment