AIDA

Analytics – Collect customer behavior data, perform multivariate test, track campaigns & goals.

Track data relating to the activity of all visitors on the site. What actions they perform, how much they engagement with your side & the kind of experience they enjoy.

Insights – Analyse campaigns, goals, content & experiences

Analyze the collected information to better understand the behavior of customers.

Decisions – Test, measure, decide; segment customers and personalize based on customer experience.

Use gathered insights to improve visitor’s engagement and provide them with targeted & personalized content to address their specific needs.

Automation – Create automatic communication flows that are relevant for each customer.

Use automation to have individual conversations with each visitor according to visitor’s behavior.

Azure 70-532 Revision Day 10

Ensure cached values(up to 26GB) are backup every hour

  1. Create storage account.
  2. Create Premium Tier Redis Cache. – support data persistence
  3. Choose P3 size. – cache up to 26GB
  4. Enable RDB Backup and configure backup frequency of 60 minutes.
  5. Choose storage account provide the correct key.

Create distributed cache cluster with 6 primary/replica cache pairs and 2 CPU cores in each node

Premium $sku – only Premium tier Redis caches support clustering.

P1 $size – P1 is the only Premium tier size with 2 CPU cores for each node.

6 $sharedCount – each shard consists of a primary/replica cache pair.

Web app configuration to sign in Azure AD B2C directory using Facebook

Domain Name: B2C Tenant Directoryunique domain within onmicrosoft.com where B2C tenant directory is available. Application must connect to this domain to authenticate users and it is configured as a property of the tenant directory itself.

Reply URLS to which tokens are returned: Application Registrationthe reply URLs are location where B2C directory sends authentication tokens. Because these locations are different for each web app, they must be configured as part of application registration.

Facebook Identity Provider: Authentication Policiesidentity provider enables B2C directory to send authentication requests to external provider such as Facebook.

Service Fabric service do not run IIS at all

To provide HTML front-end user interface, move to a web framework that can be self-hosting such as ASP.NET Core 1 MVC.

Set maximum size of database to at least 300Gb

Raise service tier to Premium

Process messages in CloudQueue by using Azore Storage Client for .NET

GetMessagesprocess multiple messages because it allows specify number of messages retrieve in one call.

PeekMessages – temporary view, but not process it.

BeginPeek Messages – temporary view in asynchronous, but not process it.

BeginListQueuesSegemented – initiates asynchronous operation to return segment containing collection of queues.

Register object as a trigger. A trigger can execute before new item is created in database and modify it.

  1. Add triggerType and triggerOperation properties to object.
  2. Call client.createTriggerAsync() to register function as a trigger.
  3. Specify object whenever call the client.createDocumentAsync()

Azure 70-532 Revision Day 9

Perform a point-in-time recovery for database

Start-AzureSqlDatabaseRestorecreates new copy of database. User SQL Server Management Studio to access deleted customer data and create script that will restore it to live database.

Add Cross-Origin Resource Sharing (CORS) rule to Storage Account Blob Services that host images.

Web browsers implement same origin policy rule for requests for a single web page. It prevents call to different domain. For e.g.: original page in www.company.net domain and the storage account in blob.core.windows.net.domain. Add the CORS rule to destination domain to overcome the restriction.

Obtain message from Storage Queue

  1. Use CloudStorageAccount.Parse() to create CloudStorageAccount object. – pass the storage account connection string to this method will return a CloudStorageAccount with correct credentials.
  2. Use CloudStorageAccount.CreateCloudQueueClient() return CloudQueueClient object to perform queue tasks such as creating queues and retrieving messages.
  3. Use CloudQueueClient.GetQueueReference() to obtain the queue.
  4. Use CloudQueue.GetMessage() to obtain next message in queue to work on and de-queue it.
  5. Call CloudQueueMessage.DeleteMessage() – remove the message so it does not reappears in queue after 30 seconds by default.

Azure AD B2C sign in policy (b2c_1_sign_in)

Trigger OWIN challenge and pass the name of policy.

HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties(){RedirectUri = “/”}, “b2c_1_sign_in”);

Create shared access signature URIs for blob and manage them independently for each service.

Create a stored access policies for container.

