Infrastructure Crash Course
Overview
| Lesson | Prerequisites | Key Terms |
|---|---|---|
| Lesson 2: What Is A Network? | Protocol | Network, Data Link |
| Lesson 3: How The Internet Works | TCP, Port, IP | Client, Server, ISP, Client Server Model, HTTP, HTTPS, DNS, IP Address |
| Lesson 4: Network Latency | ISP | Latency, Throughput, Round Trip Time, Bandwidth |
| Lesson 5: Caching | Cache Hit, Cache Miss, Cache Eviction Policy | Cache |
| Lesson 6: Network Layers | Ethernet, TCP, TCP Connection, IP Address, MAC Address, LLC | OSI Model, TCP/IP Model |
| Lesson 7: OSI Model | OSI Model | - |
| Lesson 8: TCP/IP Model | Encapsulation, Decapsulation, Private IP, Public IP, IP, HTTP, HTTPS, Firewall | Three Way Handshake, IPV4, IPV6, Dual Stacking, Tunneling, Switches, Bit, Frames, Segment, Ping, Simple Mail Transfer Protocol, File Transfer Protocol, Address Resolution Protocol, Internet Control Message Protocol |
| Lesson 9: Transport Protocols | Stateful, Stateless, Fragment, Byte, Metadata, Ethernet Frame, Header, Firewall, Congestion Control | Data Payload, IP Datagram, MSS Value, PPP, Check Sum, Sequence Number, Cryptographic Hash Function |
| Lesson 10: Routing | Network, Protocol | Maximum Transmission Unit, Round Trip Time, Hops |
| Lesson 11: Troubleshooting | Timeout | IP Config, NS Lookup |
| Lesson 12: Operating Systems | Operating System, Hardware Peripherals, Random Access Memory, Git, Queue, Disk | Fork, Exec, System Call, Block Size, Kernel, Kernel Mode, User Mode, Virtual Memory, Scheduling, Batch processing, MMU |
| Lesson 13: Processes And Threads | Central Processing Unit, Stack, Heap, LIFO, Pointer, Memory, OS Memory Manager | Processes, Threads, Concurrency, Multiprocessing, Parallel Processing, PCB, Register |
| Lesson 14: Locks And Concurrency Issues | - | Locks, Deadlock, Livelock, Critical Section, Race Condition, Starvation, Mutual Exclusion, Circular Wait, No Preemption |
| Lesson 15: Scheduling And Context Switching | CPU Burst, IO Burst, Queue | Context Switching, Dispatcher, Scheduler, PCB, Preemptive Scheduling, Non Preemptive Scheduling |
| Lesson 16: Unix/Linux Systems | Operating System | Linux, Linux Directories |
| Lesson 17: Virtual Machines | Host, Guest, Bare Metal | Virtual Machines, Hypervisor |
| Lesson 18: Containers | Git, YAML, Microservices | Containers |
| Lesson 19: Docker And Kubernetes | Load Balancer, Inheritance, Sandbox | Docker, Dockerfile, Docker Compose, Kubernetes, Kubernetes Cluster, Kubelet, Pods, Nodes |
| Lesson 20: Microservices | - | Microservice, Monolith |
| Lesson 21: Databases | - | Database, Redis, Postgres |
| Lesson 22: Relational Databases | - | Relational Database, CRUD, SQL, SQL Database, Database Index, ACID Transaction, Postgres |
| Lesson 23: Non-Relational Databases | - | NoSQL Database, Graph Database, JSON, Key Value Store, Mongo DB |
| Lesson 24: Migration And Provider Solutions | Monitoring | Nines, SLO, SLA |
| Lesson 25: Cloud Architecture | API | SAAS, PAAS, IAAS, FAAS |
| Lesson 26: Cloud Storage | Redundancy, Availability, SSL, TLS, Authentication, Authorization | Blob Storage, File Storage, NAS, DAS, S3 Buckets, DAS |
| Lesson 27: Cloud Compute And Serverless | Stateful, Stateless, Publish Subscribe Pattern, Asynchronous, Synchronous | Memory Optimized Instances, Memory Ballooning, Dedicated Host, Dedicated Server, Shared Host, Cloud Pub Sub |
| Lesson 28: Cloud Networking | Segment, Firewall | VPC, VLAN, Default Gateway, DMZ, Gateway |
| Lesson 29: Cloud Security And IAM | Private Key, Hardening, Asymmetric Encryption, Symmetric Encryption, SSL Certificate | Block Cipher, Stream Cipher, ACL, PKI |
Lesson 2: What Is A Network?
Prerequisites
Protocol
A protocol is a set of rules for formatting and processing data. Network protocols are like a common language for computers. The computers within a network may use vastly different software and hardware; however, the use of protocols enables them to communicate with each other regardless.
Key Terms
Network
A network consists of two or more computers that are linked in order to share resources (such as printers and CDs), exchange files, or allow electronic communications. The computers on a network may be linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
Data Link
A data link is the term used to describe the connection between two systems in order for them to share information. A wired data link is a communication method that sends information over wires or cables. The variations of this type of connection are twisted pair cables, coaxial cables, fiber-optic cables, and ethernet over copper.
Lesson 3: How The Internet Works
Prerequisites
TCP
Network protocol built on top of the Internet Protocol (IP). Allows for ordered, reliable data delivery between machines over the public internet by creating a connection .
TCP is usually implemented in the kernel, which exposes sockets to applications that they can use to stream data through an open connection.
Port
In order for multiple programs to listen for new network connections on the same machine without colliding, they pick a port to listen on. A port is an integer between 0 and 65,535 (2 16 ports total).
Typically, ports 0-1023 are reserved for system ports (also called well-known ports) and shouldn’t be used by user-level processes. Certain ports have pre-defined uses, and although you usually won’t be required to have them memorized, they can sometimes come in handy. Below are some examples:
IP
Stands for 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.
Key Terms
Client
A machine or process that requests data or service from a server.
Note that a single machine or piece of software can be both a client and a server at the same time. For instance, a single machine could act as a server for end users and as a client for a database.
Server
A machine or process that provides data or service for a client, usually by listening for incoming network calls.
Note that a single machine or piece of software can be both a client and a server at the same time. For instance, a single machine could act as a server for end users and as a client for a database.
ISP
An Internet service provider , provides services for accessing, using, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, non-profit, or otherwise privately owned. The two main types of ISPs are cable or DSL.
Client Server Model
The paradigm by which modern systems are designed, which consists of clients requesting data or service from servers and servers providing data or service to clients.
HTTP
The H yper T ext T ransfer P rotocol is a very common network protocol implemented on top of TCP. Clients make HTTP requests, and servers respond with a response.
Requests typically have the following schema: host: string (example: algoexpert.io) port: integer (example: 80 or 443) method: string (example: GET, PUT, POST, DELETE, OPTIONS or PATCH) headers: pair list (example: “Content-Type” => “application/json”) body: opaque sequence of bytes
Responses typically have the following schema: status code: integer (example: 200, 401) headers: pair list (example: “Content-Length” => 1238) body: opaque sequence of bytes
HTTPS
The H yper T ext T ransfer P rotocol S ecure is an extension of HTTP that’s used for secure communication online. It requires servers to have trusted certificates (usually SSL certificates ) and uses the Transport Layer Security ( TLS ), a security protocol built on top of TCP , to encrypt data communicated between a client and a server.
DNS
Short for Domain Name System, it describes the entities and protocols involved in the translation from domain names to IP Addresses. Typically, machines make a DNS query to a well known entity which is responsible for returning the IP address (or multiple ones) of the requested domain name in the response.
IP Address
An address given to each machine connected to the public internet. IPv4 addresses consist of four numbers separated by dots: a.b.c.d where all four numbers are between 0 and 255. Special values include:
Lesson 4: Network Latency
Prerequisites
ISP
An Internet service provider , provides services for accessing, using, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, non-profit, or otherwise privately owned. The two main types of ISPs are cable or DSL.
Key Terms
Latency
The time it takes for a certain operation to complete in a system. Most often this measure is a time duration, like milliseconds or seconds. You should know these orders of magnitude:
Throughput
The number of operations that a system can handle properly per time unit. For instance the throughput of a server can often be measured in requests per second (RPS or QPS).
Round Trip Time
Round trip time (RTT) is the measure (in milliseconds) of the latency of a network X 2- that is, the time between initiating a network request (a signal to be sent) plus the amount of time it takes for acknowledgement of that signal having been received (receiving a response). This time delay includes propagation times for the paths between the two endpoints. Simply put, it refers to the time taken by a network request to reach a destination and to revert back to the original source. RTT is a crucial tool in determining the health of a network and can be analysed and determined by pinging a certain address.
Bandwidth
The maximum amount of data transmitted over an internet connection in a given amount of time- calculated in megabits per second (Mbps). Note that bandwidth measures volume not speed.
Lesson 5: Caching
Prerequisites
Cache Hit
When requested data is found in a cache.
Cache Miss
When requested data could have been found in a cache but isn’t. This is typically used to refer to a negative consequence of a system failure or of a poor design choice. For example:
If a server goes down, our load balancer will have to forward requests to a new server, which will result in cache misses.
Cache Eviction Policy
The policy by which values get evicted or removed from a cache. Popular cache eviction policies include LRU (least-recently used), FIFO (first in first out), and LFU (least-frequently used).
Key Terms
Cache
A piece of hardware or software that stores data, typically meant to retrieve that data faster than otherwise.
Caches are often used to store responses to network requests as well as results of computationally-long operations.
Note that data in a cache can become stale if the main source of truth for that data (i.e., the main database behind the cache) gets updated and the cache doesn’t.
Lesson 6: Network Layers
Prerequisites
Ethernet
Ethernet is the traditional technology for connecting devices in a wired local area network (LAN) or wide area network (WAN). It enables devices to communicate with each other via a protocol, which is a set of rules or common network language.
TCP
Network protocol built on top of the Internet Protocol (IP). Allows for ordered, reliable data delivery between machines over the public internet by creating a connection .
TCP is usually implemented in the kernel, which exposes sockets to applications that they can use to stream data through an open connection.
TCP Connection
Transmission Control Protocol (TCP) is a connection-oriented communications protocol that facilitates the exchange of messages between computing devices in a network. It is the most common protocol in networks that use the Internet Protocol (IP), together they are sometimes referred to as TCP/IP.
IP Address
An address given to each machine connected to the public internet. IPv4 addresses consist of four numbers separated by dots: a.b.c.d where all four numbers are between 0 and 255. Special values include:
MAC Address
MAC Address (Media Access Control Address) is a unique identifier assigned to a network interface card (NIC) or other network hardware devices. It is a 48-bit (6-byte) hexadecimal number, typically represented in the format XX:XX:XX:XX:XX:XX, where each pair of characters represents an octet (8 bits). MAC addresses are used at the Data Link Layer (Layer 2) of the OSI Model to enable communication between devices on the same network segment. They ensure that data packets are delivered to the correct destination hardware within a local area network (LAN), enabling devices to distinguish one another at the physical level.
LLC
LLC (Logical Link Control) is a sublayer of the Data Link Layer (Layer 2) in the OSI Model, responsible for managing communication between network devices. The LLC sublayer provides a common interface for various Data Link Layer protocols and allows multiple higher-layer protocols to coexist on the same link. It is responsible for error and flow control, as well as multiplexing and demultiplexing data streams from different sources. The LLC sublayer uses Service Access Points (SAPs) to identify the type of protocol being transmitted and to provide a communication path between the higher-level network protocols and the lower-level MAC sublayer.
Key Terms
OSI Model
OSI Model (Open Systems Interconnection Model) is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers. This model was developed by the International Organization for Standardization (ISO) to facilitate communication between different systems and protocols. Each layer performs a specific function in the process of transmitting data between network devices, providing a modular approach to understanding network communication. The seven layers of the OSI Model are:
TCP/IP Model
The TCP/IP model is a conceptual framework for understanding and describing how data communications take place between computing systems in the Internet. TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect network devices on the internet. TCP/IP is also used as a communications protocol in a private computer network (an intranet or extranet). It is composed of four layers, each representing a different aspect of the communication process. The layers are: network access, internet, transport, and application. The TCP/IP model provides a standard for communication protocols and allows different systems to communicate with each other over the Internet. The four layers of the TCP/IP Model are:
Lesson 7: OSI Model
Prerequisites
OSI Model
OSI Model (Open Systems Interconnection Model) is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers. This model was developed by the International Organization for Standardization (ISO) to facilitate communication between different systems and protocols. Each layer performs a specific function in the process of transmitting data between network devices, providing a modular approach to understanding network communication. The seven layers of the OSI Model are:
Lesson 8: TCP/IP Model
Prerequisites
Encapsulation
Encapsulation is the process of adding additional information when data is traveling in TCP/IP model. When data moves from upper layer to lower layer of TCP/IP protocol stack, during an outgoing transmission, each layer includes a bundle of relevant information called “header” along with the actual data.
Decapsulation
Decapsulation is the process of opening up encapsulated data that are usually sent in the form of packets over a communication network. It can be literally defined as the process of opening a capsule, which, in this case, refers to encapsulated or wrapped-up data.
Private IP
A private IP address is a range of non-internet facing IP addresses used in an internal network. Private IP addresses are provided by network devices, such as routers, using network address translation. If you want to find the IP of a device you’re connected to, you can use the “netstat -an” command in the terminal.
Public IP
A public IP address is an IP address that your home or business router receives from your ISP and it’s used when you access the internet. Public IP addresses are required for any publicly accessible network hardware such as a home router and the servers that host websites. You can find you public IP address by typing what is my IP on google.
IP
Stands for 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.
HTTP
The H yper T ext T ransfer P rotocol is a very common network protocol implemented on top of TCP. Clients make HTTP requests, and servers respond with a response.
Requests typically have the following schema: host: string (example: algoexpert.io) port: integer (example: 80 or 443) method: string (example: GET, PUT, POST, DELETE, OPTIONS or PATCH) headers: pair list (example: “Content-Type” => “application/json”) body: opaque sequence of bytes
Responses typically have the following schema: status code: integer (example: 200, 401) headers: pair list (example: “Content-Length” => 1238) body: opaque sequence of bytes
HTTPS
The H yper T ext T ransfer P rotocol S ecure is an extension of HTTP that’s used for secure communication online. It requires servers to have trusted certificates (usually SSL certificates ) and uses the Transport Layer Security ( TLS ), a security protocol built on top of TCP , to encrypt data communicated between a client and a server.
Firewall
A firewall is a network security device that monitors incoming and outgoing network traffic and permits or blocks data packets based on a set of security rules. Its purpose is to establish a barrier between your internal network and incoming traffic from external sources (such as the internet) in order to block malicious traffic like viruses and hackers.
Key Terms
Three Way Handshake
TCP 3-way handshake, also known as a 3-way handshake, is a protocol for establishing a connection between a server and a client in a TCP/IP network. Before the real data communication process begins, both the client and server must exchange synchronization and acknowledgment packets.
IPV4
IPv4 or Internet Protocol version 4, address is a 32-bit string of numbers separated by periods. It uniquely identifies a network interface in a device.IPv4 is the first non-experimental Internet Protocol.
IPV6
IPv6 is the latest version of the Internet Protocol, which identifies devices across the internet so they can be located. Every device that uses the internet is identified through its own IP address in order for internet communication to work.
Dual Stacking
Dual stack means that devices are able to run IPv4 and IPv6 in parallel. It allows hosts to simultaneously reach IPv4 and IPv6 content, so it offers a very flexible coexistence strategy.
Tunneling
Tunnelling is a protocol for transferring data securely from one network to another. Using a method known as encapsulation, Tunnelling allows private network communications to be sent across a public network, such as the Internet. Encapsulation enables data packets to appear general to a public network when they are private data packets, allowing them to pass unnoticed.
Switches
A network switch forwards data packets between devices. Switches send packets directly to devices, rather than sending them to networks like a router does. Switches can be hardware devices that manage physical networks, as well as software-based virtual devices.
Bit
A bit (binary digit) is the smallest unit of data that a computer can process and store. A bit is always in one of two physical states, similar to an on/off light switch. The state is represented by a single binary value, usually a 0 or 1. However, the state might also be represented by yes/no, on/off or true/false. Bits are stored in memory through the use of capacitors that hold electrical charges. The charge determines the state of each bit, which, in turn, determines the bit’s value.
Frames
A frame is a unit of data. A frame works to help identify data packets used in networking and telecommunications structures. Frames also help to determine how data receivers interpret a stream of data from a source.
Segment
A process is divided into Segments. The chunks that a program is divided into which are not necessarily all of the same sizes are called segments. Segmentation gives user’s view of the process which paging does not give. Here the user’s view is mapped to physical memory.
Ping
Ping (Packet Internet Groper) is a method for determining communication latency between two networks. Simply put, ping is a method of determining latency or the amount of time it takes for data to travel between two devices or across a network. As communication latency decreases, communication effectiveness improves.
Simple Mail Transfer Protocol
The Simple Mail Transfer Protocol (SMTP) is a technical standard for transmitting electronic mail (email) over a network. Like other networking protocols, SMTP allows computers and servers to exchange data regardless of their underlying hardware or software. Just as the use of a standardized form of addressing an envelope allows the postal service to operate, SMTP standardizes the way email travels from sender to recipient, making widespread email delivery possible.
File Transfer Protocol
FTP (File Transfer Protocol) is a network protocol for transmitting files between computers over Transmission Control Protocol/Internet Protocol (TCP/IP) connections. Within the TCP/IP suite, FTP is considered an application layer protocol. In an FTP transaction, the end user’s computer is typically called the local host. The second computer involved in FTP is a remote host, which is usually a server. Both computers need to be connected via a network and configured properly to transfer files via FTP.
Address Resolution Protocol
Address Resolution Protocol (ARP) is a procedure for mapping a dynamic IP address to a permanent physical machine address in a local area network (LAN). The physical machine address is also known as a media access control (MAC) address. The job of ARP is essentially to translate 32-bit addresses to 48-bit addresses and vice versa. This is necessary because IP addresses in IP version 4 (IPv4) are 32 bits, but MAC addresses are 48 bits.
Internet Control Message Protocol
The Internet Control Message Protocol (ICMP) is a network layer protocol used by network devices to diagnose network communication issues. ICMP is mainly used to determine whether or not data is reaching its intended destination in a timely manner. Commonly, the ICMP protocol is used on network devices, such as routers. ICMP is crucial for error reporting and testing, but it can also be used in distributed denial-of-service (DDoS) attacks.
Lesson 9: Transport Protocols
Prerequisites
Stateful
A server or process is called “stateful” when it derives its functionality from storing and retrieving things from disk. Databases are primary case studies for stateful servers. Because of this persistence requirement, it’s much more difficult to run and manage stateful servers compared to Stateless servers because they can’t be stopped and restarted on any physical machine.
Stateless
A server is usually called “stateless” if it does not require state to be persisted to disk in order to run successfully. Although many server process typically hold some state in memory including caching layers for instance, this typically means that we can run the server process the same way on any machine, and move it around whenever we want. This contrasts with Stateful processes.
Fragment
A fragment is a piece of a data packet that has been broken into smaller pieces in order to accommodate the maximum transmission unit (MTU) size of a network.
Byte
A byte is a unit of data that is eight binary digits long. A byte is the unit most computers use to represent a character such as a letter, number or typographic symbol.
Metadata
Metadata is data about data. Metadata enriches the data with information that makes it easier to find, use and manage.
Ethernet Frame
When transmitting data over Ethernet, the Ethernet frame is primarily responsible for the correct rulemaking and successful transmission of data packets. Essentially, data sent over Ethernet is carried by the frame. An Ethernet frame is between 64 bytes and 1,518 bytes big, depending on the size of the data to be transported.
Header
The header is the initial portion of a packet or a frame. The header contains control information such as addressing, routing, and protocol version. The format of this information depends on the protocol being used.
Firewall
A firewall is a network security device that monitors incoming and outgoing network traffic and permits or blocks data packets based on a set of security rules. Its purpose is to establish a barrier between your internal network and incoming traffic from external sources (such as the internet) in order to block malicious traffic like viruses and hackers.
Congestion Control
Congestion Control is a mechanism that controls the entry of data packets into the network, enabling a better use of a shared network infrastructure and avoiding congestive collapse. Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as the mechanism to avoid congestive collapse in a network.
Key Terms
Data Payload
Data payload of a specific network packet or other protocol data unit (PDU) is the transmitted data sent by communicating endpoints. Network protocols also specify the maximum length allowed for packet payloads. The payload is then wrapped in a packet that contains information such as media access control address and IP information, quality of service tags, time-to-live data and checksums.
IP Datagram
An IP datagram is a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without reliance on earlier exchanges between this source and destination computer and the transporting network.
MSS Value
MSS (maximum segment size) limits the size of packets, or small chunks of data, that travel across a network, such as the Internet. All data that travels over a network is broken up into packets. Packets have several headers attached to them that contain information about their contents and destination. MSS measures the non-header portion of a packet, which is called the payload.
PPP
Point-to-Point Protocol (PPP) is a TCP/IP protocol that is used to connect one computer system to another. Computers use PPP to communicate over the telephone network or the Internet. A PPP connection exists when two systems physically connect through a telephone line.
Check Sum
A checksum is a value that represents the number of bits in a transmission message and is used by IT professionals to detect high-level errors within data transmissions. Prior to transmission, every piece of data or file can be assigned a checksum value after running a cryptographic hash function. The term checksum is also sometimes seen as hash value.
Sequence Number
The sequence number is a counter used to keep track of every byte sent outward by a host. If a TCP packet contains 1400 bytes of data, then the sequence number will be increased by 1400 after the packet is transmitted.
Cryptographic Hash Function
A cryptographic hash function is an algorithm that takes an arbitrary amount of data input—a credential—and produces a fixed-size output of enciphered text called a hash value, or just “hash.” That enciphered text can then be stored instead of the password itself, and later used to verify the user.
Lesson 10: Routing
Prerequisites
Network
A network consists of two or more computers that are linked in order to share resources (such as printers and CDs), exchange files, or allow electronic communications. The computers on a network may be linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
Protocol
A protocol is a set of rules for formatting and processing data. Network protocols are like a common language for computers. The computers within a network may use vastly different software and hardware; however, the use of protocols enables them to communicate with each other regardless.
Key Terms
Maximum Transmission Unit
MTU is the largest packet or frame size, specified in octets (eight-bit bytes) that can be sent in a packet- or frame-based network. The internet’s transmission control protocol (TCP) uses the MTU to determine the maximum size of each packet in any transmission. MTU is usually associated with the Ethernet protocol, where a 1500-byte packet is the largest allowed.
Round Trip Time
Round trip time (RTT) is the measure (in milliseconds) of the latency of a network X 2- that is, the time between initiating a network request (a signal to be sent) plus the amount of time it takes for acknowledgement of that signal having been received (receiving a response). This time delay includes propagation times for the paths between the two endpoints. Simply put, it refers to the time taken by a network request to reach a destination and to revert back to the original source. RTT is a crucial tool in determining the health of a network and can be analysed and determined by pinging a certain address.
Hops
A hop refers to the number of routers that a packet passes through from its source to its destination. Sometimes a hop is counted when a packet passes through other hardware on a network, like switches, access points, and repeaters.
Lesson 11: Troubleshooting
Prerequisites
Timeout
A server connection timeout means that a server is taking too long to reply to a data request made from another device. Timeouts are not a reply message so they show up when there isn’t a reply and a server request is not fulfilled in a predetermined length of time. Timeout errors can happen for a number of reasons. The server, the requesting device, the network hardware and even an Internet connection can be at fault.
Key Terms
IP Config
Ipconfig displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters.
NS Lookup
NsLookup queries the specified DNS server and retrieves the requested records that are associated with the domain name you provided. These records contain information like the domain name’s IP addresses.
Lesson 12: Operating Systems
Prerequisites
Operating System
Software that acts as an interface between the hardware components of a computer and the user.
Hardware Peripherals
Hardware peripherals are devices that are not the computer’s core architecture involved in memory and processing. Peripherals include input hardware, output hardware and storage devices. A typical desktop computer could include: inputs - mouse, key
Random Access Memory
RAM (random access memory) is a computer’s short-term memory, where the data that the processor is currently using is stored. Your computer can access RAM memory much faster than data on a hard disk, SSD, or other long-term storage device, which is why RAM capacity is critical for system performance.
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It keeps track of projects and files as they change over time with the help of different contributors.
Queue
A FIFO queue is a queue that operates on the first-in, first-out principle. This is also referred to as the first-come, first-served principle.
Disk
Usually refers to either HDD (hard-disk drive) or SSD (solid-state drive). Data written to disk will persist through power failures and general machine crashes. Disk is also referred to as non-volatile storage. SSD is far faster than HDD but also far more expensive from a financial point of view. Because of that, HDD will typically be used for data that’s rarely accessed or updated, but that’s stored for a long time, and SSD will be used for data that’s frequently accessed and updated.
Key Terms
Fork
A fork is a Unix or Linux system call to create a new process from an existing running process. The new process is a child process of the calling parent process.
Exec
The exec system call is used to execute a file which is residing in an active process. When exec is called the previous executable file is replaced and new file is executed.
System Call
A system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system’s kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API).
Block Size
A block is the largest contiguous amount of disk space that can be allocated to a file and is therefore the largest amount of data that can be accessed in a single I/O operation. The physical block size is usually 512 bytes, which is the size of the smallest block that the disk controller can read or write.
Kernel
The kernel is the essential foundation of a computer’s operating system. It is the core that provides basic services for all other parts of the OS. It is the main layer between the OS and underlying computer hardware, and it helps with tasks such as process and memory management, file systems, device control and networking.
Kernel Mode
Kernel mode refers to the processor mode that enables software to have full and unrestricted access to the system and its resources. The OS kernel and kernel drivers, such as the file system driver, are loaded into protected memory space and operate in this highly privileged kernel mode.
User Mode
User mode refers to the processor mode that enables user-based applications, such as a word processor or video game, to load and execute. The kernel prepares the memory space and resources for that application’s use and launches the application within that user memory space.
Virtual Memory
Virtual memory is a memory management technique where secondary memory can be used as if it were a part of the main memory. Virtual memory is a common technique used in a computer’s operating system (OS). Virtual memory uses both hardware and software to enable a computer to compensate for physical memory shortages, temporarily transferring data from random access memory (RAM) to disk storage. Mapping chunks of memory to disk files enables a computer to treat secondary memory as though it were main memory.
Scheduling
Scheduling is the act of allocating CPU time to the processes that are currently in the ready queue. A single process is always running on the CPU thanks to the operating system’s scheduling of the process.
Batch processing
Batch processing is when a computer processes a number of tasks that it has collected in a group. It is designed to be a completely automated process, without human intervention.
MMU
A memory management unit (MMU) is a computer hardware component that handles all memory and caching operations associated with the processor. In other words, the MMU is responsible for all aspects of memory management. It’s usually integrated into the processor, although, in some systems, it occupies a separate integrated circuit (IC).
Lesson 13: Processes And Threads
Prerequisites
Central Processing Unit
The central processing unit (CPU) is a computer’s brain, it has all the circuitry required to process input, store data, and output results. The CPU is continually following computer program instructions that tell it which data to process and how to process it.
Stack
A stack is an associate ordered a set of components, only one of that (last added) are often accessed at a time. The point of access is named the highest of the stack. The number of components within the stack, or length of the stack, is variable. Items could solely be side to or deleted from the highest of the stack.
Heap
A heap is a special Tree-based data structure in which the tree is a complete binary tree.
LIFO
LIFO is an abbreviation for last in, first out. It is a method for handling data structures where the first element is processed last and the last element is processed first.
Pointer
A stack pointer is a small register that stores the memory address of the last data element added to the stack or, in some cases, the first available address in the stack. A stack is a specialized buffer that is used by a program’s functions to store data such as parameters, local variables and other function-related information. The stack pointer ensures that the program always adds data to the right location in the stack.
Memory
Short for Random Access Memory (RAM). Data stored in memory will be lost when the process that has written that data dies.
OS Memory Manager
Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time.
Key Terms
Processes
In essence, a process is a program that is being run. A process’s execution must proceed in a sequential manner. As the fundamental unit of work to be implemented in the system, a process is an entity that represents it. Simply put, we write our computer programs in text files, and when we run them, they turn into processes that carry out all the duties they specify.
Threads
A thread is a single sequential flow of execution of tasks of a process so it is also known as thread of execution or thread of control. There is a way of thread execution inside the process of any operating system. Apart from this, there can be more than one thread inside a process.
Concurrency
The simultaneous execution of several instruction sequences is referred to as concurrency. Multiple process threads running simultaneously is a phenomenon that happens in operating systems.
Multiprocessing
Multiprocessing is the coordinated processing of programs by more than one computer processor. Multiprocessing is a general term that can mean the dynamic assignment of a program to one of two or more computers working in tandem or can involve multiple computers working on the same program at the same time (in parallel).
Parallel Processing
Parallel processing is a method in computing of running two or more processors (CPUs) to handle separate parts of an overall task. Breaking up different parts of a task among multiple processors will help reduce the amount of time to run a program. Any system that has more than one CPU can perform parallel processing, as well as multi-core processors which are commonly found on computers today.
PCB
A printed circuit board (PCB) is the board base for physically supporting and wiring the surface-mounted and socketed components in most electronics. In applications where fine conductive traces are needed, such as computers, PCBs are made by a photolithographic process, in a larger scale version of the way conductive paths in processors are made.
Register
A processor register is one of a small set of data holding places that are part of the computer processor. A register may hold an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). Some instructions specify registers as part of the instruction.
Lesson 14: Locks And Concurrency Issues
Key Terms
Locks
Locking is a technique for coordinating possibly concurrent usage of a database or other shared resource in an operating system. In order to guarantee that operations take place in the proper order (when they don’t, the situation is known as a race condition), an operating system may enforce locking or some other technique.
Deadlock
A deadlock is a situation in which processes block each other due to resource acquisition, and neither process progresses while waiting for resources held by other processes.
Livelock
A livelock is a situation where a request for an exclusive lock is repeatedly denied because there are too many overlapping shared locks. In a livelock scenario, processes continuously change the state of their resources while blocking each other and waiting indefinitely.
Critical Section
Critical Section is the part of a program which tries to access shared resources. That resource may be any resource in a computer like a memory location, Data structure, CPU or any IO device. The critical section cannot be executed by more than one process at the same time. The operating system faces the difficulties in allowing and disallowing the processes from entering the critical section.
Race Condition
A race condition is an undesirable situation that occurs when a device or system attempts to perform two or more operations at the same time, but because of the nature of the device or system, the operations must be done in the proper sequence to be done correctly. Race conditions occur when two computer program processes, or threads, attempt to access the same resource at the same time and cause problems in the system.
Starvation
Starvation is the problem that occurs when high priority processes keep executing and low priority processes get blocked for indefinite time. In heavily loaded computer system, a steady stream of higher-priority processes can prevent a low-priority process from ever getting the CPU. In starvation resources are continuously utilized by high priority processes.
Mutual Exclusion
Mutual exclusion is a property of process synchronization which states that “no two processes can exist in the critical section at any given point of time”. Any process synchronization technique being used must satisfy the property of mutual exclusion, without which it would not be possible to get rid of a race condition.
Circular Wait
Circular waiting happens when one process is waiting for the resource, which is held by the second process, which is also waiting for the resource held by the third process etc.
No Preemption
No preemption happens if a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released implicitly. Then the preempted resources are added to the list of resources for which the process is waiting.
Lesson 15: Scheduling And Context Switching
Prerequisites
CPU Burst
CPU burst is the amount of time, a process uses the CPU until it starts waiting for some input or interrupted by some other process.
IO Burst
I/O burst is the amount of time, a process waits for input-output before needing CPU time.
Queue
A FIFO queue is a queue that operates on the first-in, first-out principle. This is also referred to as the first-come, first-served principle.
Key Terms
Context Switching
Context switching is a process in which the CPU switches from one process or task to another. In this phenomenon, the kernel suspends the execution of a process that is in the running state, and the CPU runs another process that is in the ready state.
Dispatcher
A dispatcher is a special program that comes into play after the scheduler. When the short term scheduler selects from the ready queue, the Dispatcher performs the task of allocating the selected process to the CPU. A running process goes to the waiting state for IO operation etc., and then the CPU is allocated to some other process.
Scheduler
Schedulers are special system software that handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run.
PCB
A printed circuit board (PCB) is the board base for physically supporting and wiring the surface-mounted and socketed components in most electronics. In applications where fine conductive traces are needed, such as computers, PCBs are made by a photolithographic process, in a larger scale version of the way conductive paths in processors are made.
Preemptive Scheduling
Preemptive scheduling is used when a process switches from running state to ready state or from the waiting state to ready state. The resources are allocated to the process for a limited amount of time and then taken away, and the process is again placed back in the ready queue if that process still has CPU burst time remaining. That process stays in the ready queue till it gets its next chance to execute.
Non Preemptive Scheduling
Non-preemptive Scheduling is used when a process terminates, or a process switches from running to the waiting state. In this scheduling, once the resources are allocated to a process, the process holds the CPU till it gets terminated or reaches a waiting state. In the case of non-preemptive scheduling does not interrupt a process running CPU in the middle of the execution. Instead, it waits till the process completes its CPU burst time, and then it can allocate the CPU to another process.
Lesson 16: Unix/Linux Systems
Prerequisites
Operating System
Software that acts as an interface between the hardware components of a computer and the user.
Key Terms
Linux
Linux is a free and open-source operating system based on the Unix operating system. It is widely used in web servers, cloud computing, and embedded systems due to its stability, security, and flexibility. Linux is known for its command-line interface and support for a wide range of programming languages.
Linux Directories
Linux Directories refer to the hierarchical structure of directories (also known as folders) within the Linux filesystem. The organization of these directories follows the Filesystem Hierarchy Standard (FHS), which defines the naming, location, and purpose of various directories to ensure consistency and compatibility across different Linux distributions. The top-level directories in a typical Linux filesystem are as follows:
Lesson 17: Virtual Machines
Prerequisites
Host
A host virtual machine is the server component of a virtual machine (VM), the underlying hardware that provides computing resources to support a particular guest virtual machine (guest VM). Together, the host virtual machine and guest virtual machine make up a virtual machine server.
Guest
A guest virtual machine (guest VM) is the software component of a virtual machine (VM), an independent instance of an operating system called a guest operating system and its associated software and information.
Bare Metal
The term bare metal refers to the fact that there is no operating system between the virtualization software and the hardware. The virtualization software resides on the bare metal or the hard disk of the hardware, where the operating system is usually installed.
Key Terms
Virtual Machines
A Virtual Machine (VM) is a compute resource that uses software instead of a physical computer to run programs and deploy apps. One or more virtual “guest” machines run on a physical “host” machine. Each virtual machine runs its own operating system and functions separately from the other VMs, even when they are all running on the same host.
Hypervisor
A hypervisor, also known as a virtual machine monitor or VMM, is software that creates and runs virtual machines (VMs). A hypervisor allows one host computer to support multiple guest VMs by virtually sharing its resources, such as memory and processing.
Lesson 18: Containers
Prerequisites
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It keeps track of projects and files as they change over time with the help of different contributors.
YAML
A file format mostly used in configuration. Example:
Microservices
Microservices are an architectural and organizational approach to software development where software is composed of small independent services that communicate over well-defined APIs. These services are owned by small, self-contained teams.
Key Terms
Containers
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
Lesson 19: Docker And Kubernetes
Prerequisites
Load Balancer
A type of reverse proxy that distributes traffic across servers. Load balancers can be found in many parts of a system, from the DNS layer all the way to the database layer.
Inheritance
Inheritance is a fundamental concept in object-oriented programming (OOP) that allows one class to inherit properties and methods from another class, promoting code reusability and modularity. Inheritance enables the creation of a hierarchy of classes, where a subclass can inherit characteristics from a parent class (also called superclass or base class) and then extend or override them as needed. This relationship between classes allows the subclass to inherit the attributes and behaviors of the parent class while also providing the ability to define or modify its own unique attributes and behaviors.
Sandbox
Sandbox refers to a secure and isolated environment within a computer system where applications, code, or untrusted data can be executed or analyzed without affecting the host system or its resources. Sandboxing is a common security technique used to prevent malicious software, untested code, or potentially harmful user actions from causing harm to the system or its data. Sandboxes can be implemented using virtual machines, containers, or other isolation mechanisms, depending on the desired level of security and resource isolation.
Key Terms
Docker
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allows you to run many containers simultaneously on a given host.
Dockerfile
Dockerfile is a script, composed of various commands (instructions) and arguments listed successively to automatically perform an action on a base image in order to create a new one. It is used to build or run Docker image by giving some instructions to customize an existing Docker image based on our requirement, in an automated way with running a Docker container.
Docker Compose
Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file to define the services and with a single command, can spin everything up or tear it all down.
Kubernetes
Kubernetes is an open source tool for managing Linux containers in environments with private, public, and hybrid clouds. Kubernetes is a tool that businesses can use to manage microservice architectures. Most cloud providers allow for the deployment of containers and kubernetes.
Kubernetes Cluster
Kubernetes Cluster is a set of machines, called nodes, that are orchestrated by the Kubernetes container management system to deploy, scale, and manage containerized applications. A Kubernetes cluster consists of a control plane, which manages the overall state of the cluster and coordinates all its activities, and worker nodes, which run containerized applications. The control plane includes components such as the API server, etcd datastore, and controller manager, while worker nodes host container runtime engines and the kubelet agent, which communicates with the control plane. Kubernetes clusters enable developers and operators to manage the deployment, scaling, and high availability of containerized applications in a consistent and automated manner.
Kubelet
Kubelet is a core component of the Kubernetes container orchestration system that runs on each worker node in a Kubernetes cluster. The primary responsibility of the kubelet is to ensure that the containerized applications specified in the pod specifications are running and healthy on its associated node. The kubelet communicates with the Kubernetes control plane to receive the desired state of the pods and then interacts with the container runtime engine, such as Docker or containerd, to create, start, stop, and monitor containers accordingly. The kubelet also reports the status of the pods and their containers back to the control plane and performs periodic health checks to ensure that they are functioning correctly.
Pods
Pods are the smallest and most basic unit in the Kubernetes container orchestration system. A pod represents a single instance of a running process in a cluster and can contain one or more containers. Containers within a pod share the same network namespace, which means they have the same IP address and can communicate using ’localhost’. They can also share the same storage volumes, allowing them to read and write data from shared filesystems. Pods are designed to be ephemeral and disposable, with Kubernetes automatically handling the creation, scaling, and recovery of pods based on the desired state defined by the user.
Nodes
Nodes are the physical or virtual machines that form the foundation of a Kubernetes cluster. Each node runs the containerized applications and workloads managed by Kubernetes. Nodes can be classified into two types: worker nodes and control plane nodes. Worker nodes are responsible for running the actual application containers (organized in pods), while control plane nodes host the components that manage and control the overall state of the cluster, such as the API server, etcd datastore, and controller manager. Each worker node runs a container runtime engine, such as Docker or containerd, and the kubelet agent, which communicates with the control plane to ensure the desired state of the pods is maintained.
Lesson 20: Microservices
Key Terms
Microservice
When a system is made up of many small web services that can be compiled and deployed independently. This is usually thought of as a counterpart of monoliths .
Monolith
When a system is primarily made up of a single large web application that is compiled and rolled out as a unit. Typically a counterpart of microservices . Companies sometimes try to split up this monolith into microservices once it reaches a very large size in an attempt to increase developer productivity .
Lesson 21: Databases
Key Terms
Database
Databases are programs that either use disk or memory to do 2 core things: record data and query data. In general, they are themselves servers that are long lived and interact with the rest of your application through network calls, with protocols on top of TCP or even HTTP. Some databases only keep records in memory, and the users of such databases are aware of the fact that those recordsmay be lost forever if the machine or process dies.
Redis
An in-memory key-value store. Does offer some persistent storage options but is typically used as a really fast, best-effort caching solution. Redis is also often used to implement rate limiting .
Postgres
A relational database that uses a dialect of SQL called PostgreSQL. Provides ACID transactions.
Lesson 22: Relational Databases
Key Terms
Relational Database
A type of structured database in which data is stored following a tabular format; often supports powerful querying using SQL.
CRUD
Stands for Create , Read , Update , Delete Operations. These four operations often serve as the bedrock of a functioning system and therefore find themselves at the core of many APIs. The term CRUD is very likely to come up during an API-design interview.
SQL
Structured Query Language. Relational databases can be used using a derivative of SQL such as PostgreSQL in the case of Postgres.
SQL Database
Any database that supports SQL. This term is often used synonymously with “Relational Database”, though in practice, not every relational database supports SQL.
Database Index
A special auxiliary data structure that allows your database to perform certain queries much faster. Indexes can typically only exist to reference structured data, like data stored in relational databases. In practice, you create an index on one or multiple columns in your database to greatly speed up read queries that you run very often, with the downside of slightly longer writes to your database, since writes have to also take place in the relevant index.
ACID Transaction
A type of database transaction that has four important properties:
Postgres
A relational database that uses a dialect of SQL called PostgreSQL. Provides ACID transactions.
Lesson 23: Non-Relational Databases
Key Terms
NoSQL Database
Any database that is not SQL-compatible is called NoSQL.
Graph Database
A type of database that stores data following the graph data model. Data entries in a graph database can have explicitly defined relationships, much like nodes in a graph can have edges.
Graph databases take advantage of their underlying graph structure to perform complex queries on deeply connected data very fast.
Graph databases are thus often preferred to relational databases when dealing with systems where data points naturally form a graph and have multiple levels of relationships—for example, social networks.
JSON
A file format heavily used in APIs and configuration. Stands for J ava S cript O bject N otation. Example:
Key Value Store
A Key-Value Store is a flexible NoSQL database that’s often used for caching and dynamic configuration. Popular options include DynamoDB, Etcd, Redis, and ZooKeeper.
Mongo DB
A NoSQL database with powerful querying through a JavaScript-like language. Consistency guarantees depend on the settings that the database is setup with.
Lesson 24: Migration And Provider Solutions
Prerequisites
Monitoring
The process of having visibility into a system’s key metrics, monitoring is typically implemented by collecting important events in a system and aggregating them in human-readable charts.
Key Terms
Nines
Typically refers to percentages of uptime. For example, 5 nines of availability means an uptime of 99.999% of the time. Below are the downtimes expected per year depending on those 9s:
SLO
Short for “service-level objective”, an SLO is a guarantee given to a customer by a service provider. SLOs typically make guarantees on a system’s availability, amongst other things. SLOs constitute an SLA.
SLA
Short for “service-level agreement”, an SLA is a collection of guarantees given to a customer by a service provider. SLAs typically make guarantees on a system’s availability, amongst other things. SLAs are made up of one or multiple SLOs.
Lesson 25: Cloud Architecture
Prerequisites
API
An API (Application Programming Interface) is a set of protocols, tools, and routines for building software applications. It specifies how software components should interact and enables communication between different software systems.
Key Terms
SAAS
Software as a Service (SaaS) is a cloud computing model where software applications are hosted and delivered over the internet as a service. Users can access and use the software through a web browser or a thin client, without having to install or maintain the software on their own computers or servers. SaaS providers typically charge a subscription fee based on the number of users or the level of usage.
PAAS
Platform as a Service (PaaS) is a cloud computing model where a provider offers a platform or a set of tools and services for developing, deploying, and managing software applications. PaaS allows developers to focus on writing and testing their code, without having to worry about infrastructure, scaling, or maintenance. PaaS providers typically offer various programming languages, frameworks, and middleware, as well as features such as version control, collaboration, and integration with other services.
IAAS
Infrastructure as a Service (IaaS) is a cloud computing model where a provider offers virtualized computing resources, such as servers, storage, and networking, as a service over the internet. IaaS allows users to provision and manage their own virtual machines, storage, and networking configurations, without having to own or maintain physical hardware. IaaS providers typically offer various operating systems, applications, and management tools, as well as features such as scalability, elasticity, and pay-per-use pricing.
FAAS
Function as a Service (FaaS) is a cloud computing model where a provider offers a platform for running individual functions or code snippets in response to specific events or triggers. FaaS allows developers to write and deploy code without having to manage the underlying infrastructure or servers. The platform automatically scales up or down the resources needed to execute the functions, and charges the user based on the number of executions and the duration of the function. FaaS is often used for event-driven or serverless architectures, and supports various programming languages and frameworks.
Lesson 26: Cloud Storage
Prerequisites
Redundancy
The process of replicating parts of a system in an effort to make it more reliable.
Availability
The odds of a particular server or service being up and running at any point in time, usually measured in percentages. A server that has 99% availability will be operational 99% of the time (this would be described as having two nines of availability).
SSL
Secure Sockets Layer (SSL) is a cryptographic protocol that was developed by Netscape in the 1990s to provide secure communication over a computer network. SSL enables secure data transmission by encrypting the communication between a client and a server, ensuring the confidentiality, integrity, and authentication of the transmitted data. SSL has been widely used to secure web browsing, email communication, and other sensitive online activities. However, SSL has been succeeded by Transport Layer Security (TLS), which is an updated and more secure version of the protocol. While the term “SSL” is still commonly used to refer to secure communication, most modern applications and systems use TLS instead of SSL.
TLS
Transport Layer Security (TLS) is a cryptographic protocol that provides secure communication over a computer network, ensuring the confidentiality, integrity, and authentication of the transmitted data. TLS is the successor to Secure Sockets Layer (SSL) and was developed by the Internet Engineering Task Force (IETF) to address the security flaws and limitations of SSL. TLS is widely used to secure web browsing, email communication, instant messaging, and other sensitive online activities.
TLS employs a combination of symmetric and asymmetric encryption algorithms, digital certificates, and message authentication codes to protect the data being transmitted. The protocol consists of two main sub-protocols: the TLS Handshake Protocol, which establishes a secure connection and negotiates encryption algorithms, and the TLS Record Protocol, which encrypts and transmits the data. TLS is continually being updated and improved, with the most recent version being TLS 1.3, which was published as an IETF standard in 2018.
Authentication
Authentication is the process of verifying the identity of a user, device, or system attempting to access a secured resource, such as a computer network, application, or online service. Authentication ensures that only authorized entities can gain access to sensitive data or resources, helping to protect against unauthorized access and security breaches. Common authentication methods include the use of passwords, security tokens, biometrics, and digital certificates. Multi-factor authentication (MFA) combines two or more of these methods to provide an additional layer of security, making it more difficult for attackers to compromise an account or system.
Authorization
Authorization is the process of determining the actions, operations, or resources that an authenticated user, device, or system is permitted to access or perform within a secured environment. Authorization is typically based on predefined access control policies, roles, or permissions that are assigned to users or groups. These policies define the specific actions that can be performed, such as read, write, delete, or execute, as well as the resources that can be accessed, such as files, directories, or network services. By enforcing proper authorization controls, organizations can ensure that users and systems can only access the resources they need to perform their tasks, minimizing the potential impact of security breaches and maintaining the principle of least privilege.
Key Terms
Blob Storage
Widely used kind of storage, in small and large scale systems. They don’t really count as databases per se, partially because they only allow the user to store and retrieve data based on the name of the blob. This is sort of like a key-value store but usually blob stores have different guarantees. They might be slower than KV stores but values can be megabytes large (or sometimes gigabytes large). Usually people use this to store things like large binaries, database snapshots, or images and other static assets that a website might have.
Blob storage is rather complicated to have on premise, and only giant companies like Google and Amazon have infrastructure that supports it. So usually in the context of System Design interviews you can assume that you will be able to use GCS or S3 . These are blob storage services hosted by Google and Amazon respectively, that cost money depending on how much storage you use and how often you store and retrieve blobs from that storage.
File Storage
File storage refers to a type of data storage where files are stored and retrieved as individual units. It is commonly used for storing documents, images, videos, and other types of digital files. File storage can be implemented using various technologies, such as network-attached storage (NAS), direct-attached storage (DAS), or cloud-based storage services. File storage typically allows users to organize and manage their files in a hierarchical directory structure, and provides features such as access control, versioning, and backup and restore.
NAS
Network Attached Storage (NAS) is a type of file-level storage that allows multiple users and client devices to access and share data over a network. It is often used for centralized storage and backup of data, as well as for hosting media files and streaming services.
DAS
DAS (Direct Attached Storage): A type of digital storage system that is directly connected to a single computer or server, without the need for a network connection. DAS is commonly found in the form of internal and external hard disk drives (HDDs), solid-state drives (SSDs), and other storage devices. It provides fast access to stored data and is commonly used for individual computers, workstations, and small-scale data storage needs.
S3 Buckets
Amazon S3 (Simple Storage Service) Buckets are storage containers for objects in Amazon Web Services’ (AWS) S3 service. S3 is a highly scalable, durable, and available object storage service that is designed to store and retrieve data from anywhere on the internet. Each S3 bucket must have a unique name within the AWS ecosystem and can be used to store any number of objects, such as documents, images, videos, or backups. S3 buckets can be configured with various access control policies, versioning, and lifecycle policies to manage the stored data according to the user’s requirements. Data stored in S3 buckets is automatically distributed across multiple devices and facilities, ensuring high durability and availability.
DAS
DAS (Direct Attached Storage): A type of digital storage system that is directly connected to a single computer or server, without the need for a network connection. DAS is commonly found in the form of internal and external hard disk drives (HDDs), solid-state drives (SSDs), and other storage devices. It provides fast access to stored data and is commonly used for individual computers, workstations, and small-scale data storage needs.
Lesson 27: Cloud Compute And Serverless
Prerequisites
Stateful
A server or process is called “stateful” when it derives its functionality from storing and retrieving things from disk. Databases are primary case studies for stateful servers. Because of this persistence requirement, it’s much more difficult to run and manage stateful servers compared to Stateless servers because they can’t be stopped and restarted on any physical machine.
Stateless
A server is usually called “stateless” if it does not require state to be persisted to disk in order to run successfully. Although many server process typically hold some state in memory including caching layers for instance, this typically means that we can run the server process the same way on any machine, and move it around whenever we want. This contrasts with Stateful processes.
Publish Subscribe Pattern
Often shortened as Pub/Sub , the Publish/Subscribe pattern is a popular messaging model that consists of publishers and subscribers . Publishers publish messages to special topics (sometimes called channels ) without caring about or even knowing who will read those messages, and subscribers subscribe to topics and read messages coming through those topics.
Pub/Sub systems often come with very powerful guarantees like at-least-once delivery , persistent storage , ordering of messages, and replayability of messages.
Asynchronous
Asynchronous describes the relationship between two or more events/objects that do interact within the same system but do not occur at predetermined intervals and do not necessarily rely on each other’s existence to function. They are not coordinated with each other, meaning they could occur simultaneously or not because they have their own separate agenda.
Synchronous
Cloud sync is the synchronization between devices for files that live on cloud storage. The cloud provider offers sync capabilities so that any changes or updates to files and new uploads are all available across devices in near real time. Cloud sync services deliver on the promise of anywhere, anytime access for individuals, groups, or enterprises.
Key Terms
Memory Optimized Instances
Memory optimized instances are designed to deliver fast performance for workloads that process large data sets in memory.
Memory Ballooning
Memory ballooning is a common virtualization technology technique that makes use of virtual machine memory. It is a memory management feature found in most virtualization platforms that allows a host system to artificially enlarge its memory pool by taking advantage or reclaiming unused memory previously allocated to various virtual machines.
Dedicated Host
Dedicated hosting is an Internet hosting option in which a physical server is dedicated to a single business customer. The customer has complete control over the machine, so they can optimize it for their unique requirements, including performance and security. The hosting provider supplies the physical server and environment, the associated services and technical support.
Dedicated Server
A dedicated server is a type of remote server that is entirely dedicated to an individual, organization or application. It is deployed, hosted and managed by a hosting, cloud or managed service provider. A dedicated server is exclusive and not shared with any other customer, service or application.
Shared Host
Shared hosting is a type of Web hosting service that allows multiple websites to share a physical Web server and its resources among the hosted websites. Shared hosting logically distributes a Web server to accommodate, serve and operate more than one website.
Cloud Pub Sub
A highly-scalable Pub/Sub messaging service created by Google. Guarantees at-least-once delivery of messages and supports “rewinding” in order to reprocess messages.
Lesson 28: Cloud Networking
Prerequisites
Segment
A process is divided into Segments. The chunks that a program is divided into which are not necessarily all of the same sizes are called segments. Segmentation gives user’s view of the process which paging does not give. Here the user’s view is mapped to physical memory.
Firewall
A firewall is a network security device that monitors incoming and outgoing network traffic and permits or blocks data packets based on a set of security rules. Its purpose is to establish a barrier between your internal network and incoming traffic from external sources (such as the internet) in order to block malicious traffic like viruses and hackers.
Key Terms
VPC
A virtual private cloud (VPC) is a secure, isolated private cloud hosted within a public cloud. VPC customers can run code, store data, host websites, and do anything else they could do in an ordinary private cloud, but the private cloud is hosted remotely by a public cloud provider. VPCs combine the scalability and convenience of public cloud computing with the data isolation of private cloud computing.
VLAN
VLAN (Virtual Local Area Network) is a custom network which is created from one or more local area networks. It enables a group of devices available in multiple networks to be combined into one logical network. The result becomes a virtual LAN that is administered like a physical LAN.
Default Gateway
A default gateway is a node that enables a connection between networks in order to allow machines on other networks to communicate. The default part of the terminology relates to the fact it is often the first and default route taken.
DMZ
A DMZ (demilitarized zone) functions as a subnetwork containing an organization’s exposed, outward-facing services. It acts as the exposed point to an untrusted networks, commonly the Internet. The goal of a DMZ is to add an extra layer of security to an organization’s local area network. A protected and monitored network node that faces outside the internal network can access what is exposed in the DMZ, while the rest of the organization’s network is safe behind a firewall.
Gateway
A gateway is a network node used in telecommunications that connects two networks with different transmission protocols together. Gateways serve as an entry and exit point for a network as all data must pass through or communicate with the gateway prior to being routed.
Lesson 29: Cloud Security And IAM
Prerequisites
Private Key
A private key, is a variable in cryptography that is used with an algorithm to encrypt and decrypt data. Private keys should only be shared with the key’s generator or parties authorized to decrypt the data. Private keys play an important role in symmetric cryptography, asymmetric cryptography and cryptocurrencies.
Hardening
Hardening refers to providing various means of protection in a computer system. Protection is provided in various layers and is often referred to as defense in depth. Protecting in layers means to protect at the host level, the application level, the operating system level, the user level, the physical level and all the sublevels in between. Each level requires a unique method of security.
Asymmetric Encryption
Also known as public-key encryption, asymmetric encryption relies on two keys—a public key and a private key—to encrypt and decrypt data. The keys are generated using cryptographic algorithms and are mathematically connected such that data encrypted with the public key can only be decrypted with the private key.
While the private key must be kept secure to maintain the fidelity of this encryption paradigm, the public key can be openly shared.
Asymmetric-key algorithms tend to be slower than their symmetric counterparts.
Symmetric Encryption
A type of encryption that relies on only a single key to both encrypt and decrypt data. The key must be known to all parties involved in communication and must therefore typically be shared between the parties at one point or another.
Symmetric-key algorithms tend to be faster than their asymmetric counterparts.
The most widely used symmetric-key algorithms are part of the Advanced Encryption Standard ( AES ).
SSL Certificate
A digital certificate granted to a server by a certificate authority . Contains the server’s public key, to be used as part of the TLS handshake process in an HTTPS connection.
An SSL certificate effectively confirms that a public key belongs to the server claiming it belongs to them. SSL certificates are a crucial defense against man-in-the-middle attacks .
Key Terms
Block Cipher
A block cipher is a method of encrypting data in blocks to produce ciphertext using a cryptographic key and algorithm. The block cipher processes fixed-size blocks simultaneously, as opposed to a stream cipher, which encrypts data one bit at a time. Most modern block ciphers are designed to encrypt data in fixed-size blocks of either 64 or 128 bits.
Stream Cipher
A stream cipher is a method of encrypting text to produce ciphertext in which a cryptographic key and algorithm are applied to each binary digit in a data stream, one bit at a time.
ACL
Short for Access-Control List . This term is often used to refer to a permissioning model: which users in a system can perform which operations. For instance, APIs often come with ACLs defining which users can delete, edit, or view certain entities.
PKI
PKI (public key infrastructure) is the underlying framework that enables entities such as users and servers to securely exchange information using digital certificates. The entities that facilitate and use PKI typically involve general internet users, web clients or browsers, and company servers although this can extend to other virtual machines (VMs) as well.