Blog

Azure App Services

  • (5.0)
  • | 784 Ratings |
  • Last Updated December 20, 2017

Azure App Services

Azure app services are Platform as a Service (Paas) model in Azure cloud platform that enables you focus on your business logic while Azure takes care of the infrastructure to run and scale your apps. It is a fully managed compute platform that is optimized for hosting websites and web applications.

  • Supports Windows and Linux platforms
  • Built-in auto scale and load balancing
  • High availability with auto-patching
  • Continuous deployment with Git, Team Foundation Server, GitHub, and Visual Studio Team Services
  • Supports WordPress, Umbraco, Joomla! and Drupal
Get ahead in your career by learning Azure through Mindmajix Microsoft Azure Training.

Azure’s most of the PaaS front end is handled by Azure App Service, a bundle of tools and services that support mobile, web, and API integrations. Azure App Service is an integrated service that enables you to create web and mobile apps for any platform or device. It integrates easily with SaaS solutions (Office 365, Dynamics CRM, Salesforce, Twilio, etc), Easily connect with on-premises applications (SAP, Oracle, Siebel, etc), and easily automate businesses processes while meeting stringent security, reliability, and scalability needs.

Azure App Service:

Azure app service includes 4 application development and hosting environment.

1. Web App
2. Mobile App
3. Logic Apps
4. API Apps

The web app was previously known as azure websites. Mobile apps were previously known as azure mobile services. Azure combines them and introduced app service as a single platform for building multi-device multi-platform apps. The new Logic App introduces a serverless architecture for various services to be integrated into an app without writing codes and The API App has built-in connectors .that make it easy to build logic workflows. It integrates with popular SaaS and on-premises applications like Office 365, SalesForce, Dynamics, OneDrive, Box, DropBox, Twilio, Twitter, Facebook, Marketo, and more. Microsoft has connectors for these services or if you wish you can build your own connectors.

Related Article: Overview of Azure Logic Apps

Azure’s primary motive behind the inclusion of all these into app service is to introduce a flexible pay-as-you-go model and enhanced workflow support.

Apps are automatically managed by app services and runs in isolated VMs. App service has auto scaling feature so when your app usage increases app service will automatically add resources so that there will be no downtime or latency.  

App Services Architecture:

Azure App service runs on the top of Microsoft’s PaaS offering. Applications can be containerized and packaged to be scalable and platform independent. 

Microsoft provides built-in connectors, Code integrations, CDN, and default azurewebsites.net domain for all app service applications. App service applications and all resource manager objects for your apps like database, application insights can be grouped into a resource manager and deployed into an azure region near to your customer base.

App service provides CDN for cross geographic delivery of your application and automatic backup, application firewall and health and performance monitoring tool. It accepts SSL for security.

Depending on plan and pricing app service supports automatic or manual scaling, container isolation for high security.

Frequently asked Azure Interview Questions

App Service Pricing:

App service features no upfront cost and you only billed for a whole minute (Extra seconds are free). App service has six billing plans.

1. Free
2. Shared
3. Basic
4.Standard
5. Premium
6. Isolated

Free, Shared (preview) and Basic plans provide different options to test your apps within your budget. Standard and Premium plans are for production workloads and run on dedicated Virtual Machine instances. Each instance can support multiple application and domains. The Isolated plan hosts your apps in a private, dedicated Azure environment and is ideal for apps that require secure connections with your on-premises network or additional performance and scale.

There are two types of SSL connections supported by Azure app service.

1. Server Name Indication (SNI) SSL Connections
2. IP Address SSL Connections. 

SNI-based SSL works on modern browsers while IP-based SSL works on all browsers.

SNI-based SSL connection is free.

Standard and Premium service plans include the right to use one IP SSL at no additional charge. 

Free and shared service plans do not support SSL. 

Customers can purchase custom domains and assign them to their Azure services like Web Apps or Azure Virtual machines. Custom domains can be managed within the Azure portal. The top-level domains that will be available are com, net, co.uk, org, nl, in, biz, org.uk and co.in.

Azure App Service Best Practice:

Co-location:

If your web app communicates to a database that is located in a different region or your app resource group dependent on another db server in another Azure region you may face below problems.

1. Latency in communication between database and application.
2. More data charge for outbound traffic.

To avoid such things it is recommended to use a resource group comprising your app and database in same region unless you have no specific business need.

Socket Resource Exhaust:

If your app uses client libraries, which have not implemented reuse of TCP connection then you might face outbound TCP socket exhaust. In such case, you must use HTTP-keep-alive.

With node js apps you must use http-keep-alive by using npm module specific for this in your code.

Application Backup Configuration:

It is important to set up automatic backup of your application in the cloud. Using the right configuration in storage and database, you can enable automatic scheduled backup for your application.

Next Gen Web App Firewall:

Although Azure provides default security and policies, you should use a web app firewall to protect user data and application data. In-app service, setting you should configure inbound and outbound IP for access control.

App Service for Web Apps:

Previously known as azure websites, App service for Web Apps now supported all features with new features like application insights and auto-scaling, auto back up and new programming languages.

* Code support: ASP.Net, Java, Python, Node.JS, PHP
* Built-in auto-scaling (scale up and scale down) 
* Deployment slots: Local git, GitHub, Visual studio team services, one drive, ftp, bitbucket
* Hybrid setup with VPN support to on-premises servers.
* Orchestrate staged deployment and supports in a test environment.
* Web Job support for running tasks in the background.

Web apps come with default azurewebsites.net domain but you can configure your own domain in the portal.