Upload VHDX file so it can be used as disk attached to a virtual server in Azure Iaas

  1. Convert the file to a VHD file.  – Azure does not support VHDX or dynamic-sized disks.
  2. Run Add-AzureVHD cmdletAutomatically convert the dynamic-sized to fixed-size disk and upload a VHD to Azure blob storage.

When batch of documents added to Azure Search index during a time of intense demand, some documents do not complete indexing

IndexBatchException is raised.

 

Azure 70-532 Revision Day 8

Error 503: Exceed queue limit number of transaction

Partition the messages between  multiple queues.

Premium tier Redis caches support deployment within a VNet

Must deployed as the only resources in a separate subnet.

Access Azure tables directly using the following format with OData protocol

http://<storage account>.table.core.windows.net/<table>

Ensure lead from Service Bus queue is processed no more than once

Call Complete() or CompleteAsync() when worker process finished processing a lead.

When create a MessageReceiver, the default mode is PeekLock mode. In this mode, when a message is retrieved for processing from the queue, it remains in the queue but locked. When MessageReceiver finishes processing, it should call Complete() or CompleteAnsyc() so that message is removed from queue.

This is a robust approach – if MessageReceiver fails, message remains in the queue and the lock will expire by default after 1 minute. The message will be processed by another MessageReceiver or when the failed receiver restarts.

Set MessageReceiver receive mode to ReceiveAndDelete

Messages are deleted from the queue as soon they have been retrieved by MessageReceiver.

This is not robust – if MessageReceiver fails, messages can be lost and never processed.

RESTful query that retrieve number of throttled request each hour

https://managament.core.windows.net/{subscription ID}/services/servicebus/Namespaces/NS1/Queues/QueueOne/Metrics/SVRBSY/Rollups/PT1H

  • SVRBSYreturn number of requests that were throttled because the server was busy.
  • Rollupsduration over which metric should be aggregated.
  • PT1H – specifies data should be summarized for each hour.

Standard tier service bus namespace – supports publish/subscribe feature

Could store file in blob storage and configure a shared access signature to allow subscribers access actual file. The message would contain URL to the blob.

Verify ID token was acquired by user after completing Azure AD B2C sign in policy.

Check Authentication Content Class Reference (acr) claim. – Azure AD B2C use this claim to record the name of the policy the user completed to acquire the token.

 

Azure 70-532 Revision Day 7

Reduce time to start Azure Service Fabric app debugging in development

Right-click Local Cluster Manager > Switch Cluster Mode > click 1 Node

1 Node Mode, app need only be deployed once before can debug it.

Run a query to retrieve all entities from Azure storage table by using Azure Storage Client

  • Instantiate TableQuery class
  • Instantiate DynamicTableEntity class

Regenerate storage keys

  1. Configure connection strings in config files to reference secondary key. – users continue to access storage
  2. Regenerate primary key. – old key no longer allow access
  3. Configure connection strings in config files to reference primary key.
  4. Regenerate secondary key.

Bounded Staleness Consistency

Can be replicated to multiple Azure regions, can read and write data rapidly.

Create Site-to-Site (S2S) VPN so on premises users can connect to intranet

  1. Create Gateway Subnet.
  2. Create Virtual Network Gateway.
  3. Create Local Network Gateway.
  4. Configure on-premises VPN device.
  5. Configure Site-to-Site VPN connection.

Retrieve approx length of Azure Queue

Get Queue Metadata return header a response header that includes x-ms-approximate-messages-count attributes

Get Queue Service Stats – return replication status when geo-replication is enabled.

Get Queue Service Properties – return the properties that have been set on queue service, including settings related to logging and metrics collection  and Cross-Origin Resource (CORS) rules.

Peek Messages – retrieve messages from queue without changing visibility

Add events to Azure Event Hub

  1. NamespaceManager.CreateEventHubIfNotExists() to create event hub. – ensure do not receive exceptions should the Event Hubs restarts
  2. Use static EventHubClient.Create() to create event hub client. – to interact with Event Hubs service
  3. Create EventData object for every event that want to be recorded. – add message to event hub
  4. Call EventHubClient.Send() with a partition key that is unique to the client. – key is hashed to determine the partition to add message to

Sharing policy that allow to revoke access to a project if link is compromised

Create a separate blob containerlimit which members have access.

Create a shared access policy on project blob container and generate a shared access key- define constraints, such as permission and the time period over which shared access key remains valid. If policy constraints changed, changes will be propagated to shared access key. If policy removed, shared access keys will be revoked.

