Backend Flashcards

1
Q

Which three are the most common backend architectures?

A

Monolithic, micro services and serverless

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

What is load balancing?

A

a technique used to distribute incoming network traffic across multiple servers

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

How to ensure that no single server becomes overwhelmed with too many requests?

A

Use load balancing

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

What is a load balancer?

A

A device or software that acts as an intermediary between clients and servers.

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

What does a load balancer do?

A

Distribute incoming requests to multiple backend servers based on a specific algorithm.

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

What is the purpose of a load balancer?

A

Improve responsiveness, availability, and reliability of the application.

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

What are four common algorithms for load balancing?

A

Round Robin: distribute requests sequentially across all servers.

Least Connections: Requests are sent to the server with the fewest active connections.

IP Hash: distribute requests based on a hash of the client’s IP address, ensuring that a particular client’s requests always go to the same server.

Weighted Round Robin/Least Connections: Some servers may have more capacity and thus can handle more traffic, so weights are assigned to servers accordingly.

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

What is session persistence?

A

Also known as sticky sessions, this feature ensures that a user’s session is consistently directed to the same server. This is important for applications that store session state on the server.

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

Three types of load balancers?

A

Hardware, software and cloud-based.

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

Whats a hardware load balancer?

A

Dedicated hardware device designed specifically for load balancing. Typically more expensive and provide high performance.

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

What are software load balancers?

A

Software-based load balancers that can run on standard hardware. Examples include HAProxy, NGINX, and Apache HTTP Server.

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

What are cloud-based load balancers?

A

Load balancing services provided by cloud providers, such as AWS Elastic Load Balancer (ELB), Google Cloud Load Balancing, and Azure Load Balancer.

These services offer scalability and ease of use without the need to manage hardware.

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

What is a backend architecture? (And what does it define?)

A

The backbone of a web application.
Defining how servers, databases, and other resources are structured and interact with each other.

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

Key features of a monolithic backend?

A

A single, unified codebase that handles all aspects of the application.

Typically includes the user interface, business logic, and data access layers in one place.

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

Key feature of a micro services backend?

A

Breaks down the application into smaller, independent services, each responsible for a specific piece of functionality and can be developed, deployed, and scaled independently.

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

Two key features of a ‘serverless’ backend?

A

Uses cloud services to manage the infrastructure, allowing developers to focus on writing code.

Functions as a Service (FaaS) is a common model where individual functions are deployed and executed in response to events.

17
Q

Three reasons for when to use monolithic architecture?

A
  1. Simple applications with a small team.
  2. Projects with tight deadlines and limited scope.
  3. Early-stage startups needing rapid development and iteration.
18
Q

Name three challenges with a monolithic architecture?

A
  1. Hard to scale horizontally.
  2. Tight coupling makes it difficult to update or change parts of the application.
  3. As the application grows, it becomes harder to maintain and deploy.
19
Q

Three key principles to follow when using monolithic backend?

A
  1. Modularize the codebase to improve manageability.
  2. Use clear, well-defined interfaces between different parts of the application.
  3. Plan for eventual refactoring into a more scalable architecture.
20
Q

Three reasons for when to use a microservices backend?

A
  1. Large, complex applications with multiple teams.
  2. Applications that require high scalability and availability.
  3. Projects needing rapid, frequent updates and deployments.
21
Q

Three main challenges using microservices?

A
  1. Increased complexity in managing multiple services.
  2. Requires robust inter-service communication and data consistency mechanisms.
  3. Deployment and monitoring become more complex.
22
Q

Three key principles to follow when using microservices architecture?

A
  1. Define clear service boundaries and responsibilities.
  2. Implement effective communication strategies (e.g., REST, gRPC, messaging queues).
  3. Use centralized logging, monitoring, and orchestration tools (e.g., Kubernetes).
23
Q

Three reasons for when to use serverless architecture?

A
  1. Applications with variable or unpredictable loads.
  2. Projects with tight budgets needing a pay-as-you-go model.
  3. Prototyping or building MVPs (Minimum Viable Products).
24
Q

Three challenges using serverless architecture?

A
  1. Cold start latency can affect performance.
  2. Limited control over the underlying infrastructure.
  3. Vendor lock-in with specific cloud providers.
25
Q

Three key principles when using serverless architecture?

A
  1. Design for statelessness and scalability.
  2. Implement effective monitoring and error handling.
  3. Use managed services for databases, authentication, and other common needs.
26
Q

What three layers are often stored together in a monolith backend?

A

user interface,
business logic,
and data access layer