Inno 3.1 Protocols Flashcards

(65 cards)

1
Q

What is TCP (Transmission Control Protocol)?

A

TCP is a connection-oriented protocol that ensures reliable, ordered, and error-checked delivery of data between applications.

It establishes a connection before transferring data and confirms delivery using acknowledgments. It’s widely used for applications where accuracy is critical, such as web pages, emails, and file transfers. TCP is slower than UDP but more reliable. Examples of protocols using TCP include HTTP, FTP, and SMTP.

RELIABLE, ORDERD, ERROR-CHECKED, CONNECTION

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

What is UDP (User Datagram Protocol)?

A

UDP is a connectionless protocol that sends data without guaranteeing delivery, order, or error correction. It is faster than TCP and is ideal for real-time applications like video streaming, gaming, and VoIP, where speed is more important than perfect accuracy. Because it doesn’t establish connections or wait for acknowledgments, it’s lightweight and low-latency. However, it is less reliable and can result in lost or out-of-order packets.

CONNECTIONLESS, NOT IN ORDER

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

What is SMTP (Simple Mail Transfer Protocol)?

A

SMTP is a protocol used for sending emails between servers. It works over TCP (usually port 25, 587, or 465 with SSL) and is responsible for the delivery of messages from a client to a mail server or between mail servers. SMTP is a push protocol — it only sends messages, not retrieves them. Email clients usually use it in combination with POP3 or IMAP for receiving mail.

MAIL, JUST SEND

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

What is FTP (File Transfer Protocol)?

A

FTP is a protocol used to transfer files between a client and server over a network. It operates over TCP (typically ports 20 and 21) and supports basic authentication with username and password.

FTP allows both uploading and downloading of files but transmits data in plain text, making it insecure by modern standards. For secure transfers, SFTP or FTPS is recommended.

SUPPORT BASIC AUTH, ALLOWS UPLOADING AND DOWNLOADING, PLAIN TEXT

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

What is SFTP (SSH File Transfer Protocol)?

A

A: SFTP is a secure file transfer protocol that operates over SSH (port 22). Unlike FTP, it encrypts both commands and data, protecting sensitive information during transmission. SFTP provides secure file access, transfer, and management functionalities. It is widely used in enterprise environments where data security is critical.

NOT A VERSION ON SFTP

SFTP is not a version of FTP—it is a completely separate protocol.

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

What is HTTP (Hypertext Transfer Protocol)?

A

HTTP is the foundation of data communication on the web, used to transmit web pages and APIs.

It is a stateless, request-response protocol running over TCP (usually port 80 or 443 for HTTPS). HTTP defines methods like GET, POST, PUT, and DELETE to interact with resources.

While simple and widely adopted, it is limited for real-time or bidirectional communication. HTTPS (HTTP Secure) adds encryption via TLS/SSL.

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

What are WebSockets?

A

A: WebSockets provide a full-duplex communication channel over a single TCP connection.

Unlike HTTP, which is request/response-based,

WebSockets allow both the client and server to send data anytime, making them ideal for real-time applications like chats, games, and live feeds.

They start as an HTTP connection and then upgrade to the WebSocket protocol.

WebSockets are more efficient for frequent, lightweight messaging compared to repeated HTTP requests.

SEND DATA ANY TIME

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

What is gRPC?

A

gRPC is a high-performance, open-source RPC (Remote Procedure Call) framework developed by Google.

It uses HTTP/2 as its transport protocol and Protocol Buffers (protobuf) as the interface definition language and message format.

gRPC enables client-server communication in a more efficient, strongly-typed, and language-agnostic way. It supports streaming, bi-directional communication, and is ideal for microservices. Compared to REST, gRPC is more compact and faster.

PROTOBUFFS AS INTERFACE DEFINITION LANGUAGE

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

What is AMQP (Advanced Message Queuing Protocol)?

A

AMQP is a protocol designed for message-oriented middleware, enabling secure and reliable communication between distributed systems.