Web apps can use Azure storage and database. Web apps support both static and dynamic sites.

App Service for Mobile Apps:

App service for mobile apps features mobile app, notification hub, mobile engagement, application insights and a 3rd party vendor provided AI Mobile acceleration service. 

With mobile apps, you can create a highly scalable backend for your mobile app and maintain high user transactions. Notification Hub allows you to create smart and engaging push notifications tailored for different customers and mobile engagement. It is a SaaS-based, data-driven user engagement platform. It enables real-time fine-grain user segmentation, app user analytics, and contextually-aware smart push notifications and in-app messaging across all connected devices.

Real-time analytics for app usage

Process big data and events collected from app users and behaviors. generate analytics to drive more usage and application improvements.

Value-added push and communications platform

Works with native push notification and sends a valuable and interesting notification to increase app engagement.

Open APIs and ease of integration

Open API integration lets you combine data from CRM and CMS.

Data Protection and Privacy across the Globe

Azure takes customer data seriously and does not sell to any third party.

Mobile app in azure app service has following features:

  • Integrate with SQL, Oracle, SAP, MongoDB, and more.
  • Make your app work offline and sync.
  • Connect to on-premises data.
  • Leverage enterprise single sign-on with Active Directory.
  • Integrate with social providers like Facebook, Twitter, and Google.
  • Broadcast push notifications across platforms, with customer segmentation.
  • Gain insights into mobile analytics.
  • Auto-scale to millions of devices.

App Service for Logic Apps:

Logic Apps allow developers to design workflows that articulate intent via a trigger and series of steps, each invoking an App Service API app whilst securely taking care of authentication and best practices like a durable execution. 

Logic Apps can be designed end-to-end in the browser. Start with a trigger - from a simple schedule to whenever a tweet appears about your company. Then orchestrate any number of actions using the rich gallery of connectors. Logic Apps are part of the App Service suite and designed to work with API apps; you can easily create your own API app to use as a connector.

App Service for API Apps:

Microsoft Azure App Service API Apps offers secure and flexible development, deployment, and scaling options for any sized RESTful API application.

Easily create and consume API and build custom API for your data and application.

  • The fastest way to build for the cloud
  • Provision and deploy fast
  • Simple access control and authentication
  • Secure platform that scales automatically
  • Great experience for Visual Studio developers with automatic SDK generation
  • Open and flexible for everyone
  • Monitor, alert, and autoscale (preview)

Check Out Azure Tutorials

App Service Tutorial:

Building and deploying a PHP web app in Azure:

PHP is a popular server-side web scripting language and can be used to build a dynamic web application. Azure supports PHP and you can create a web app in PHP in-app service. In this tutorial, we are going to build a web app using PHP and deploy it to Azure app service using Git.

Prerequisites:

1. Install PHP
2. Install Git

Create a git folder and initialize it with README.

Create a PHP file in notepad and save it as index.php

Then run the PHP built-in server to run the file locally: php -S localhost:8080

Local Host

Goto your Azure portal and go to Web+Mobile then create a web app.

Microsoft Azure Portal

In next step, create your app.

1. Enter application name
2. Choose an existing subscription. If you do not have any subscription, you have to sign up for one.
3. Create a resource group for your app or you can choose an existing resource group.
4. Choose the OS you want to use.
5. Select your app service plan 
6. Option to use application insights.
Then click the create button. It will start deployment.

                          Creation Of Web App

In this way, you can use the graphical user interface and configure the run time and deployment model.

Using Azure CLI:

1. open cloud shell.
2. create a myAppservicePlan with az webapp create command.

az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name --runtime "PHP|7.0" --deployment-local-git

Create a user for web app

az webapp deployment user set --user-name --password

Local git is configured with url of 'https://@.scm.azurewebsites.net/.git'

{
 "availabilityState": "Normal",
 "clientAffinityEnabled": true,
 "clientCertEnabled": false,
 "cloningInfo": null,
 "containerSize": 0,
 "dailyMemoryTimeQuota": 0,
 "defaultHostName": ".azurewebsites.net",
 "deploymentLocalGitUrl": "https://@.scm.azurewebsites.net/.git",
 "enabled": true,
 < JSON data removed for brevity. >
}

It will give a JSON result that now your web app has been created and set to PHP runtime with deployment method is local Git.

Now add azure remote to git so you can push your source to app source code.

git remote add azure

Push your master branch to an azure app. Use the following command

git push azure master

You will get result like this
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 352 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id '25f18051e9'.
remote: Generating deployment script.
remote: Running deployment command...
remote: Handling Basic Web Site deployment.
remote: Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
remote: Copying file: '.gitignore'
remote: Copying file: 'LICENSE'
remote: Copying file: 'README.md'
remote: Copying file: 'index.php'
remote: Ignoring: .git
remote: Finished successfully.
remote: Running post deployment command(s)...
remote: Deployment successful.
To https://.scm.azurewebsites.net/.git
  cc39b1e..25f1805  master -> master

After you see deployment successful, you can browse your app with the URL.

Make Changes and Redeploy:

You can change the local copy of your source code and redeploy it to Azure using git. However, before you redeploy it is suggested that you run your app locally and check for issues.

Change the index.php and save it.

echo "Hello Azure!";

Open terminal and run git commit and git push command to Azure.
git commit -am "updated output"
git push azure master

Again, you will see the result and after successful deployment, you can browse your app in a browser.

Explore Microsoft Azure Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

Subscribe For Free Demo

Free Demo for Corporate & Online Trainings.


DMCA.com Protection Status