Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Azure Containers Explained

You're reading from  Azure Containers Explained

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781803231051
Pages 278 pages
Edition 1st Edition
Languages
Authors (2):
Wesley Haakman Wesley Haakman
Profile icon Wesley Haakman
Richard Hooper Richard Hooper
Profile icon Richard Hooper
View More author details

Table of Contents (22) Chapters

Preface 1. Part 1: Understanding Azure Container Technologies
2. Chapter 1: Azure Containers – Pleased to Meet You 3. Chapter 2: Azure App Service – Running a Container Was Never That Difficult 4. Chapter 3: Deploying Containers to Azure Functions 5. Chapter 4: Azure Container Instances for Serverless Containers 6. Chapter 5: Azure Container Apps for Serverless Kubernetes 7. Chapter 6: Azure Kubernetes Service for Kubernetes in the Cloud 8. Part 2: Choosing and Applying the Right Technology
9. Chapter 7: The Single Container Use Case 10. Chapter 8: Deciding the Best Fitting Azure Technologies for Multiple Containers 11. Chapter 9: Container Technologies for Startups 12. Chapter 10: Container Technologies for Small and Medium-Sized Businesses 13. Chapter 11: Container Technologies for Enterprises 14. Part 3: Migrating Between Technologies and Beyond
15. Chapter 12: Migrating Between Container Technologies 16. Chapter 13: Azure Container Instances – I Like the Scalability But I Need More 17. Chapter 14: Beyond Azure Container Apps 18. Chapter 15: Azure Kubernetes Service – The Next Steps 19. Chapter 16: What’s Next – Diving into Future Trends and More 20. Index 21. Other Books You May Enjoy

Understanding containers and their benefits

Virtualization has been around for a long time, and we can go as far as to say that it is the duct tape that holds infrastructures together. Different platforms provided different features (think of VMware, Hyper-V, and KVM) but all had the same goal: hardware virtualization. We can now run multiple operating systems on a single piece of hardware, isolating them from each other and minimizing overhead. We got used to that. However, it did not answer all the questions or resolve the challenges we had. The world wanted to minimize overhead even more, add more flexibility, and have an answer to the comment, it worked on my machine!

Containers may have been around for much longer than traditional hardware virtualization in different forms, such as the Unix chroot system and FreeBSD Jails, but only became really popular in their current form with the introduction of Docker and the Open Container Initiative (OCI). The OCI was founded by Docker and other leaders in the container ecosystem in June 2015. It is an open source specification to ensure container images can work across multiple container runtimes.

Container technology these days is essentially what we would call operating system virtualization, where we package code, libraries, and the runtime into a container image and run it on top of an operating system, using a container engine such as Docker. To make a comparison with hardware virtualization, you can say that the container engine is the hypervisor for the containers. Of course, there is much more to it when you really get into the nitty and gritty of container technologies, but we don’t need that level of understanding when navigating through the Azure container landscape. Let’s see this in a visual representation.

Figure 1.1 – An overview of containers

Figure 1.1 – An overview of containers

In the preceding diagram, you can see we still have a server, but the capacity is distributed more efficiently. Where traditionally we would run one application per (virtualized) server, with container technology, we can now run multiple isolated containers on a single operating system and minimize overhead even more.

Important note

When we talk about running a container, we are actually running an instance that is based off a container image. The container image actually contains all the code, libraries, and runtime but is more often referred to as a docker container. Throughout this book, we will use the term container when referring to a container instance that is created from a container image.

Container characteristics

These containers have specific characteristics and can be used in multiple ways, each use case coming with its own set of benefits. Let’s take a look at these specific characteristics:

  • Containers are lightweight.
  • Containers are ephemeral.
  • Containers contain everything required from an application perspective and all the -specific binaries that come from the underlying node Operating System (OS).
  • Containers have strong default isolation.
  • Containers contain the same content wherever you run them (working on everyone’s computer).
  • Containers can run on Linux or Windows.

That’s a pretty interesting list, but those characteristics do come with some important side notes.

As containers are lightweight, they won’t take up too many resources, and you can run hundreds of them on a single system. Instead of running hundreds of virtual machines, you are now running just a couple with hundreds of containers. At some point, we need to look at efficiently managing those.

As containers are ephemeral, this has consequences for your solution. We’re talking stateless here. And, by default, containers have strong default isolation. This means, by default, two containers will not communicate with each other. That also has consequences for your solution and software architecture.

These consequences are not all that bad. In fact, if you play by the rules, you will end up with a more scalable, secure, and future-proof solution.

Container benefits

Maybe you could already tell from the previous paragraphs that there are definitely benefits to using container technologies:

  • Containers contain everything you need to run your software.
  • Containers are extremely scalable.
  • Containers don’t have much overhead.
  • Containers are portable.
  • Containers are faster than a traditional virtual machine.

That sounds very interesting (even for the financially minded people out there!). But what does it mean? Well, a container contains everything you need to run your software. Within your container image, you store the parts of the OS you need, the libraries you are using, and, of course, your code. That container image is stored in what we call a registry and can be used whenever you want to start your container. Whether that container is running in the cloud, on your local machine, or in your refrigerator (if it supports it), it will always have the same contents. It works on everyone’s machine.

Having such a small footprint means that containers can be started really quickly but can also be scaled just like that. As containers also have significantly less overhead as compared to traditional configurations, instead of having to deploy multiple virtual machines to host multiple instances of your software, you can now do that by just running a number of small containers on the same machine.

Important note

A container registry is a repository that contains container images that can be pulled by other services to start an instance of a container. Microsoft Azure offers a service called Azure Container Registry that can be integrated into other Azure services.

It is very likely that you are not looking to run all these containers on traditional on-premises hardware, but you want to leverage the global scalability, cost efficiency, redundancy, and security that public clouds such as Microsoft Azure have to offer. And we’re going to look into that right now!

You have been reading a chapter from
Azure Containers Explained
Published in: Mar 2023 Publisher: Packt ISBN-13: 9781803231051
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}