Generate ad hoc shared access keysvalid for the time specified when generate it, can revoke it only by changing storage key.

Azure 70-532 Revision Day 6

Upload a PowerShell script that will run as a scheduled WebJob

Compress PowerShell script file.

Slot swap

  • App settings: Configurable
  • Configuration String: Configurable
  • Diagnostic settings: Swapped
  • Endpoints: Not swapped – Virtual IP address specific to the slot
  • WebJobs content: Swapped
  • WebJobs schedulers: Not swapped

Get number of request per minute even swap occurs

Get-AzureWebsiteMetricMetrics are utilization statistics

-MetricNames “Request” – Specify metric to return

-StartDate(get-date).AddHours(-4) – Parameter determine when metric reporting begins

-SlotView Ensure metrics are merged if swap occurs during data collection

-TimeGrain “PT1M” Show requests per minute

Private application settings and connection strings

  1. Store application settings in separate settings file and reference using file attribute of appSettings elements in web.config. Do not add to source control.
  2. Store connection strings in separate connection string files and reference using configSource attribute of connectionStrings element in web.config. Do not add to source control.
  3. Create PowerShell script to set application settings and connection strings in Azure Web App. – Set-AzureWebSite

Quickly find exception logsTable Storage

Long-term storage of all logsBlob storage

CRON expression

Used to configure Azure App Service web job to execute on a schedule.

Format: {second} {minute} {hour} {day} {month} {day of the week}

Example: “0 0 * * * 1-5”

0 0 – execute when seconds and hours both zero (beginning of every hour)

1-5 – Day 1- 5 of the week (Monday through Friday)

Limiting bandwidth available to each IP address

<quota-by-key>

Example: Restrict each IP address to 50000 calls and 1MB(1000 kilobytes) of data per day(86,400 seconds).

<quota-by-key calls="50000"   
              bandwidth="1000"
              renewal-period="86400"  
              counter-key="@(context.Request.IpAdress)" />

Easy for developers to call API by providing Swagger 2.0 metadata

Install Swashbuckle NuGet package in API Visual Studio project. – Automatically create Swagger 2.0 metadata when it is installed in ASP.NET Web API project.

Swagger 2.0 description of API in JSON format is created and available in /swagger/docs/v1 location.

Azure App Service Logic App

Create a custom trigger whenever want Web API to initiate Logic App.

Polling trigger Logic App to check periodically for new items or data

Create custom action whenever want Logic App to all external Web App after it has been initiated.

Webhook actionLogic App to pause until external Web App responds for long running action

Example of goals that can be achieve by object:

Require message encryptionAgreement define two partners and a range of requirements for the messages that can be exchanged between those partners

Ensure message is validSchemaspecified tags and attributes that are expected in a message

Transform date formatMap specifies how certain fields in message should be formatted.

debatching

SplitOn command – ensure new instance of workflow is created for every message in a batch.

Azure 70-532 Revision Day 5

Autoscaling ensure VM instances are automatically triggered if metric exceeds threshold

  1. Add a VM to each cloud serviceshare the cloud service configurations
  2. Add all VMs to availability sets
  3. Configure scale by metric

Resource type should include in Resource Manager template to deploy a VM Scale Set (VMSS)

  • Microsoft.Compute/virtualMachinesScaleSets configure VMSS and VMs created within it
  • Microsoft.Network/virtualNetworks contain all VMs that are created in VMSS
  • Microsoft.Storage/storageAccountsstore VHDs
  • Microsoft.Network/loadBalancersdistribute traffic
  • Microsoft.Network/publicIPAddressesload balancer to receive request from Internet users
  • Microsoft.Insights/autoScaleSettingsdefine metrics and triggers

Configure virtual networks to increase capacity by adding subscriptions

Export and modify the network configuration file. Then import the modified file.

Values in Session state not available in second web server

Replace external Load Balance with Azure Application Gateway include load balancing based in HTTP protocol, includes cookie-based session affinity. Application Gateway identified client from cookie and ensures request are forwarded to same web server VM, ensuring session state values remain available.

Redress the balance of distribution of traffic to servers by disabling cookie-based affinity

Add customHeaders section to web.config

