Azure infrastructure 101

·

4 min read

To research

I'll encounter these two the most frequently - research these

  • Function apps (almost like a webjob)

    • Quite a mission to port your webjob over to a function app cos we're all set up in app service

    • But if our webjobs were already running in a function app instead of an App service, it'd be fine

  • App Service

Research: AZ-900

  • John savill's technical training on youtube

Key takeaways

Terminology

  • There are official terms, but everyone uses them interchangeably and loosely

  • I will do the same in my notes until I understand the terms better

  • I'll use quotation marks for "terms" I'm uncertain if they are the right term to use

Gateway

  • it's the entry point to all our "app services" / "servers"

  • It's responsible for load balancing

  • We have one gateway concept, but in reality, there could be more working together

App services

  • We have lots of these

  • Some handle all the traffic coming to our url (e.g. www.google.com)

  • Some handle multiple webjobs

  • Some handle single, very intensive webjobs, e.g. updating transactions

    • This requires multiple instances just on its own, because it's doing so much

    • As every instance is a copy of what the app service contains, it doesn't make sense to have anything else in this service

    • If we did, then when this service spins up 100 instances to deal with transactions, anything else that was unrelated but part of the app service would also be copied to all 100 instances

      • This is a waste of resources

      • Better to have a dedicated app service just for the one intensive webjob

      • The other less intensive ones can be grouped together

  • These instances are called (incorrectly) "hosts" at my company

    • The slack alert "unhealthy hosts increasing" refers to the instances

    • Azure calls the "instances" servers

Kudu

This is a front end for the "app service"?

I think you can restart the app service from here.

  • Is this the same as restarting all the unhealthy instances? Or does a Kudu re-start do more than this?

The app service has a file system, which you can view in Kudu

Unstructured notes from Dirko

server - api.empower.me

  • host

A gateway protects the server / host?

  • It can send traffic to different servers, depending on load balancer

    • e.g. round robin, 1,2, 3, 4, 5, 1,2, 3, 4, 5

    • network load balancing - a bit more intelligent, makes sure that the servers have the same load

    • hashing balancing: looks at the request type, and it sends it to the relevant server

connection encrypted between your browser and what yo are connected to

  • https: security certificate

  • you could set it up to decrypt at the gateway, so you can inspect more

    • but most people don't do that

Empower lingo

  • Host could be a piece of hardware

  • People use host / server interchangeably

  • App service is a type of app you can have in azure

  • app -empower-prod-002:

    • Has 14 "healthy" servers, which is what Rob calls a VM (virtual machine)

      • It's not QUITE a VM, but conceptually. ISH.

      • All the instances share file systems

    • The error in slack is "unhealthy host", Azure calls it "server", but it's actually an Instance

    • instances copy ALL the "things" , e.g. webjobs, in the app service

      • So we put update transactions into its own app service,
  • app-empower-jobs-prod-001

    • Runs all our webjobs

    • This is another app service

App service hosts the webjob, which is a DLL on my machine

kudu is a GUI for the app service

  • App is installed on the app service

  • App service? has a file system

Unstructured notes from Dove

  • Slots / gateways etc - quick chat with Dove

    • What is a gateway? Why do we have to “restart” gateways?

    • What are staging slots? Why do slots keep failing in our CI/CD process?

    • Two slots

    • blue / green

    • When it's active, traffic is redirected to the hose

    • secondary slot - it can be active but still secondary

    • deploy into the non-active slot

      • DLL - when i need them, then I"ll link it

      • So want to prime the secondary, so that the first request

      • Host may not be deploying their code correctly

        • App service is a wrapper around processing capabilities - and those processing capabilities are "hosts"

        • We run 40 - 60 hosts at our company

        • Other organisations may have 1000

        • App services create an abstrtaction for these hosts

          • We say how many hosts we want

          • We deploy to the app service, app service propagates into specific hosts

          • Sometimes the issue can be a bad host

        • Two app services = API or background jobs

    • Research

      • app services

      • slot swaps

      • how to allocate hosts

      • how to query specific host

      • how does a release get propogated into a host

    • we are trying to switch hosts from windows to linux