Networking Flashcards

(37 cards)

1
Q

What is a client?

A

A device or program that requests and receives services from a server.

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

What is a server?

A

A program or device that stores and provides data to others in a network.

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

What is the relationship between a client and server?

A

A client initiates requests for services, which are provided by a server.

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

What do 2xx HTTP status codes indicate?

A

A request successfully received and accepted by the server.

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

What do 3xx HTTP status codes indicate?

A

Further action is required to complete the request - typically involves redirection.

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

What do 4xx HTTP status codes indicate?

A

Client error - there is an issue with the request itself or the client’s actions.

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

What do 5xx HTTP status codes indicate?

A

Server error meant the server was unable to complete the request.

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

What is HTTP?

A

Hypertext Transfer Protocol - a set of rules that dictate how information will be transferred between networked devices.

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

What is a HTTP header?

A

A field of an HTTP request/response that passes additional related metadata - like content-type and autorization.

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

What are HTTP methods used for?

A

To indicate the action a client would like to perform on a given resource.

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

What is the default HTTP method for the curl command-line tool?

A

GET; You can also specify a method using -X

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

What is JSON?

A

JavaScript Object Notation - a data-interchange format designed to send information between different machines/services.

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

What are the benefits of JSON?

A
  • Human & machine-readable
  • Lightweight
  • Supported by many programming languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does a DNS (Domain Name System) server do?

A

It translates human-readable domain names (e.g. www.google.com) into their corresponding IP addresses.

Commonly referred to as a ‘phonebook of the internet’.

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

What is a CLI?

A

Command-line interface - a text-based interface where you can input commands to interact with a computer’s OS.

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

What does TCP stand for? Where is it used?

A

Transmission Control Protocol - a networking protocol used for reliable and ordered delivery of data.

Ensures data packets arrive in correct order and w/out corruption.

17
Q

What does UDP stand for? Where is it used?

A

User Datagram Protocol - a data transport protocol used to send data at speed (connectionless, less reliable than TCP).

18
Q

What is WebSockets? What is used for?

A

A technology that facilitates bi-directional, real-time communication over a single, consistent TCP connection. It is used for typing notifications, for example.

19
Q

What is an API?

A

Application Programming Interface - a set of rules governing communication and data exchange between multiple software programs.

20
Q

What are the main features of RESTful APIs?

A
  • Client-server separation
  • Stateless
  • Caching
  • Uniform interface
  • Layered system
  • Code-on-demand

See here for more detail on each feature (IBM article)

21
Q

Which HTTP method creates a new resource?

22
Q

Which HTTP method retrieves information?

23
Q

What does the PUT HTTP method do?

A

Overwrites an entire resource with a new version.

24
Q

What does the PATCH HTTP method do?

A

Applies partial updates to an existing resource.

25
What is a query parameter?
An optional parameter passed in a URL to provide extra information, typically for sorting or filtering results.
26
What does idempotency mean in the context of HTTP methods?
An *idempotent* HTTP method will generate the same result if it is run multiple times as when it is run just once.
27
What is the role of a router in providing Internet connections?
It forwards data packets between computer networks to their intended IP addresses.
28
True or False: Every device globally has a completely unique IP address.
False - every device on a *local* network has a unique IP address.
29
What is a port?
A virtual endpoint within a computer's OS that identifies a specific process or service e.g. port 80 is associated with HTTP. | Helps a computer pass data to applications which can interpret them.
30
What is a context manager? | ```with``` is an example used in Python.
An object used to manage resources, allowing you to allocate and release them as you want. ## Footnote E.g. closing a file after new data has been written to it.
31
What does this common error code mean: `404`
Resource not found on the server.
32
What does this common error code mean: `400`
Bad request ## Footnote This could be due to incorrectly formatted data, an invalid URL etc.
33
What does this common error code mean: `200`
OK ## Footnote The request was received, understood and accepted by the server.
34
What does this common error code mean: `403`
The server does not authorise the request. ## Footnote The user may be authenticated but have insufficient permissions to access the resource.
35
What does this common error code mean: `502`
Bad Gateway ## Footnote A communication issue exists between two servers which need to interact to fulfil the request.
36
What does this common error code mean: `500`
Generic error response - a more specific error code cannot be given to respond to the request.
37