System Designs Fundamentals Flashcards
What is a client?
A machine or process that requests data or service from a service.
Note that a single machine can be either a client or a server
What is a Server?
A machine or process that provides data or service from for a client, usually by listening to incoming network calls
What is an IP address?
An address given to a machine connected to the public internet. Ipv4 addresses consists of four numbers separated by dots a.b.c.d where all four numbers are between 0-255.
- 0.0.1 - localhost
- 168.x.y - your private network
What is IP?
Internet protocol. This network protocol outlines how almost all machine-to-machine communications should happen in the world. Other protocols like TCP, UDP, and HTTP are built on top of IP
What is TCP?
Network protocol built on top of IP. Allows for ordered, reliable data delivery between machines over the public internet by creating a connection.
TCP is usually implemented at kernel level, which exposes sockets to applications that they can use to stream data through an open connection
What is HTTP?
The hypertext transfer Protocol is a very common network protocol implemented on top of TCP. Clients make HTTP requests and servers respond with a response.
They usually have the following esquema. Host, Port, method (GET,POST..), headers, body
What is latency?
The time that takes for a certain operation to complete in a system. Most often this measure is a time duration, like milliseconds or seconds.
What is throughput?
The numbers of operations that a system can handle properly per time unit. For ex. the throughput of a server can often be measured in requests per second (RPS or QPS)
What is availability?
The odds of a particular service being up and running at any point in time, usually measured in percentage. A server that has 99% availability will be operational 99% of the time (having two nines availability)
What is High availability?
Describe systems that have at least 5 nines or more of availability 99,999%
What is redundancy?
Process of replicating parts of a system in effort to make it more reliable
What is SLA/SLO?
SLA is short of service level agreement, SLA is a collection of guarantees given to a customer by a service provider. SLAs typically make guarantees on a system availability. SLAs are made up of one or more SLO.
SLO is service level objective
What are some types of cache Eviction Policy?
FIFO, LRU (least recently used), LFU (least frequently used)
What is Content Delivery Network?
a CDN is a third-party service that acts like a cache for your servers. Sometimes web apps can be slow for users in a particular region. CDN has servers all around the world meaning that the latency o a CDNs service will be always better than to your servers. Most populars CDN are Cloudflare and Google Cloud CDN
What is forward proxy?
A server that sits between a client and servers and acts on the behalf of the CLIENT, typically to mask the client’s identity (IP address).
What is a reverse Proxy?
A server that sits between the client and servers and acts on the behalf of the SERVER, typically for logging, load balancing or caching.