Everything Flashcards
How does DNS work
Domain Name System; network service that converts domain name into IP address.
- After user has typed a domain name in search bar the browser and the OS try to see if that IP is stored locally in a cache on your computer, if you had visited there recently.
- If not, your browser reaches out to a RECURSIVE NAME SERVER, provided by your internet service provider, to identify the IP of the domain you’re trying to connect to.
- If the Recursive Name Server does not have it, it will check one of 13 ROOT SERVER for top level domains like .com or .org.
- Once connected to the proper Recursive Name Server, the request is redirected to a AUTHORATATIVE name server, that contains an authoritative list of IPs and domain names.
a. This list gets updated whenever someone buys and registers a domain.
local cache - Recursive Name Server - Root Server - Authoritative Name Server
TCP
Transmission Control Protocol;
Operates on layer 4 - Transport of osi. Reliable connection based protocol. Bigger overhead, back and forth communication to confirm packet transmission. Packets guaranteed to arrive in order. Congestion control to make sure that network does not get overloaded, prevents packets from getting dropped.Data does not always get sent out immediately which can disrupt things where speed is super important,
HTTPS vs HTTP
HTTP sends and receives requests in plain text where as HTTPS encrypts the request and response data through a secure connection called Secure Socket Layerw. The host will check the SSL certificate (Secure Socket Layer) with the SSL authority and if everything checks out it will open the response.
switch
Designed to connect a computer to a network. Uses Mac address. Layer 2 of the osi model.
Router is designed to connect networks together.
OSI Model
- Application - Browser
- Presentation - OS layer
- Session - communication between two computers
- Transport - how much information is being passed back and forth
- Network - Provides connections between hosts on different networks. Layer routers work at with IP addresses.
- Data Link - Provides connections between hosts on the same network. Defines the protocol to both establish and terminate a physical connection between two computers. Switches operate at this layer with Broadcast Media Access Control (MAC).
- Physical - wires
UDP
Alternative TCP at the transport layer of the OSI model. Light weight, fast, and unreliable. Sends packets in self contained clumps. Does not guarantee that things will come in order. Does not have any safeguards against dropped packets or errors.
3 tier web architecture
Presentation (front end)
Application (logic)
Data (database)
CDN
Content Delivery Network;
Network of servers spread across the world that contain caches of your static content. When a user visits your website, the user connects to one of these servers based on geographic location.
BENEFITS
Speed
Crash Resistance
WAF
Web App Firewall;
Reverse proxy server; users are required to go through a server that filters out malicious traffic before allowing users to proceed to the host.
Web App Firewall can help stop DDoS by adjusting the rate limit
DDOS
Distributed Denial of Service;
Occurs when multiple systems flood the bandwidth of a targeted server or servers with traffic.
Compiler
Converts human readable code into machine code.
JSON vs XML
Both can be used to receive data from a web server
JSON is faster and can use arrays but it does not have any display capabilities.
XML can display charts, images, graphs because it is a markup language. However, it is slower and requires a XML parser.
Data Lake
A data lake is a centralized repository that allows you to store a vast amount of raw data in its native format until it is needed. Data-driven businesses often use this storage architecture to get more business value from their data assets
Clustering vs Mirroring
Mirroring: creates a copy of a db space
Clustering: creates a copy of the data in another datbase, and the entire database environment that manages the data stored there.
FIFO
First In First Out
Deadlock
In concurrent computing, a deadlock is a state in which each member of a group is waiting for another member, including itself, to take action, such as sending a message or more commonly releasing a lock.[
OLTP
Online Transactional Processing system that manages database modification.
Focused on Inserting, updating, deleting information from a database.
OLTPs are the original source of data
Short transactions, less space.
Data normalization. Data Integrity is important
OLAP
Online Analytical Processing System;
Online data retrieving and data analysis system. Extract data for analyzing that helps in decision making.
Data - Different OLTPs become the source of data for OLAP
complex queries
Tables in OLAP are not normalized
OLAP databases do not get modified frequently so data integrity is not a concern.
IP address
Made up of Network ID and a Host ID. Network ID identifies the specific network the Host is a part of.
Host ID identifies a specific device.
Load Balancer
Spreads user traffic across multiple instances of your applications
Virtualization/Virtual Machines
Virtualizes hardware using a HYPERVISOR so you can run multiple operating systems.
Docker/Containers
OS level virtualization. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels
Hypervisor
Allows you to install multiple OS on a single server
RAID
Reduction Array of Independant Disks;
Turn Multiple physical hard drives into a single logical drive.
RAID 0
Data striping,
Data is spread or striped across two or more different disks.
There is no backup, but it is very fast.
RAID 1
Disk Mirroring;
Identical copy of the disk data on two different drives
RAID 5
Requires 3 or more disks.
Data is striped across multiple disks along with parity.
IF you lose one disk, there is backup on the other two (or more) drives, so you don’t lose anything.
4 Pillars of Object Oriented Design
Encapsulation
Abstraction
Inheritance
Polymorphism
ENCAPSULATION: Restricts the ability to to read and change data in an object. Other objects do not have the ability to directly manipulate or read data in another object, unless they use methods that have been made publically available.
ABSTRACTION: Each object should only expose a high level mechanism for using it.
INHERITANCE: To keep code dry you can create parent classes that have common logic/data that other classes (child classes) will use. The child classes can inherit the methods and data collected in parent classes.
POLYMORPHISM: Lets a method apply different logic based on circumstances in the child level.
VLAN
Virtual Local Area Network;
VLAN is a logical network -
Computers, servers, and other network devices are logically connected regardless of physical location.
NAS
Network Attached Storage Device
A single Server dedicated to storing data in a file system.
SAN
Storage Area Network
A network (cluster) of servers dedicated to storing data. If one of the servers goes down, you don't lose any of the data.
EXAMPLE of block storage.
Fault Tolerance
Mirrored systems running in perfect tandem. If one goes down, the other will still be up and running. Little protection against software failure.
High Availability
Software approach to minimizing server downtime. Clusters a set of servers together to monitor each other and have failover capabilities.
When something goes wrong, one of the backup servers springs into action and restarts the app that were active on the crashed server
Microservices Architecture
Components of application that are not themselves smaller applications, but instead services that together form an application.
Performance metrics
record database transactions slow queries I/O latency HTTP request throughput Service Latency
Session Based Authorization system
Server creates and stores the session data in the server when the user logs in and then stores the session id in a cookie on the user’s browser.
Session ID sent form client to server on requests
Token based Authentication
Users state is stored on the client
User data is encrypted into a Json Web Token (JWT) with a secret on the server and then sent back to the client. JWT is then stored on the client side in local storage and then sent back in the header on every subsequent request. Server receives and validates the JWT before proceeding to send a response to the clients.
Slow Queries
Queries that are slower than average
I/O latency
The number of read or write operations per second
HTTP throughput
Number of HTTP operations per day
Latency
Time between making a request and seeing a result
Continuous Integration
Developers integrate code into a shared repository multiple times a day, where each integration can be verified with an automated build and automated tests
Continuous Deployment
software release process that uses automated testing to validate if changes to a codebase are correct and stable for immediate autonomous deployment to a production environment
Docker Image
A Docker image is an immutable (unchangeable) file that contains the source code, libraries, dependencies, tools, and other files needed for an application to run.
Read only template that a container can be built on top of.