While system design questions aren’t really tests of what you need to recognize, certain concepts can make things easier. In this shot, we will look at a brief overview. These are complex topics, so I encourage you to check out the following Educative courses for a more in-depth understanding:
A system can be defined in one of two ways:
Vertical scaling is simpler than horizontal scaling, but it’s
. limited you can only add limited memory or disc space
Typically, some front-end parts of a scalable website are going to be thrown behind a load balancer. A load balancer allows a system to equally distribute the load so that, if one server crashes, it won’t shut down the whole system. To do this, of course, you have to hold out a network of cloned servers that all have the same code and access to the same data.
The join operation performed in SQL can get very slow as the system grows bigger. For this reason, you should generally avoid them.
Sharding means splitting information across multiple machines, while making sure that you know which data is on which machine. A few common ways of partitioning are:
An in-memory cache can deliver very rapid results – it’s an easy key-value pairing and typically sits between your application and your data store.
When an application requests a bit of data, it will try the cache first. If the cache doesn’t contain the key, it will search the information within the data store. Once you cache, you would cache a question and its results directly or specific objects.
Ideally, slow operations will be done asynchronously. Otherwise, a user might grind to a halt while waiting and expecting a process to finish. In some cases, you would do that beforehand (i.e., pre-process), but in other cases, we’d tell the user to attend and notify them when the method is completed. You’ve probably seen this on websites before.
Some of the foremost important metrics around networking include:
Bandwidth: This is often the largest amount of knowledge that will be transferred during a unit of your time. Bandwidth is typically expressed in bits per second (or gigabytes per second).
Throughput: While bandwidth is the maximum data that will be transferred during a unit of your time, throughput is the amount of knowledge that is actually transferred.
Latency:. How long it takes data to travel from one end to the opposite end. That is, latency is the delay between the sender sending information (even a really small chunk of data) and the receiver receiving it.
View all Courses