core concepts Flashcards

(19 cards)

1
Q

type of API or System Interface

A

RESTful API, GraphQL API, Wire Protocol

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

Type of Scaling

A

Horizontal scaling, vertical scaling

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

Horizontal scaling

A

adding more machines to a system to increase its capacity

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

vertical scaling

A

process of adding more resources to a single machine to increase its capacity

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

CAP Theorem

A

Consistency, Availability, and Partition tolerance

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

consistency

A

all nodes in your system will see the same data at the same time. When a write occurs, all subsequent reads will return that value, regardless of which node they hit. However, during a network partition, some nodes may become unavailable to maintain this consistency guarantee.

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

availability

A

every request will receive a response, even during network partitions. The tradeoff is that different nodes may temporarily have different versions of the data, leading to inconsistency. The system will eventually reconcile these differences, but there’s no guarantee about when this will happen.

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

Lock

A

Shared resources which can only be accessed by one client at a time.

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

Lock requirement

A

lock as little as possible to ensure that we’re not blocking other clients from accessing the system.
locks to be held for as short a time as possible. This means that we want to lock only for the duration of the critical section.

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

Indexing

A

process of creating a data structure that makes reads faster.

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

Way of indexing

A

keeping our data in a hash map by a specific key
keep our data in a sorted list

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

type of Communication Protocols

A

HTTP(S), SSE/long polling, websockets

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

when to use HTTP

A

simple request and responses

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

long polling

A

the client makes a request to the server and the server holds the request open until it has new data to send to the client. Once the data is sent, the client makes another request and the process repeats. Notably, you can use standard load balancers and firewalls with long polling - no special infrastructure needed.

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

Websockets

A

realtime, bidirectional communication

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

SSE

A

allows the server to push updates to the client whenever new data is available, without the client having to make repeated requests as in long polling

17
Q

type of security

A

Authentication / Authorization, Encryption, Data Protection, Monitoring,

18
Q

how to implement Authentication / Authorization

A

API Gateway or a dedicated service like Auth0, My API Gateway will handle authentication and authorization

19
Q

Encryption

A

cover both the data in transit (e.g. via protocol encryption) and the data at rest (e.g. via storage encryption). HTTPS is the SSL/TLS protocol that encrypts data in transit and is the standard for web traffic. If you’re using gRPC it supports SSL/TLS out of the box. For data at rest, you’ll want to use a database that supports encryption or encrypt the data yourself before storing it.