Communication Protocols Flashcards

1
Q

TCP purpose ?

A

used for transmitting data over the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

UDP purpose ?

A

used for transmitting data over the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TCP full form ?

A

Transmission control protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

UDP full form ?

A

User Datagram Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is TCP a reliable protocol ?

A
  • data delivery is guaranteed
  • order of data delivery is guaranteed
  • error-free data transmission mostly
  • receiver acknowledges to the sender that data packets have been delivered
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is UDP an unreliable protocol ?

A
  • delivery isnt guaranteed
  • delivery order isnt guaranteed
  • there could be errors during data transmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do you mean by “TCP is a connection-oriented protocol” ?

A
  • a connection to be established between the sender and receiver before data can be transmitted.
  • successful receipt of data delivery back to the sender after data transmission is complete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do you mean by “UDP is a connectionless protocol” ?

A

Connection does not need to be established before data is transmitted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why does TCP have a higher overhead than UDP ?

A

because it includes additional information in each packet to ensure reliability and order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the repurcussions of having a “higher overhead” based protocol ?

A
  • slower data transmission
  • network congestion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the repurcussions of a comm protocol having a lower overhead ?

A

the protocol will be faster but less reliable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some use-cases for TCP ?

A

file transfers, email, and web browsing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some use-cases for UDP ?

A
  • online gaming
  • video streaming
  • VoIP (Voice over Internet Protocol).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

TCP vs UDP ? Which one would you choose ?

A

TCP is a reliable, connection-oriented protocol with higher overhead, while UDP is an unreliable, connectionless protocol with lower overhead. The choice between TCP and UDP depends on the specific application and requirements for reliability and speed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

IPv4 and IPv6

A

Internet Protocol versions for identifying devices on a network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the size of IPV4

A

IPv4 has a 32-bit address, providing roughly 4 billion unique addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the size of IPV6 ?

A

IPv6 has a 128-bit address, allowing for trillions of unique addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Which features make IPV6 more desirable in comparison to IPV4 ?

A
  • better security,
  • auto-configuration, and
  • simplified routing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what is the purpose of an IP ?

A

It is a numerical label that allows devices to communicate with each other over a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is an IP ?

A

An IP (Internet Protocol) is a unique identifier assigned to every device that connects to the internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Name 2 techniques used for real-time communication between a client and a server

A

WebSockets and Long Polling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What type of a communication channel does a websocket provide ?

A

WebSockets is a protocol that provides a persistent, bidirectional communication channel between a client and a server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Why are websockets designed to work over a single TCP connection ?

A

To reduce the overhead and latency compared to traditional HTTP requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

2nd websocket step

A

If the server supports WebSockets, it sends a response back to the client with an Upgrade header, indicating that the connection has been upgraded to a WebSocket connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

1st step in the websocket process

A

A client sends a request to the server, asking to establish a WebSocket connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

3rd websocket step

A

The client and server then perform a WebSocket handshake to establish the connection. This involves exchanging headers to negotiate the protocol and version to use, as well as generating a unique key to confirm the connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

4rth websocket step

A

Once the connection is established, the client and server can send data to each other using the WebSocket protocol. This involves sending data frames that can be split into smaller packets for transmission over the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Name some applications where web sockets are commonly used

A
  • chat applications,
  • online gaming, and
  • financial trading applications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

5th websocket step

A

Data can be sent in either direction, with each side using a send() method to transmit data to the other side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

6th websocket step ?

A

The connection remains open until one side decides to close it, or if there is a network error or timeout.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Explain long polling in 1 sentence

A

Long polling is a technique used in web development that allows a web server to push new data to a client whenever it becomes available, instead of relying on the client to periodically request new data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

1st step in long polling

A

The client sends a request to the server for new data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

2nd step in long polling

A

The server waits for new data to become available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

3rd step in long polling

A

If new data is available, the server sends it to the client immediately.

35
Q

4rth step in long polling

A

If new data is not available, the server holds the request open and waits for a predetermined amount of time (e.g., 30 seconds) before responding to the client.

36
Q

5th step in long polling

A

If new data becomes available during this time, the server sends it to the client immediately and the process starts over again.

37
Q

Where would you use long polling ?

A
  • Real-time chat applications
  • Stock market monitoring:
  • Gaming
  • Notifications
  • Collaborative editing
  • Live streaming
38
Q

6th step in long polling

A

If new data does not become available during this time, the server sends a response to the client with a timeout message, indicating that no new data is available.

39
Q

Why is long polling more efficient than traditional polling ?

A

It can be more efficient than traditional polling, where the client sends requests at regular intervals, as it reduces the number of unnecessary requests.

40
Q

When would you choose web sockets over long polling and vice-versa ?

