Section 1

Preview this deck

UDP

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (30)

Section 1

(30 cards)

UDP

Front

User Datagram Protocol: compared to TCP it is lightweight with less overhead due to the fact that it is a connectionless protocol that is datagram oriented rather that connection-oriented similar to TCP in that it is a protocol in the transport layer - data is broken up into packets(datagrams) ( 60% smaller) that consist of a header and data and are wrapped in IP layer with source and destination IP address No connection is made before data starts flowing(no handshake) When packets are corrupted enroute to server they are just discarded and not resent creating a constant stream of data No congestion control so if network is crowded keeps sending data which leads to more droppedpackets ideal for live-streaming, gaming

Back

Load Balancer

Front

An upstream server that distributes incoming network requests across a group (pool, farm) of servers - ensures reliability by only sending requests to working servers - allows flexibility by giving the ability to add and remove servers based on traffic

Back

Cookies, LocalStorage, Session Storage

Front

All ways of storing data in the browser in the form of key-value pairs for future use. LocalStorage lasts forever unless manually removed with JS, Cookies have expiration dates usually set by server, Session expires on tab close - Cookies are stored on client and server side - others only client

Back

HEAD

Front

same as get but transfers the status line and header section only

Back

DELETE

Front

deletes all current representations of the targeted resource

Back

Server Caching

Front

Key-Value store located somewhere between the application layer and data storage (maybe a load balancer) - whenever your application needs to read data it should first check cache bc it is stored in RAM so very fast look up (O(1) i think) - can be implemented couple different ways

Back

Client-Server (Fielding Constraint)

Front

Network must be made up of clients and servers -A server is a computer that has resources of interest -A client is a computer that wants to interact with the resources stored on the server -A client sends HTTP requests to a server in order to access and manipulate information -It's a one-to-one relationship unlike non-RESTful architecture that can be event-based

Back

TCP

Front

Transmission Control Protocol Connection-based protocol for the transmission of resources Ensures a degree of reliability by accounting for all packets sent from one machine to another Does so by providing ordering on all IP packets an if a packets in which they should be assembled Confirmation messages are sent confirming that all messages were sent or requesting replacement packets to be send for any packets not received Once all accounted fro they are reassembled and sent to the application layer

Back

Proxy Server (Proxy)

Front

It's a computer that acts as a gateway between a local network and a larger-scale network like the internet. They are used for increased security and load balancing.

Back

Load Balancing techniques

Front

Round Robin - requests are sent to different servers in sequential order Least Connections - new requests are sent to servers deemed to have the least current connects based on size IP Hashing - the IP address of the client determines which server its sent to

Back

Uniform Interface (Fielding Constraint)

Front

Common language and protocols between servers and clients (4 sub-constraints) 1. Identification of resources -The Web uses URL's to identify resources, and HTTP as its communication standard. 2.Manipulation of resources through representations. - The client can manipulate resources by sending representations to a server-(usually a JSON object containing the content that it would like to add, delete, or modify) BUT The server still has full control of the resources, and is responsible for making any changes 3. Self-descriptive messages -A single message between client/server contain all the information that the recipient needs to understand it. -(every HTTP packet contains all methods, headers, content type, protocols, ect.) 4.Hypermedia -links to other url's -The server does not need to remember anything about the client or do anything special to cater to it, and vice versa.

Back

R.E.S.T.

Front

REpresentational State Transfer -Set of design principles for network communication based on a client-server model. In which resources are shared using standardized protocols and method.

Back

OPTIONS

Front

describes the available communication options for a given resource

Back

POST

Front

used to send NEW data to a server (new user ect.)

Back

What happens when you type in www.google.com and hit enter?

Front

