Updated SD section, added jenkinsfile

This commit is contained in:
2023-02-12 12:01:38 -05:00
parent 221784f594
commit 0e98989091
5 changed files with 50 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
node_modules
docs/.vitepress/dist
.vscode
.vscode
*.DS_Store*

10
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,10 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building'
}
}
}
}

View File

@@ -0,0 +1,23 @@
# Basics of the Internet
## Client-Server Model
The internet is based on the client-server model. Servers are processes that provides services to clients, and clients are processes which request things from the servers. These machines find each other using their **IP addresses**, which are 4 numbers from 0 to 255 in a.b.c.d format, and communicate through **ports**. A **DNS**, or Domain Name Server, links domain names to IP addresses.
::: details
Notable IP Addresses include 127.0.0.1 or localhost which is your own machine and
192.168.c.d are machines on your local network. Notable ports include 22 (ssh), 443 (https),
80 (http), and 53 (DNS lookup).
:::
## Protocols
The above method of communication is known as Internet Protocol. There are additional protocols built on top of IP.
### TCP
TCP allows for ordered, reliable data delivery between machines through connections. This also exposes **sockets** which allow applications to stream data through an open connection.
### HTTP
HTTP (HyperText Transfer Protocol) is implemented on top of TCP. This is the request-response model. Requests typically have a method, headers, and a body as well as origin information, and the request typically has a status and some kind of data.

View File

@@ -0,0 +1,13 @@
# Latency
Latency describes the time it takes for a machine to perform a certain operation. Every method of retrieving information has different time costs. A general rule of thumb:
- Reading 1MB from RAM - 0.25ms
- Reading 1MB from SSD - 1ms
- Transfer 1MB over network - 10ms
- Reading 1MB from HDD - 20ms
- Intercontinental round-trip - 150ms
## Throughput
While latency measures the time operations take, throughput describes the number of operations that can be processed in a given amount of time, such as requests per second.

View File

@@ -23,6 +23,8 @@
{
"text": "System Design",
"items": [
{"text": "Basics of the Internet", "link": "/interview/sd/basics"},
{"text": "Latency", "link": "/interview/sd/latency"},
{"text": "Scaling", "link": "/interview/sd/scaling"}
]
}