CloudAcademy
  1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Developing for Autoscaling on Azure

Transient Faults: Implementing code that addresses singleton application instances

play-arrow
Start course
Overview
DifficultyBeginner
Duration44m
Students132

Description

Develop your skills for autoscaling on Azure with this course from Cloud Academy. Learn how to improve your teams and development skills and understand how they relate to scalable solutions. What's more, in this course you can analyze and execute how to deal with transient faults.

This Course is made up of 19 lectures that will guide you through the process from beginning to end. 

To discover more Azure Courses visit our content training library.

Learning Objectives

  • Learn how to develop applications for autoscale
  • Prepare for the Azure AZ-300 certification
  • Design and Implement code that addresses singleton application instances

 

Intended Audience

This course is recommended for:

  • IT Professionals preparing for Azure certification
  • IT Professionals that need to develop applications that can autoscale

Prerequisites

There are no prior requirements necessary in order to do this training course, although an understanding of MS Azure will prove helpful

 

Transcript

 In this lecture, let's talk a little bit about how to run a continuous WebJob as a Singleton. When you deploy for example, a website in Azure that runs on multiple instances, you're often going to find yourself creating continuous WebJobs for various reasons. When you create a WebJob, it will by default, run on all instances. However, this may not be something that you want to do if you want your continuous WebJob to run on just a single instance. If you find yourself in this situation where you need to run a WebJob on a single instance instead of across all instances, you can create a file called settings. job that contains the line that you see on your screen. After adding the line you see on your screen to your settings.job file, save the file to the root folder for the continuous WebJob. What this will do is get your WebJob running as a single instance despite being installed on multiple instances. 

Another preferable way to ensure the WebJob runs as a single instance even when there are multiple instances of the host WebApp is to use the Singleton attribute of the WebJob SDK. The WebJob's SDK facilitates typical distributed locking scenarios with the Singleton attribute. By setting these singleton attribute, you can ensure that only one instance of a function runs even when there are multiple instances of the host Web App. In the example that you see on your screen, only a single instance of the process image function will run at any given time. Applying this singleton attribute to a job function ensures that all invocations of that function will be serialized even across scaled out instances.

About the Author

Students1833
Courses9

Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.

In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.

In his spare time, Tom enjoys camping, fishing, and playing poker.