- App Service Web Apps is a service for hosting web applications, REST APIs, and mobile back ends.
- Applications run and scale on Windows-based environments or Linux-based environments.
- It adds security, load balancing, auto-scaling, and automated management.
- With App Service, you pay for the Azure compute resources you use.
- When you deploy your app, you can deploy to a separate deployment slot instead of the default production slot when running in the Standard or Premium App Service plan tier.
- Deployment slots are actually live apps with their own host names.
- App content and configurations elements can be swapped between two deployment slots, including the production slot.
- Deploying an app to a slot first and swapping it into production ensures that all instances of the slot are warmed up before being swapped into production.
- This eliminates downtime when you deploy your app.
- The traffic redirection is seamless, and no requests are dropped as a result of swap operations.
- After a swap, the slot with previously staged app now has the previous production app.
- If the changes swapped into the production slot are not as you expected, you can perform the same swap immediately.
- Each App Service plan tier supports a different number of deployment slots.
- To scale your app to a different tier, the target tier must support the number of slots your app already uses.
WebJobs For Background Tasks
- WebJobs enables you to run a program or script in the same context as a web app, API app, or mobile app.
- There is no additional cost to use WebJobs.
- A web app can time out after 20 minutes of inactivity.
- Only requests to the scm (deployment) site or to the web app's pages in the portal reset the timer.
- Requests to the actual site don't reset the timer.
- If your app runs WebJobs, enable Always On to ensure that the WebJobs run reliably.
- This feature is available only in the Basic, Standard, and Premium pricing tiers.
Continuous WebJob
- It starts immediately when the WebJob is created.
- To keep the job from ending, the program or script typically does its work inside an endless loop.
- If the job does end, you can restart it.
- It runs on all instances that the web app runs on.
- You can optionally restrict the WebJob to a single instance.
- It supports remote debugging.
Triggered WebJob