It supports features like message queuing, routing, publish/subscribe, and delivery acknowledgments.

AMQP is used in brokers like RabbitMQ and is ideal for enterprise messaging and decoupled architectures. It ensures messages are not lost and can be processed even if the receiver is temporarily offline.

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

What is MQTT (Message Queuing Telemetry Transport)?

A

MQTT is a lightweight messaging protocol designed for constrained devices and low-bandwidth, high-latency networks. It follows a publish/subscribe model and is commonly used in IoT (Internet of Things) scenarios.

MQTT is optimized for small payloads and power efficiency, making it ideal for sensors, smart home devices, and mobile applications. It uses TCP (typically port 1883) and supports persistent sessions and QoS levels.

SMALL PAYLOAD, POWER EFFICIENCY

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

What are the main differences between TCP and UDP?

A

TCP is connection-oriented, reliable, and ensures data arrives in order, making it suitable for web, email, and file transfer. UDP is connectionless, faster, and does not guarantee delivery or order, making it ideal for real-time applications like video calls or gaming.

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

In which scenarios would you prefer UDP over TCP?

A

You would prefer UDP in real-time applications such as video streaming, VoIP, or online gaming, where speed and low latency are more important than perfect reliability or packet order.

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

How does SFTP differ from FTP?

A

SFTP uses SSH for encryption and operates on a single secure connection (usually port 22), while FTP transmits data in plain text and requires separate control and data channels. SFTP is much more secure and modern.

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

Why is HTTP considered a stateless protocol?

A

Because each HTTP request is independent — the server does not retain any information about previous requests. Any necessary state (like sessions) must be maintained client-side (e.g., via cookies or tokens).

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

How do WebSockets improve upon HTTP for real-time communication?

A

WebSockets provide a persistent, bidirectional communication channel over a single TCP connection, eliminating the need for repeated requests (polling).

This reduces latency and overhead for real-time updates like chat, notifications, or dashboards.

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

What are some use cases where gRPC is more suitable than REST?

A

gRPC is more efficient for microservices, internal service-to-service communication, and performance-critical applications due to its support for binary format, streaming, and strong typing with Protocol Buffers.

BINARY FORMAT AND STRONG TYPING WITH PROTOCOL BUFFERS

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

What is the role of a message broker in protocols like AMQP and MQTT?

A

The broker handles routing, queuing, and delivering messages between publishers and subscribers.

It enables decoupling of services and ensures reliable communication even if consumers are temporarily offline.

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

How does MQTT ensure lightweight communication for IoT devices?

A

MQTT minimizes bandwidth usage with small headers, uses TCP for stability, and allows clients to subscribe to only the topics they care about. It also supports different Quality of Service (QoS) levels for message delivery guarantees.

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

What does it mean that AMQP supports message acknowledgments?

A

AMQP allows consumers to confirm when messages are successfully processed. If a message is not acknowledged, the broker can re-deliver it, ensuring reliability in communication.

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

What is a common security risk with FTP, and how can it be mitigated?

A

FTP transmits data and credentials in plain text, making it vulnerable to interception. This can be mitigated by using secure alternatives like SFTP or FTPS, which encrypt communication.

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

How does gRPC handle communication efficiency compared to REST?

A

gRPC uses HTTP/2 for multiplexed streams and binary serialization (Protocol Buffers), making it significantly more efficient in terms of speed and payload size than REST with JSON over HTTP/1.1.

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

What transport protocol is used by WebSockets and MQTT?

A

Both WebSockets and MQTT use TCP as their transport protocol, ensuring reliable delivery of messages.

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

What is the difference between push and pull models in messaging protocols?

A

A: In a push model (like SMTP), the sender initiates the message delivery. In a pull model (like POP3/IMAP), the receiver fetches messages. Publish/subscribe protocols like MQTT allow for event-driven communication where messages are pushed to all subscribers of a topic.

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

Which port does HTTP and HTTPS use by default?

A