A

The choice between WebSockets and Long Polling depends on the specific use case and requirements. WebSockets are more efficient for real-time applications that require frequent updates, but they may not be supported by all browsers and servers. Long Polling can be a good alternative when frequent updates are not necessary, and it is more widely supported. Both techniques have their advantages and limitations, and the best approach depends on the specific requirements of the application.

41
Q

full forms of HTTP and HTTPS

A

HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure)

42
Q

How does HTTPS transmit secure data ?

A

HTTPS is a secure version of HTTP, which means that it provides encryption of data transmitted between the client and the server. HTTPS uses SSL/TLS (Secure Sockets Layer/Transport Layer Security) protocols to encrypt data, which makes it more difficult for attackers to intercept and steal sensitive information such as login credentials, credit card numbers, and other personal data.

43
Q

what are the effects of HTTP not encrypting it’s data ?

A

data is transmitted in plaintext and can be intercepted and read by attackers.

44
Q

Which ports do HTTPS and HTTP use ?

A

HTTPS uses a different port (port 443) than HTTP (port 80).

45
Q

What certificate does HTTPS require ?

A

HTTPS requires a digital certificate to establish the authenticity of the server. The certificate is issued by a trusted third party called a Certificate Authority (CA), which verifies the identity of the server and provides a public key for encrypting data.

46
Q

What are the after-effects of HTTP not requiring a certificate ?

A

HTTP does not require a certificate, which means that it is vulnerable to attacks such as man-in-the-middle attacks, where an attacker intercepts and modifies data transmitted between the client and server.

47
Q

How does HTTPS influence SEO ?

A

HTTPS is also preferred by search engines, as they prioritize secure websites in their search results. This means that HTTPS can improve the search engine rankings of a website, which can lead to more traffic and better visibility.

48
Q

HTTPS vs HTTP

A

HTTPS is a more secure version of HTTP that provides encryption of data, uses a different port, requires a certificate to establish authenticity, and is preferred by search engines. The choice between HTTP and HTTPS depends on the specific requirements of the application, but for websites that handle sensitive information, HTTPS is essential to protect against attacks and maintain user trust.

49
Q

What is ARP ?

A

ARP (Address Resolution Protocol) is a protocol used to map an IP address to a physical (MAC) address on a local network.

50
Q

How can a device communicate with another device on the same network ?

A

it broadcasts an ARP request to obtain the MAC address of the intended recipient. Once the MAC address is obtained, the data can be sent over the network using the MAC address as the destination.

51
Q

What is RPC ?

A

RPC (Remote Procedure Call) is a protocol used for communication between different processes or applications in a distributed system. It allows a process to invoke a procedure or method in another process or application, and receive a response back as if the procedure was executed locally.

52
Q

1st step in RPC

A

Client sends a request: The client initiates an RPC request by sending a message to the server that specifies the name of the procedure to be executed and any necessary parameters

53
Q

2nd RPC step ?

A

Message transmission: The message is transmitted over the network using a transport protocol such as TCP or UDP.

54
Q

3rd step in RPC ?

A

Server receives the request: The server receives the request message and parses it to determine the procedure to be executed and the parameters.

55
Q

4rth step in RPC ?

A

Procedure execution: The server executes the requested procedure, using the provided parameters.

56
Q

5th step in RPC ?

A

Response generation: The server generates a response message that contains the result of the procedure execution, and sends it back to the client.

57
Q

6th step in RPC ?

A

Message transmission: The response message is transmitted back to the client over the network.

58
Q

final step in RPC ?

A

Client receives the response: The client receives the response message, parses it to obtain the result of the procedure execution, and continues with its processing.

59
Q

4 benefits of using RPC ?

A

There are several benefits to using RPC, including:
- Abstraction: RPC provides an abstraction layer that allows processes to communicate with each other without needing to know the details of the underlying network protocols or hardware.
- Reusability: RPC can be used to invoke procedures in different processes or applications, making it a powerful tool for building distributed systems.
- Modularity: RPC allows different components of a distributed system to be developed and tested independently, and then connected together using RPC.
- Interoperability: RPC can be implemented in different programming languages, making it possible for applications written in different languages to communicate with each other.

60
Q

3 challenges faced while using RPC

A

However, there are also some challenges associated with RPC, such as:
- Scalability: RPC can introduce bottlenecks in highly concurrent systems, as it typically involves blocking network I/O.
- Security: RPC can be vulnerable to attacks such as injection, interception, and impersonation, which can compromise the integrity, confidentiality, and availability of the system.
- Versioning: RPC can be difficult to version, as changes to the interface of a procedure can break compatibility with existing clients.

61
Q

What is the OSI

A