FINDS IP ADDRESS The browser checks it's own cache for a DNS record that has the corresponding IP address for 'google.com' then the OS cache then router cache if it's not in your computer then the ISP (Internet Service Provider) which has it's own DNS server -if IP cannot be found your ISP launches a DNS query that is a recursive search through other DNS servers until the IP address is found -If successful the IP address will be returned to your computer A CONNECTION IS MADE VIA HANDSHAKE 1. Client machine sends a SYNCH packet to the server to see if it is open for new connections. 2. If so, it responds with an ACKnowledgment of the SYN packet using a SYN/ACK packet. 3. The client will receive the SYN/ACK packet from the server and will acknowledge it by sending its own ACK packet. - a secure connection is established GET REQUEST IS SENT Browser will send a GET request asking for maps.google.com web page Server will receive this request and send it to the server's request handler(Backend API) -assemble a response (Usually in form of JSON) and send it out in an http response -Browser receives it with a status code and requested resources Browser displays the HTML content in phases. First, it will render the bare bone HTML skeleton. Then it will check the HTML tags and sends out GET requests for additional elements on the web page, such as images, CSS stylesheets, JavaScript files etc. then runs js ?

Back

Fielding Constraints

Front

Architectural constraints that a system must satisfy to be considered RESTful -Roy T Fielding Phd Dissertation(2000)

Back

Caching (Fielding Constraint)

Front

A client stores previous responses it received from the server, so that when that data is needed again, it can save a round trip over the network by using the cached data

Back

Layered System (Fielding Constraint)

Front

There can be more than one layer in the system. However, each component is constrained to only see and interact with the very next layer. - examples include a Proxy - acts like a server to the initial client that sends a request then sends request to another server as a client

Back

Stateless (Fielding Constraint)

Front

-Servers and clients do not track each others' state -A server does not keep a record of past requests from specific clients - Each request is treated as a standalone

Back

Local Storage vs Session Storage

Front

Both are client side storage solutions - caching mechanisms Session Storage is only available for the duration of the browser session(deleted once tab or window closes) Local Storage is available on an ongoing basis

Back

Code on Demand (Optional Fielding Constraint)

Front

The ability for a server to send executable code to the client. This is what happens in HTML's <script> tag. When the HTML document is loaded, the browser automatically fetches the JavaScript from the server and executes it locally.

Back

CONNECT

Front

creates a tunnel to the server identified by a specific URI

Back

GET

Front

Used to retrieve specific data by specifying parameters in the URL portion of the request the server responds with a header and body that contains info and html respectively

Back

Horizontal vs Vertical Scaling

Front

Vertical scaling is based on the notion of putting more power (processing power and RAM) into an existing machine to meet growing needs -technological restrictions -no redundancy Horizontal scaling is based on adding more entities (servers) so that they work as a single logical unit

Back

PUT

Front

REPLACES the current representation of a targeted resource with the new representation of the targeted resource being sent with the request

Back

DNS

Front

Domain Name System is a database of website (URL)'s and the particular IP address that it's linked to (for human-friendly readability). The IP address belongs to the computer which hosts the server of the website we are requesting to access

Back

TCP/IP Layers

Front

Application layer - interacts with programs and has certain protocols like http Transportation layer - where TCP / UDP live - information received from the application layer is sent to the transportation layer via ports in which each protocol can be assigned a different port so TCP knows where it is coming from - TCP chops data up into packets - include header that say what order they should be assembled and error checking info Internet layer - packets are pushed onto the internet layer where they are labeled with a to and from IP address Network layer - mac addressing and converts data into electrical impulses that actually passes through the internet

Back

Sticky Sessions

Front

Enables the load balancer to lock a user down to a specific web server (EC2 instance). This ensures that all requests from the user during the session are always sent to the same server(uses a cache)

Back

popular ports

Front

443 -ssl http 80 - http requests 465 - email smtp with ssl 53 - DNS 3074 - xbox live

Back

SSL/TLS

Front

Secure Sockets layer / Transport Layer Security - An encryption layer of HTTP that uses a cryptographic protocol which defines how two entities securely communicate with each other.- 1. client sends cypher suite to server showing all the cryptographic algorithms it supports - 2. the server sends back a message with an algorithm from the suite they both have, along with a digital certificate and public key 3. client contacts the certificate authority(CA) to make sure they're legit 4. the client creates what will be the shared secret(secret key) encrypts it with the servers public key and sends it back to the server 4. client then sends a finished message encrypted with the secret key 5. server responds with a finished message also encrypted with the secret key so if both understand each other we know the secret key is working and a secure connection is made

Back