Azure Fundamentals (AZ-900)

Last Updated: 12/18/2022

Azure Containers

  • If you want to run multiple instances of an application on a single host machine, containers are an excellent choice.

What are containers?

  • Containers are a virtualization environment.
  • You can run multiple containers on a single physical or virtual host
  • Containers are lightweight and designed to be created, scaled out, and stopped dynamically.
  • With containers, you can quickly restart if there's a crash or hardware interruption.
  • One of the most popular container engines is Docker is supported by Azure.

VMs vs Containers

Deploying server application has always been complicated. System admin start looking at Virtualization Techniques like VM and containers

VM

  • Virtual machines, or VMs, provide an abstraction layer for CPU, memory, and storage that can be changed without having to invest in new hardware, while still allowing the environment to be flexible and secure.
  • VM virtualizes the hardware
  • Your app runs either in isolation or with the other apps you install into the VM.
  • With VM you decide OS and Software. VM can only run 1 OS at a time
  • If you have multiple server apps that require different runtime requirements. They require multiple VMs
  • VM is emulating a full computer. Tasks like starting up or taking snapshot are slow and often taking several minutes
  • VM offers full control
  • You can run multiple virtual machines on a single physical host,
  • Virtual machines appear to be an instance of an operating system that you can connect to and manage.
  • It's possible to create and deploy virtual machines as application demand increases

Container

  • Container bundles a single app and its dependencies referred to as containerizing the app then deploy it as unit to a container host.
  • The container host provides standardized runtime environment which abstracts away the operating system and infrastructure requirements, and allows the containerized application to run side by side with other containerized apps
  • Container virtualizes the OS.
  • The operating system level virtualization of containers is one reason why the container approach is more efficient than a full virtual machine.
  • It allows you to run multiple lightweight containers on a single host without sacrificing the isolation that the virtual machine originally offered.
  • You can spin up containers quickly because you are just waiting for the app to launch instead of both OS and App
  • Containerized apps are smaller in size
  • Development process is simplified, because your development runtime environment can look exactly like the production environment
  • Containers can be orchestrated with container cluster orchestration. You can easily deploy and manage multiple containerized applications without worrying about which server will host each container.
  • Containers offer Portability, Performance, Management

Azure Container Instances

  • Azure Container Instances offer the fastest and simplest way to run a container in Azure
  • Azure Container Instances are a platform as a service (PaaS) offering. Azure Container Instances allow you to upload your containers and then the service will run the containers for you.

Use containers in your solutions

  • Containers are often used to create solutions by using a microservice architecture.
  • In microservices architecture you break solutions into smaller, independent pieces. For example, you might split a website into a container hosting your front end, another hosting your back end, and a third for storage. This split allows you to separate portions of your app into logical sections that can be maintained, scaled, or updated independently.