Skip to content
Network기술 정리

Network, OS, CS: notes for frontend interviews

4 min readTech notesMoved from my Tistory blogRead the Korean original

1. Differences between HTML and HTML5

  • HTML : Hyper Text Markup Language

  • HTML5 is the fifth upgraded version of the HTML standard

  • Multimedia features

  • Web storage

  • Provides a mechanism for storing a website user's information on the PC

  • WebSocket

  • Location features

  • CSS3

Source: https://visual.ly/community/Infographics/education/what-does-html5-do
Figure 1. Source: https://visual.ly/community/Infographics/education/what-does-html5-do

2. Differences between GET and POST

GET

  • A method used to retrieve information from the server ex) viewing posts, viewing products, viewing members

  • When requesting information from the server, data is sent through the query string

  • Data is sent in the URL after a ?, and there is a length limit

  • It means that even if you send the same request to the server many times, the same response must always come back == 'idempotent'

POST

  • A method used to create or modify data on the server ex) writing a post, signing up

  • Data is sent in the body

  • Safer than GET because the data isn't exposed

  • For POST, it means that even if you send the same request to the server many times, the response can differ

3. Differences between TCP and UDP

TCP and UDP are protocols used when transferring data

TCP(Transmission Control Protocol)

  • Connection-oriented and guarantees reliability (through the 3-way handshaking process)

  • 3-way handshaking : a way for devices communicating over TCP to check that they are properly connected to each other

  • Guarantees delivery order but is slower than UDP

  • Used when reliability matters, such as file transfers

UDP(User Datagram Protocol)

  • Connectionless, used where continuity matters (streaming services)

  • Delivery order can change

  • Less reliable, but faster

4. Differences between HTTP and HTTPS

HTTP(Hyper Text Transfer Protocol)

  • A protocol used for data requests/responses

  • It sends unencrypted plain text data, so the data exchanged with the server can be seen

  • Uses port 80

HTTP + SSL(Secure Socket Layer)

  • A protocol that adds data encryption to HTTP

  • It sends encrypted data, so a third party can't see the data

  • Uses port 443

HTTPS encryption methods

Symmetric key encryption

  • The client and server use the same key to encrypt/decrypt

  • Higher risk of the key being exposed, but faster

Asymmetric key encryption

  • Uses a public key and a private key to encrypt/decrypt

  • Relatively safe even if a key is exposed, but slower

5. Restful API

  • An API built by following the rules of REST (REST is a form of software program architecture)

  • The goal is less about better performance and more about making APIs easier to understand and more compatible through rules

6. Synchronous & asynchronous

Synchronous method

  • The request and the result happen at the same time

  • After making a request, it waits until the result comes back

  • It can't handle multiple requests at the same time

  • Blocking

Asynchronous method

  • The request and the result don't happen at the same time

  • After a request, it moves on to the next request regardless of the result

  • Handles multiple requests at the same time

  • Non-Blocking

7. Proxy server

  • What is a proxy? The word means a stand-in or agent

  • A server that acts as a go-between so that a client (user) can connect to another network through the proxy itself

  • In other words, a server that fetches data on the internet on behalf of the user

Why it's used

  • To use cached data

  • Content already requested through the proxy server doesn't need to go through the server again, which saves transfer time

  • For security: going through a proxy server in the middle means the IP doesn't have to be exposed. For this reason, proxy servers are sometimes used as firewalls

8. DNS(Domain Naming Server)

  • Acts as a converter between domain names and IP addresses

  • Numeric addresses like IP addresses are inconvenient for many people, so it converts them into text addresses people can read

9. Packet

  • A blend of "package" and "bucket", the basic unit for transferring information over a network

10. Differences between cookies and sessions

  • What is a cookie? A Key-Value data file stored locally by the browser

  • What is a session? A technique that keeps the user's requests alive until the browser is closed

Differences

  • Storage location : cookies are stored locally, sessions are stored locally and on the server

  • Lifecycle : cookies remain as files even after the browser is closed, but sessions are deleted when the browser is closed

  • Speed : cookies are relatively fast because they are read from a file, but sessions are relatively slow because the server has to process every request

11. Process & thread

  • What is a process? A unit of work that is allocated resources by the operating system

  • Each process is allocated its own independent memory area (Code, Data, Stack, Heap) by the operating system

  • When a process is created, one thread is created

  • What is a thread? A unit of execution flow that uses the resources allocated to a process

  • A thread is a flow of execution running inside a process. Each thread gets only its own Stack and shares the Code, Data, and Heap areas

12. Context switching

  • When one process is running and a request with a different priority comes in, the work of saving the existing context and swapping in a new context so the next process can run

For process context switching, there is no shared area, so context switching takes a long time

Threads share many areas, so their context switching is faster than for processes

13. Memory areas the OS provides to run a program

  • Code area : where the code is stored

  • Data area : where global and static variables are stored

  • Stack area : where local variables and parameters are stored, holds static memory, LIFO

  • Heap area : where global variables are stored, memory space is dynamically allocated and freed by the user

  • #CS
  • #Network
  • #OS
  • #frontend interview

More in Tech notes