Azure web apps use Application Request Router (APR) to distribute the requests to servers within the service. Default configuration supports session-based affinity, any user who is maintaining a session with web app will directed to same server. But if users do not close browsers, cookie can persist indefinitely, leading imbalance request distribution. Adding custom header “Arr-Disable-Session-Affinity” = “true” will disable this feature, force all request to use a non-session aware logic for load balancing the request.

 

Azure 70-532 Revision Day 4

Ensure no interruption in services when Azure maintenance task completed

Place web server VMs into single availability group. – This instruct Azure at least one VM should available at all times

Place database server VMs into separate availability group.

Ensure incoming internet web requests are shared equally between VMs and at least one VM is online at all times

  1. Add VMs into single availability group. – Ensure VMs are placed in different maintenance and fault domains
  2. Create a new public load balancer. – Handle traffic from public internet
  3. Create a back-end address pool in the new load balancer that includes all VMs. – define the VMs that traffic will be balanced between
  4. Create a health probe in the new load balancer. – define how the VMs are polled to check their responsiveness
  5. Create a load balancing rule in the new load balancer. – define details of traffic distribution
  6. Create a Network Address Translation rule for each of the VMs. – define internal IP address for each VM

Windows Server roles currently supported by Azure

  • Active Directory Domain Services
  • Active Directory Federation Services
  • Domain Name System (DHCP)

De-provision image before upload to Azure

Linux virtual server – execute waagent tool

Windows virtual server, execute sysprep.exe tool

Implement Desire State Configuration for Azure IaaS

  1. New-AzureVMConfigcreate VM config
  2. Add-AzureProvisioningConfig additional config elements such as username and password.
  3. Set-AzureVMDSCExtensionenable Desire Configuration State extension. ConfigurationArchive parameter set to .zip file which contains the script to execute the configuration settings

VM can open and execute scripts stored in multiple storage accounts that already used by other applications

Generate shared access signature for each blob – A shared access signature can be one-time or multi-use key that enables one or more applications to access the secured blob

Minimize potential data loss due to disk failures

Create multiple VHD in LRS (locally-redundant storage), and the configure as single storage based volume. – Azure will separate the disks into different update and fault domains, ensuring disk availability in event of outage or planned recycle.

ZRS (zero-redundant storage) does not support page blobs, unsuitable for VHD storage.

Provision VM and assign availability set

  • From Azure Management Portal, select From Gallery
  • Run New-AzureQuickVM cmdlet

 

Azure 70-532 Revision Day 3

Analyze SQL Server Profile trace file for compatibility issues before migration SQL Server to Azure SQL Database

SQL Database Migration Wizard, check using SQL Server Profile trace or a Transact-SQL script file. It also migrates schema and bulk copy of data.

Optimize performance by caching web page data

Standard tier Azure Redis Cache, includes primary cache and secondary cache, SLA 99.9%. Can use ASP.NET Output Cache Provider to easily implement output caching in web app.

ASP.NT Session State Provider allows Azure Redis Cache store session state data.

Content Delivery Network (CDN) end point

CDN end point allow uploaded blobs to be accessed from a server in the closest geographic region to the user requesting the data.

Create persistent mounted file share on Windows VM

  1. Store credentials using cmdkey command with /add option.
  2. /user: storage account name
  3. /pass: storage key
  4. Call net use to create mounted share and associate with drive letter.

Add caching for cloud service

  1. Use the Dedicated Cache Capacity to determine cache requirements. Dedicated Cache Capacity Planner Excel spreadsheet to determine instance size, count and configuration settings.
  2. Add Cache Worker Role to Cloud Service Project. Cache Worker role is preconfigured for dedicated cache cluster setting.
  3. Set the Instance count property and VM Size property. In the configuration tab, these are the values derived from the Dedicated Cache Capacity Planner spreadsheet.
  4. Check the box for High Availability for default cache and set Expiration Type to Sliding Window. Sliding Window support objects stored in cache will not expire until 10 minutes last accessed.

Implement web endpoint monitoring

  1. Configure endpoint monitoring for VM to monitor from several test locations.
  2. Enable the Response Time endpoint monitoring metric for each test location.
  3. Configure an Alert for each Response Time endpoint monitoring metric.
  4. Define conditions for each Alert to send emails.

Creating endpoint from Azure Management Portal

  1. Protocol – TCP or UDP
  2. Private portconnection port for inbound connections within Azure
  3. Public portconnection port for connections originating outside of Azure