the OSI provides a standard for different computer systems to be able to communicate with each other.

62
Q

why is the OSI still useful ?

A
  • the OSI Model can help to break down the problem and isolate the source of the trouble
  • If the problem can be narrowed down to one specific layer of the model, a lot of unnecessary work can be avoided.
63
Q

What is WebRTC ?

A

WebRTC (Web Real-Time Communication) is a protocol that enables peer-to-peer communication between web browsers without the need for plugins or additional software.

64
Q

webRTC applications ?

A

It is often used for video and audio conferencing, file sharing, and other real-time applications.

65
Q

MQTT ?

A

MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol that is often used in IoT (Internet of Things) applications. It is designed to be low-bandwidth and efficient, making it well-suited for devices with limited processing power or battery life.

66
Q

what is FTP and SFTP ?

A

FTP (File Transfer Protocol) and SFTP (Secure File Transfer Protocol) are protocols used for transferring files between clients and servers. FTP is an unsecured protocol, while SFTP uses SSH (Secure Shell) to encrypt data in transit.

67
Q

What is DNS ?

A

DNS (Domain Name System) is a protocol that is used to translate domain names (e.g. google.com) into IP addresses (e.g. 172.217.7.206). It is essential to the functioning of the web, as it allows users to access websites using human-readable domain names rather than IP addresses.

68
Q

What is CA ?

A

A CA (Certificate Authority) is a trusted third-party organization that issues digital certificates used to verify the identity of individuals, organizations, or other entities on the internet. CAs validate the identity of certificate holders and digitally sign the certificates they issue to ensure their authenticity. This helps provide a secure and reliable way to identify and communicate with other entities over the internet.

69
Q

What are SSEs ?

A

SSE (Server-Sent Events) is a technology that enables a server to push data to a client as soon as it becomes available, without the need for the client to request it. The server sends a stream of data over a single HTTP connection, and the client receives it as a stream of events that can be processed in real-time.

70
Q

Where can SSEs be used ?

A

SSE is typically used for real-time notifications, chat applications, and live updates.

71
Q

Enlist 8 network optimization methods

A

Here are some network optimization methods:
- Minimize HTTP Requests
- Use Content Delivery Networks (CDNs)
- Use Compression
- Use HTTP/2
- Use Lazy Loading
- Optimize Images
- Use HTTP Caching / other caching approaches
- Use Progressive Rendering

72
Q

What is the successor to SSL ?

A

TLS

73
Q

what is the connection between TLS, HTTP and HTTPS ?

A

TLS is commonly used to secure HTTP traffic in the form of HTTPS.

74
Q

What is the purpose of TLS ?

A

is used to encrypt data and provide authentication between clients and servers.

75
Q

What is TLS ?

A
  • TLS (Transport Layer Security) is a cryptographic protocol that provides secure communication over a network, such as the internet.
76
Q

applications of TLS ?

A

TLS is used to secure a wide variety of internet traffic, including
- email,
- messaging, and
- e-commerce transactions.

77
Q

1st step of a TLS handshake

A
  • the client sends a “hello” message, including supported protocols and cryptographic algorithms, to the server.
78
Q

2nd step in a TLS handshake

A
  • The server responds with a certificate and a “hello” message of its own.
79
Q

3rd step in a TLS handshake

A

The client and server then negotiate a shared secret key and establish a secure session for encrypted data transfer.

80
Q

List 3 ways via which CDNs improve performance.

A
  • distributing content across multiple servers,
  • reducing the distance between the user and the server, and
  • allowing for faster access to resources.
81
Q

List 4 ways via which HTTP/2 contribute to network optimization

A
  • supports multiplexing,
  • supports server push
  • can reduce the number of requests needed
  • allow for faster data transfer.
82
Q

What is progressive rendering ?

A

the browser starts to render the page as soon as possible, even if all the resources haven’t been downloaded yet.

83
Q

What type of a communication channel does a websocket provide ?

A
  • WebSockets is a protocol that provides a persistent, bidirectional communication channel between a client and a server.
84
Q

What are the 7 OSI layers ?

A

The OSI (Open Systems Interconnection) model consists of seven layers that represent the different stages of data communication from one device to another. From bottom to top, the layers are:
- Physical layer: Defines the physical characteristics of data transmission, such as cables and network interfaces.
- Data link layer: Manages the flow of data over a physical connection and performs error detection and correction.
- Network layer: Routes data between different networks.
- Transport layer: Provides reliable end-to-end delivery of data, using protocols such as TCP and UDP.
- Session layer: Manages and maintains sessions between applications.
- Presentation layer: Formats and encrypts data for transmission and performs data compression.
- Application layer: Provides network services to applications and end-users, such as HTTP and FTP.