Load balancing Flashcards

1
Q

What is the purpose of a load balancer?

A

To distribute request and response traffic across multiple servers to manage and optimise server response time and server load.

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

What are the alternatives to using horizontal scaling and adding load balancing servers?

A

You can use vertical scaling and increase the size of the VM.

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

What are the disadvantages of scaling vertically to avoid using a load balancing solution?

A

Vertical scaling can increase costs more steeply than horizontal scaling with load balancing and having multiple VMs does remove the SPOF (single point of failure) so if a server goes down, there are other servers to handle the traffic when scaling horizontal scaling plus load balancing. Also scaling out by adding a new vm does not require restarting a VM so the traffic is handled during the process of adding a VM whereas swapping a single VM for a larger one would require a VM restart during which no traffic would be handled.

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

What are the SLA (service level agreement) stated availability that Azure guarantees?

A
  • 2+ VMs in the same region across 2+ availability zones = 99.99% availability
  • 2+ VMs in the same availability set or dedicated host group = 99.95% availability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the load balancing options offered by Azure?

A
  • Azure load balancer
  • Azure application gateway
  • Azure front door service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the SKUs o azure load balancers?

A
  • Basic SKU (300 instances in the back end)
  • Standard SKU (production ready, NAT gateway, Private link, availability zones and upto 1000 vms in the back end)
  • Gateway SKU (not covered in AZ-104)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to create an azure load balancer?

A
  • Go to the Azure UI and click the + to create a resource. Filter for load balancer and click ‘Azure services only’ if you want to avoid including the 3rd party load balancing products from the search results.
  • Click the azure load balancer. This is a layer 4 load balancer using the 5 tupe (sourceIP, sourcePort, destIP, destPort, protocolType)
  • Follow the UI wizard, choosing the SKU and type according to your needs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the main differences between the standard and basic Azure load balancer SKU?

A

Basic

  • small apps with no need for high availability or redundancy
  • Only NIC based (network interface card for VMs) so traffic can only be forwarded to Azure vms
  • TCP and UDP (same as standard)
  • Can only target CMs within an azure availability set or scale set
  • Health probes over HTTP or TCP
  • No support for availability zones or redundancy
  • Less secure by default leaving the NSGs as an optional additional task for the administrator to set up
  • No SLA (best effort)
  • Larger scale production app ready
  • Can forward traffic to non azure VMs
  • Can target individual VMs or those in an availability set or scale set
  • Health probes over HTTP, HTTPS or TCP
  • Availability zones supported
  • NSG set up by default to deny all inbound traffic. Ingress must be configured. Traffic from within the private network is allowed by default.
  • SLA guarantees
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s the difference between the regional and the global tier of azure load balancers?

A

Regional only support forwarding traffic to VMs, availability sets or scale sets in the same region as the load balancer. Global tier load balancers support them from other regions.

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

What is a load balancer frontend?

A

It’s the ingress point where inbound traffic is sent i.e. the ip address of your application. Then the load balancer forwards the traffic to the backend servers according to the algorithm and configuration of the load balancer.

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

How do you create the load balancing rules?

A

Configure that in the inbound rules and outbound rules of the load balancer frontend.

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

What is the purpose of source network access translation (SNAT)?

A

In terms of load balancing, this is used to perform traffic ip translation from the backend servers to the other side of the load balancers.

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

What is a backend pool?

A

This is a sort of container where all the vms to which the loadbalancer frontend can forward trafic to exist. The load balancer frontend cannot forward traffic to vms outside of a backend pool. Non azure VMS must be added to a backend pool to be serviced by the LBFR.

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

How to add a backend pool to a loadbalancer?

A

From the azure ui interface of the load balancer there is a link to backend pools in the blade menu. From there you can create one or more backend pools and add backend vms or servers to it by NIC association or IP addresses.

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

What are the available health probed which can be added to an Azure load balancer?

A
  • TCP (level 4)
  • HTTP (level 7)
  • HTTPS (level 7)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the purpose of health probes?

A

The load balancer uses these to determine if a backend server is healthy or not. Backend servers it deems to be unhealthy will not receive traffic (though th ehealth probes will continue and once it is healthy again it will have traffic directed to it).

TCP health probes (level 4) don’t have any particular interest in the state of the app, they just see if requests to the IP and port receive an expected response.

HTTP or HTTPS health probes can be more useful as if you have a ip/health_probe.html page, then the application stats can be returned and logic around the health of the back end state can be implemented.

17
Q

Where can you access quick starts for Azure services like loadbalancer?

A

In the github repo https://github.com/Azure/azure-quickstart-templates

18
Q

What is the difference between an Azure load balancer’s inbound NAT rules and it’s load balancing rules?

A

Inbound NAT rules are explicit, predictable and non-dynamic. They are essentially mapping of inbound traffic on port X to a single backend server on port Y.

Load balancing rules are smarter and choose which backend server to forward traffic to according to the configured rules. In this way you cannot predict which backend server will receive the traffic but you can be sure that it will be a well reasoned one.

19
Q

How can you be configure alerts to notify you when health probes are failing?

A

Using the alerts link in the blade menu of the load balancer in the Azure UI.

20
Q

What is the purpose of an application gateway and why is it different to a load balancer?

A

A standard level 4 load balancer like the Azure load balancer can only understand ports and ips. It cannot understand URLs or be highly customised with logic. For that purpose, you need to use an application gateway which is a level 7 loadbalancer so it does understand HTTP based rules.

21
Q

Is there a free option for application gateways?

A

No

22
Q

What are the main choices to make when creating a new application gateway?

A
  • Tier
    • Standard
    • Standard v2
    • WAF (web application firewall can block suspicious traffic)
    • WAF V2
  • Enable autoscaling (new application gateways can automatically be spun up to handle traffic spikes)
  • the orchestration mode ( uniform or flexible)
23
Q

What is the mechanism for traffic routing in an application gateway?

A

Essentially the difference is that you do path based routing rather than ip and port based routing. Traffic is forwarded to the correct IP but depending on the url, it could be sent to specific servers. This could be forward to CDN endpoints when the request is for an image for example.

24
Q
A