HTTP uses port 80 by default, while HTTPS (secured with TLS/SSL) uses port 443.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Why is TCP preferred for file transfers instead of UDP?
TCP ensures data integrity with acknowledgments, retransmissions, and packet ordering, which are essential for accurate file transfers — unlike UDP, which does not guarantee delivery.
26
What does connection-oriented mean in the context of TCP?
It means a reliable session is established before data is transmitted. The client and server perform a 3-way handshake to agree on communication before exchanging data.
27
Can UDP be used securely?
Yes, but not by default. UDP itself doesn’t support encryption, but security can be added with external protocols like **DTLS** (Datagram TLS) or through VPN tunnels.
28
What is the purpose of the 3-way handshake in TCP?
It establishes a reliable connection by exchanging SYN, SYN-ACK, and ACK packets, ensuring both sides are ready to transmit and receive data.
29
What is the difference between active and passive FTP modes?
In active mode, the server initiates the data connection to the client. In passive mode, the client initiates both control and data connections, which works better behind firewalls.
30
What encryption is used in SFTP?
SFTP uses SSH (Secure Shell) for encryption, ensuring secure authentication and data transmission over port 22.
31
What is the role of headers in HTTP communication?
HTTP headers carry metadata such as content type, authentication tokens, user agents, and caching instructions, helping the server understand how to process the request.
32
How does WebSocket handle connection lifecycle?
WebSockets begin as an HTTP connection, then "upgrade" via a handshake to a persistent, full-duplex WebSocket connection, which remains open until explicitly closed by either party.
33
What is backpressure in WebSocket or gRPC streaming?
Backpressure is a mechanism to prevent a fast sender from overwhelming a slower receiver by **pausing or slowing down the flow of data** when the receiver can’t keep up.
34
What is a proto file in gRPC?
**A .proto file defines the structure of messages and the services in Protocol Buffers syntax, which gRPC** uses to auto-generate client and server code in multiple languages.
35
What protocol does gRPC use under the hood?
gRPC uses **HTTP/2** as its transport protocol, which supports multiplexing, streaming, and efficient binary framing.
36
What messaging pattern does MQTT follow?
MQTT uses the **publish/subscribe** pattern, where clients publish messages to topics, and others subscribe to those topics to receive updates in real time.
37
How does QoS (Quality of Service) work in MQTT?
MQTT has 3 levels: QoS 0: At most once (no delivery guarantee) QoS 1: At least once (may be duplicated) QoS 2: Exactly once (no duplication)
38
How does AMQP differ from MQTT in message delivery?
AMQP is more feature-rich and enterprise-focused, supporting complex routing, message durability, and delivery acknowledgment; MQTT is simpler and designed for constrained IoT devices.
39
Can WebSockets work over HTTPS?
Yes. Secure WebSockets use the **wss://** protocol and run over port 443, enabling encrypted, real-time communication through firewalls and proxies. WEBSOCKETS CAN BE ENCRYPTED
40
Why is Protocol Buffers (protobuf) better for gRPC than JSON?
Protobuf is compact and **binary**-encoded, which reduces payload size and improves parsing speed — ideal for performance-critical services.
41
What is the difference between REST and gRPC in terms of data format?
REST typically uses JSON (human-readable), while gRPC uses Protocol Buffers (binary and schema-based), resulting in better performance and smaller messages.
42
What is the OSI Model and why is it important?
The OSI (**Open Systems Interconnection**) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into 7 layers. It helps understand how data travels through networks and separates concerns between hardware, transport, and applications.
43
What are the 7 layers of the OSI model (from top to bottom)?
Application Presentation Session Transport Network Data Link Physical
44
What are some real-world protocols used in the Transport layer of the OSI model?
**TCP and UDP operate at the Transport layer (Layer 4)**. They handle data segmentation, flow control, and delivery reliability.
45
Which layer is responsible for routing data between devices on different networks?
The Network layer (Layer 3), where IP (Internet Protocol) operates, is responsible for routing, addressing, and packet forwarding.
46
Which layer is responsible for MAC addresses and Ethernet?
The Data Link layer (Layer 2) deals with physical addressing (MAC), framing, and error detection for local network communication.
47
What does the Physical layer (Layer 1) handle?
It deals with the actual physical medium (cables, radio waves, voltages), and the transmission and reception of raw bits (0s and 1s) over a physical medium.
48
What is the difference between the TCP/IP model and the OSI model?
TCP/IP has 4 layers: Application, Transport, Internet, and Network Access. It is the practical, real-world model used on the internet, while OSI is more of a theoretical reference model with 7 layers.
49
Which protocols operate in the Application layer of the OSI model?
HTTP, FTP, SMTP, DNS, MQTT, and others — these are protocols that provide services directly to user applications.
50
How does data flow through the OSI model layers?
When sending data, it flows from Layer 7 (Application) down to Layer 1 (Physical). On the receiving side, it flows from Layer 1 up to Layer 7.
51
What is encapsulation in networking?
**Encapsulation is the process of wrapping data with protocol-specific headers** (and sometimes footers) as it moves down the OSI layers, forming a complete packet ready for transmission.
52
What are ports in networking and which layer uses them?
Ports are logical endpoints used to identify specific processes or services on a host. They are used in the Transport layer (Layer 4) with TCP/UDP.
53
What is the difference between an IP address and a MAC address?
An IP address (Layer 3) identifies a device on a network globally; a MAC address (Layer 2) uniquely identifies a device on the local network segment.
54
What is ARP (Address Resolution Protocol) used for?
ARP is used to map IP addresses (Layer 3) to MAC addresses (Layer 2) in a local network. It's essential for proper packet delivery on Ethernet-based networks.
55
What protocol is responsible for IP packet fragmentation and routing?
IP (Internet Protocol) in the Network layer handles packet fragmentation, addressing, and routing between networks.
56
What is a socket in networking?
**A socket is an endpoint for sending or receiving data across a network**. It's typically defined by an IP address and port number (e.g., 192.168.1.10:80).
57
What is the purpose of DNS?
DNS (Domain Name System) resolves human-readable domain names (like google.com) into IP addresses that computers use to route traffic.
58
What is the purpose of TLS in protocols like HTTPS?
TLS (Transport Layer Security) provides encryption, integrity, and authentication over TCP, commonly used in HTTPS to secure web communication.
59
Why do we need both TCP and IP?
IP handles addressing and routing (where packets go), while TCP ensures that the data arrives completely and in the correct order (how it arrives). Together, they form the basis of reliable internet communication.
60
What’s the difference between a frame, a packet, and a segment?
Frame (Layer 2): includes MAC addresses and data link info. Packet (Layer 3): includes IP header and payload. Segment (Layer 4): includes TCP/UDP header and data.
61
What happens when you type a URL in your browser?
DNS resolves the domain to an IP address TCP connection is established (3-way handshake) TLS handshake (if HTTPS) HTTP request is sent Server responds Browser renders the content
62
What is the main difference between POP3 and IMAP
POP3 downloads emails and often deletes them from the server, while IMAP keeps emails on the server and syncs changes across devices. POP3 DOWNLOADS AND DELETS AND WHILE IMAP KEEPS IT ON THE SERVER
63
Why is IMAP better for accessing email from multiple devices?
Because IMAP syncs email folders and statuses (read, deleted, etc.) with the server, allowing consistent access across all devices.
64
What is POP3?
POP3 (Post Office Protocol version 3) is a protocol used to download emails from a server to one device, usually removing them from the server afterward. POP3 downloads emails to one device and usually deletes them from the server, so emails are stored locally and not synced across devices.
65
What is IMAP?
IMAP (Internet Message Access Protocol) is a protocol that allows you to access and manage your emails directly on the mail server from multiple devices. IMAP keeps emails on the server and syncs them across all your devices, including folders and read/unread status.