<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Microsoft Azure Archives - Blog IT</title>
	<atom:link href="https://blogit.create.pt/category/cloud/microsoft-azure/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/category/cloud/microsoft-azure/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Tue, 30 Jan 2024 18:30:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Provision a database programmatically in Azure SQL database with a failover group</title>
		<link>https://blogit.create.pt/miguelisidoro/2024/01/24/provision-a-database-programmatically-in-azure-sql-database-with-a-failover-group/</link>
					<comments>https://blogit.create.pt/miguelisidoro/2024/01/24/provision-a-database-programmatically-in-azure-sql-database-with-a-failover-group/#respond</comments>
		
		<dc:creator><![CDATA[Miguel Isidoro]]></dc:creator>
		<pubDate>Wed, 24 Jan 2024 14:32:24 +0000</pubDate>
				<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12852</guid>

					<description><![CDATA[<p>This post will explain how to provision a database programmatically in a Azure SQL database and add it to an Azure SQL failover group. Introduction An Azure SQL Server failover group is a group of databases that can be automatically or manually failed over from a primary server to a secondary server in a different [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/miguelisidoro/2024/01/24/provision-a-database-programmatically-in-azure-sql-database-with-a-failover-group/">Provision a database programmatically in Azure SQL database with a failover group</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This post will explain how to provision a database programmatically in a Azure SQL database and add it to an Azure SQL failover group.</p>



<h2 class="wp-block-heading">Introduction</h2>



<p>An Azure SQL Server failover group is a group of databases that can be automatically or manually failed over from a primary server to a secondary server in a different Azure region in case of a disaster in the primary server. Failover groups provide high availability and disaster recovery for Azure SQL Server databases.</p>



<p>The process described in this post is composed by two main steps:</p>



<ul class="wp-block-list">
<li>Provisioning the database</li>



<li>Adding the database to the failover group </li>
</ul>



<h2 class="wp-block-heading">Provisioning the database</h2>



<p>The first step is to create the database. This step is composed by the following actions:</p>



<ul class="wp-block-list">
<li>Get the tenant information</li>



<li>Create the database</li>
</ul>



<p>Tenant information class:</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="791" height="381" src="https://blogit.create.pt/wp-content/uploads/2024/01/Regions.jpg" alt="" class="wp-image-12869" srcset="https://blogit.create.pt/wp-content/uploads/2024/01/Regions.jpg 791w, https://blogit.create.pt/wp-content/uploads/2024/01/Regions-300x145.jpg 300w, https://blogit.create.pt/wp-content/uploads/2024/01/Regions-768x370.jpg 768w, https://blogit.create.pt/wp-content/uploads/2024/01/Regions-696x335.jpg 696w" sizes="(max-width: 791px) 100vw, 791px" /></figure>



<p>Code to create database programatically:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="722" src="https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-1024x722.jpg" alt="" class="wp-image-12866" srcset="https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-1024x722.jpg 1024w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-300x212.jpg 300w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-768x542.jpg 768w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-696x491.jpg 696w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-596x420.jpg 596w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase-100x70.jpg 100w, https://blogit.create.pt/wp-content/uploads/2024/01/CreateDatabase.jpg 1065w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Adding the database to the failover group</h2>



<p>The second step adds the newly created database to the failover group. This step is composed by the following actions:</p>



<ul class="wp-block-list">
<li>Get the failover group where we want to add the database</li>



<li>Re-add the existing databases to the failover group &#8211; necessary since when we get the failover group the list of databases of the group is empty and, without this step, the failover group would only have the new database</li>



<li>Add the new database to the failover group</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="790" height="344" src="https://blogit.create.pt/wp-content/uploads/2024/01/Failovergroup.jpg" alt="" class="wp-image-12876" srcset="https://blogit.create.pt/wp-content/uploads/2024/01/Failovergroup.jpg 790w, https://blogit.create.pt/wp-content/uploads/2024/01/Failovergroup-300x131.jpg 300w, https://blogit.create.pt/wp-content/uploads/2024/01/Failovergroup-768x334.jpg 768w, https://blogit.create.pt/wp-content/uploads/2024/01/Failovergroup-696x303.jpg 696w" sizes="(max-width: 790px) 100vw, 790px" /></figure>



<h2 class="wp-block-heading">Other Articles</h2>



<p>To learn why your business should migrate to SharePoint Online and Office 365, click <a href="https://blogit.create.pt////miguelisidoro/2019/07/29/why-your-business-should-migrate-to-sharepoint-online-and-office-365-the-value-offer-part-1/" target="_blank" rel="noreferrer noopener">here</a> and <a href="https://blogit.create.pt////miguelisidoro/2019/07/29/why-your-business-should-migrate-to-sharepoint-online-and-office-365-the-value-offer-part-2/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to learn how to develop SPFx solutions, click <a href="https://blogit.create.pt/miguelisidoro/2022/05/09/sharepoint-framework-spfx-learning-guide/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to learn how you can rename a modern SharePoint site, click <a href="https://blogit.create.pt////miguelisidoro/2019/09/23/how-to-rename-a-modern-sharepoint-site-url-in-office-365/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to learn how to save time time scheduling your meetings, click&nbsp;<a href="https://blogit.create.pt////miguelisidoro/2020/04/12/save-time-scheduling-microsoft-teams-meetings-using-findtime/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to learn how to enable Microsoft Teams Attendance List Download, click&nbsp;<a href="https://blogit.create.pt////miguelisidoro/2020/09/20/how-to-enable-teams-meeting-attendance-list-download-in-microsoft-365/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to learn how to create a dynamic org-wide team in Microsoft Teams with all active employees, click&nbsp;<a href="https://blogit.create.pt/miguelisidoro/2020/09/21/how-to-create-a-dynamic-team-in-microsoft-teams-with-all-active-employees-in-microsoft-365/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>If you want to modernize your SharePoint classic root site to a modern SharePoint site, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/08/27/how-to-modernize-your-tenant-root-site-collection-in-office-365-using-invoke-spositeswap/" target="_blank">here</a>.</p>



<p>If you are a SharePoint administrator or a SharePoint developer who wants to learn more about how to install a SharePoint 2019 farm in an automated way using PowerShell, I invite you to click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/12/09/how-to-install-a-sharepoint-2019-farm-using-powershell-and-autospinstaller-part-1/" target="_blank">here</a>&nbsp;and&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/12/09/how-to-install-a-sharepoint-2019-farm-using-powershell-and-autospinstaller-part-2/" target="_blank">here</a>.</p>



<p>If you learn how to greatly speed up your SharePoint farm update process to ensure your SharePoint farm keeps updated and you stay one step closer to start your move to the cloud, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/05/02/how-to-speed-up-the-installation-of-sharepoint-cumulative-updates-using-powershell-step-by-step/" target="_blank">here</a>.</p>



<p>If you prefer to use the traditional method to update your farm and want to learn all the steps and precautions necessary to successfully keep your SharePoint farm updated, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/04/08/how-to-install-sharepoint-cumulative-updates-in-a-sharepoint-farm-step-by-step/" target="_blank">here</a>.</p>



<p>If you want to learn how to upgrade a SharePoint 2013 farm to SharePoint 2019, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/03/06/how-to-upgrade-from-sharepoint-2013-to-sharepoint-2019-step-by-step-part-1/" target="_blank">here&nbsp;</a>and&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/03/06/how-to-upgrade-from-sharepoint-2013-to-sharepoint-2019-step-by-step-part-2/" target="_blank">here</a>.</p>



<p>If SharePoint 2019 is still not an option, you can learn more about how to install a SharePoint 2016 farm in an automated way using PowerShell, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-1/" target="_blank">here</a>&nbsp;and&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/07/28/how-to-install-a-sharepoint-2016-farm-using-powershell-and-autospinstaller-part-2/" target="_blank">here</a>.</p>



<p>If you want to learn how to upgrade a SharePoint 2010 farm to SharePoint 2016, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/02/04/sharepoint-upgrade-upgrading-a-sharepoint-2010-farm-to-sharepoint-2016-step-by-step-part-1/" target="_blank">here&nbsp;</a>and&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/02/04/sharepoint-upgrade-upgrading-a-sharepoint-2010-farm-to-sharepoint-2016-step-by-step-part-2/" target="_blank">here</a>.</p>



<p>If you are new to SharePoint and Office 365 and want to learn all about it, take a look at these&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/10/17/sharepoint-and-office-365-learning-resources/" target="_blank">learning resources</a>.</p>



<p>If you are work in a large organization who is using Office 365 or thinking to move to Office 365 and is considering between a single or multiple Office 365 tenants, I invite you to read&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2019/01/07/pros-and-cons-of-single-tenant-vs-multiple-tenants-in-office-365/" target="_blank">this article</a>.</p>



<p>If you want to know all about the latest SharePoint and Office 365 announcements from Ignite and some more recent announcements, including Microsoft Search, What’s New to Build a Modern Intranet with SharePoint in Office 365, Deeper Integration between Microsoft Teams and SharePoint and the latest news on SharePoint development, click&nbsp;<a rel="noreferrer noopener" href="https://blogit.create.pt////miguelisidoro/2018/11/21/whats-new-for-sharepoint-and-office-365-after-microsoft-ignite-2018/" target="_blank">here</a>.</p>



<p>If your organization is still not ready to go all in to SharePoint Online and Office 365, a hybrid scenario may be the best choice. SharePoint 2019 RTM was recently announced and if you to learn all about SharePoint 2019 and all its features, click <a href="https://blogit.create.pt////miguelisidoro/2018/11/01/meet-the-new-modern-sharepoint-server-sharepoint-2019-rtm-is-here/" target="_blank" rel="noreferrer noopener">here</a>.</p>



<p>Happy Coding!</p>
<p>The post <a href="https://blogit.create.pt/miguelisidoro/2024/01/24/provision-a-database-programmatically-in-azure-sql-database-with-a-failover-group/">Provision a database programmatically in Azure SQL database with a failover group</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/miguelisidoro/2024/01/24/provision-a-database-programmatically-in-azure-sql-database-with-a-failover-group/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Entity Framework &#8211; Update Database using Azure Pipelines</title>
		<link>https://blogit.create.pt/vini/2022/11/07/entity-framework-update-database-using-azure-pipelines/</link>
					<comments>https://blogit.create.pt/vini/2022/11/07/entity-framework-update-database-using-azure-pipelines/#respond</comments>
		
		<dc:creator><![CDATA[Vinícius Biavatti]]></dc:creator>
		<pubDate>Mon, 07 Nov 2022 11:18:06 +0000</pubDate>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[entity framework]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[pipelines]]></category>
		<category><![CDATA[sql database]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12770</guid>

					<description><![CDATA[<p>Introduction The pipelines bring to us the opportunity to create automatic tasks to execute development operations, like deploys, migrations, tests, etc. Focused in the deploy routine, some applications need other operations to ensure the stability between the application and other resources, like the database. During the development process, the developers usually customize and improve the [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/vini/2022/11/07/entity-framework-update-database-using-azure-pipelines/">Entity Framework &#8211; Update Database using Azure Pipelines</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p>The pipelines bring to us the opportunity to create automatic tasks to execute development operations, like deploys, migrations, tests, etc. Focused in the deploy routine, some applications need other operations to ensure the stability between the application and other resources, like the database.</p>



<p>During the development process, the developers usually customize and improve the application database in the development environment scope, and it can be made easily by using frameworks that contains routines to create source files that have the responsability to keep the history of changes and are used to update the database for determinated version. These files are known as migrations.&nbsp;</p>



<p>In this post, we will see how to apply migrations for the databases that are located in different environments (staging, production, etc.), using the Code-First entity concept, and the Entity Framework Core.</p>



<h2 class="wp-block-heading">Migrations</h2>



<p>To generate database migrations, we can execute the &#8220;Add-Migraton &lt;name&gt;&#8221; command from the Entity Framework. This command will generate some source files that will contain the code to apply the migration to the database. To execute these migration files, you just need to execute the &#8220;Update-Database&#8221; command. But,&nbsp;<a href="https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli#sql-scripts" target="_blank" rel="noreferrer noopener">Microsoft recommends</a>&nbsp;to create a SQL file individually, and suggest to execute this file direct to the database, without need to execute an intermediary software (C# + EF) to access the database. To do this, we will have to follow the steps below:</p>



<ul class="wp-block-list">
<li>1. Create a Pipeline in Azure Devops;</li>



<li>2. Install dotnet-ef-tool;</li>



<li>3. Generate SQL script;</li>



<li>4. Execute SQL script to the database;</li>



<li>5. Script File as a Pipeline Artifact.</li>
</ul>



<p><em><strong>NOTE</strong>: We don&#8217;t need to worry about which migration need to be applyed to the database. The dotnet-ef-tool command will generate a script cantaining the needed logic. Check the third step for more details.</em></p>



<h2 class="wp-block-heading">1. Create a Pipeline in Azure Devops</h2>



<p>We will create a common deployment pipeline in Azure Devops for ASP.NET Core backend applications. Check the end of the post to see the full result of the pipeline.</p>



<h2 class="wp-block-heading">2. Install dotnet-ef-tool</h2>



<p>To execute tool commands of Entity Framework, we have to install a package named dotnet-ef-tool. This needs to be available into the pipeline&#8217;s context to be used for the SQL script generation. To install this tool by a pipeline task, we can use the task below:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- task: DotNetCoreCLI@2
  displayName: &#039;Install EF tool&#039;
  inputs:
    command: &#039;custom&#039;
    custom: &#039;tool&#039;
    arguments: &#039;install --global dotnet-ef&#039;
</pre></div>


<h2 class="wp-block-heading">3. Generate SQL script</h2>



<p>To generate the SQL script containing the logic to apply migrations, we will use the dotnet-ef-tool. By default, the command does not generate the logic to check which migration should be applied, so we have to enable this behavior using the parameter: &#8211;idempotent. By using this behavior, we don&#8217;t need to worry about the migrations that will be applyed to the database since the generated script already has it. Below, you can see the task that could be used to generate the script file:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- task: DotNetCoreCLI@2
  displayName: &#039;Generate SQL Script&#039;
  inputs:
    command: &#039;custom&#039;
    custom: &#039;ef&#039;
    arguments: &#039;migrations script --idempotent --project $(Build.SourcesDirectory)\Data.csproj --output $(System.ArtifactsDirectory)/script.sql&#039;
</pre></div>


<p><em><strong>NOTE</strong>: We don&#8217;t need to stablish any database connection for the script generation, since we are following the Code First concept for entity creation, so, the command will just look at the entities source code of the project to generate the SQL file. If we don&#8217;t use the &#8211;idempotent argument, the script will generate the SQL without the conditional logic to determinate which migration should be applied, causing an error if the database already exists.</em></p>



<h2 class="wp-block-heading">4. Execute SQL script to the database</h2>



<p>Now, with the SQL script available, we just need to execute this file to the database. In this post, we will use a common Azure Database as an example, so for this case, we can use the following task to accomplish this requirement:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- task: SqlAzureDacpacDeployment@1
  displayName: &#039;Update Database&#039;
  inputs:
    azureSubscription: &#039;&lt;Service Connection Identifier&gt;&#039;
    AuthenticationType: &#039;connectionString&#039; # You can use other method to authenticate to the database if you want
    ConnectionString: &#039;&lt;Database Connection String&gt;&#039;
    deployType: &#039;SqlTask&#039;
    SqlFile: &#039;$(System.ArtifactsDirectory)/script.sql&#039;
</pre></div>


<h2 class="wp-block-heading">5. Script File as a Pipeline Artifact</h2>



<p>Well done. The last task will only be used to make the file available to be accessed by the pipeline runner user. To do this, you can use the task below to add the generated script.sql file to the file bundle (artifacts). To check the artifacts, just access the artifacts option from the pipeline details after the job&#8217;s execution.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- task: PublishBuildArtifacts@1
  displayName: &#039;Publish Artifacts&#039;
  inputs:
    PathtoPublish: &#039;$(System.ArtifactsDirectory)/script.sql&#039;
    ArtifactName: &#039;$(artifactName)&#039;
    publishLocation: &#039;Container&#039;
</pre></div>


<h2 class="wp-block-heading">Conclusion</h2>



<p>In this post, we could learn an easy way to apply the database migrations to the remote environment by using automation (pipelines) to accomplish it. This method is simple, and does not have any database validation before script execution. So, if you have an active and sensitive environment, be sure that the needed validations are considered before the database update, to ensure that the database will not be update wrongly.</p>



<h2 class="wp-block-heading">Pipeline Result</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
trigger:
- none

pool:
  vmImage: windows-latest

variables:
  solution: &#039;**/*.sln&#039;
  buildPlatform: &#039;AnyCPU&#039;
  buildConfiguration: &#039;Release&#039;
  artifactName: &#039;artifacts&#039;
  environment: &#039;Development&#039;

- task: NuGetToolInstaller@1
  displayName: &#039;NuGet Installation&#039;

- task: NuGetCommand@2
  displayName: &#039;NuGet Restore&#039;
  inputs:
    restoreSolution: &#039;$(solution)&#039;

- task: VSBuild@1
  displayName: &#039;Build Project&#039;
  inputs:
    solution: &#039;backend/WebAPI&#039;
    msbuildArgs: &#039;/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=&quot;$(build.artifactStagingDirectory)&quot;&#039;
    platform: &#039;$(buildPlatform)&#039;
    configuration: &#039;$(buildConfiguration)&#039;

- task: PublishSymbols@2
  displayName: &#039;Publish Symbols&#039;
  inputs:
    SearchPattern: &#039;**/bin/**/*.pdb&#039;
    SymbolServerType: &#039;FileShare&#039;
    CompressSymbols: false

- task: PublishBuildArtifacts@1
  displayName: &#039;Publish Artifacts&#039;
  inputs:
    PathtoPublish: &#039;$(Build.ArtifactStagingDirectory)&#039;
    ArtifactName: &#039;artifacts&#039;
    publishLocation: &#039;Container&#039;

- task: DownloadBuildArtifacts@0
  displayName: &#039;Build Artifacts&#039;
  inputs:
    buildType: &#039;current&#039;
    downloadType: &#039;single&#039;
    artifactName: &#039;$(artifactName)&#039;
    downloadPath: &#039;$(System.ArtifactsDirectory)&#039;

- task: DotNetCoreCLI@2
  displayName: &#039;Install EF tool&#039;
  inputs:
    command: &#039;custom&#039;
    custom: &#039;tool&#039;
    arguments: &#039;install --global dotnet-ef&#039;

- task: DotNetCoreCLI@2
  displayName: &#039;Generate SQL Script&#039;
  inputs:
    command: &#039;custom&#039;
    custom: &#039;ef&#039;
    arguments: &#039;migrations script --idempotent --project $(Build.SourcesDirectory)\Data.csproj --output $(System.ArtifactsDirectory)/script.sql&#039;

- task: SqlAzureDacpacDeployment@1
  displayName: &#039;Update Database&#039;
  inputs:
    azureSubscription: &#039;&lt;Service Connection Identifier&gt;&#039;
    AuthenticationType: &#039;connectionString&#039;
    ConnectionString: &#039;&lt;Connection String&gt;&#039;
    deployType: &#039;SqlTask&#039;
    SqlFile: &#039;$(System.ArtifactsDirectory)/script.sql&#039;

- task: AzureRmWebAppDeployment@4
  displayName: &#039;Deploy Application&#039;
  inputs:
    ConnectionType: &#039;AzureRM&#039;
    azureSubscription: &#039;&lt;Service Connection Identifier&gt;&#039;
    appType: &#039;webApp&#039;
    WebAppName: &#039;armazemlegalapi&#039;
    deployToSlotOrASE: true
    ResourceGroupName: &#039;&lt;Resource Group Identifier&gt;&#039;
    SlotName: &#039;production&#039;
    packageForLinux: &#039;$(System.ArtifactsDirectory)/Project.zip&#039;

- task: PublishBuildArtifacts@1
  displayName: &#039;Publish Artifacts&#039;
  inputs:
    PathtoPublish: &#039;$(System.ArtifactsDirectory)/script.sql&#039;
    ArtifactName: &#039;$(artifactName)&#039;
    publishLocation: &#039;Container&#039;
</pre></div>


<h2 class="wp-block-heading">References</h2>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli#sql-scripts">Microsoft Managing Schemas Article</a></li>
</ul>
<p>The post <a href="https://blogit.create.pt/vini/2022/11/07/entity-framework-update-database-using-azure-pipelines/">Entity Framework &#8211; Update Database using Azure Pipelines</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/vini/2022/11/07/entity-framework-update-database-using-azure-pipelines/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Case Study: Azure Service Bus and Event-Driven Architectures</title>
		<link>https://blogit.create.pt/davidpereira/2021/06/02/case-study-azure-service-bus-and-event-driven-architectures/</link>
					<comments>https://blogit.create.pt/davidpereira/2021/06/02/case-study-azure-service-bus-and-event-driven-architectures/#respond</comments>
		
		<dc:creator><![CDATA[David Pereira&nbsp;and&nbsp;Francisco Grilo]]></dc:creator>
		<pubDate>Wed, 02 Jun 2021 11:02:12 +0000</pubDate>
				<category><![CDATA[Azure Service Bus]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[event-driven architecture]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=12291</guid>

					<description><![CDATA[<p>Introduction In&#160;this&#160;article&#160;we&#160;will&#160;talk&#160;about&#160;Event-Driven&#160;Architectures.&#160;We&#160;choose&#160;to&#160;use&#160;the&#160;Azure&#160;Cloud&#160;Infrastructure.Service&#160;Bus&#160;provides&#160;reliable,&#160;secure&#160;asynchronous&#160;messaging&#160;at&#160;scale.&#160;This&#160;article&#160;is&#160;written&#160;by&#160;the&#160;engineering&#160;team&#160;at&#160;CreateIT and&#160;it&#160;is&#160;intended&#160;to&#160;show&#160;you&#160;a&#160;case&#160;study in one of our projects for a client. We&#8217;ll&#160;take&#160;a&#160;deeper&#160;dive&#160;into&#160;the&#160;Service&#160;Bus&#160;technology,&#160;architecture,&#160;and&#160;design&#160;choices.&#160;The&#160;post&#160;will&#160;cover&#160;both&#160;conceptual&#160;material&#160;as&#160;well&#160;as&#160;implementation&#160;details.&#160;Most&#160;importantly,&#160;we&#160;will&#160;discuss&#160;design&#160;and&#160;implementation&#160;of&#160;some&#160;of&#160;the&#160;features&#160;that&#160;provide&#160;secure&#160;and&#160;reliable&#160;messaging&#160;at&#160;scale,&#160;while&#160;minimizing&#160;operational&#160;cost. Service&#160;Bus&#160;Entities When we are working with Azure Service Bus, we can choose two Entities: Topics or Queues. You can have multiple Topics or Queues per Service Bus Namespace, but firstly you need to differ one from another. If you want a FIFO queue and only have one Consumer, then Queues are the way to go. If you need multiple Consumers, then the Topic is the better option. In this specific case we will create a Subscription per Consumer (Topics are only available from the Standard Pricing Tier). Event-driven architectures Benefits&#160;with&#160;event-driven&#160;architectures What&#160;are&#160;the&#160;benefits&#160;of&#160;using&#160;a&#160;queue&#160;in&#160;the&#160;middle&#160;of&#160;these&#160;systems? We can decide to load balance the input from Customer Services. Let&#8217;s say there are a lot of updates being made to a customer, meaning a [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/davidpereira/2021/06/02/case-study-azure-service-bus-and-event-driven-architectures/">Case Study: Azure Service Bus and Event-Driven Architectures</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading" id="Introduction">Introduction</h2>



<p>In&nbsp;this&nbsp;article&nbsp;we&nbsp;will&nbsp;talk&nbsp;about&nbsp;Event-Driven&nbsp;Architectures.&nbsp;We&nbsp;choose&nbsp;to&nbsp;use&nbsp;the&nbsp;Azure&nbsp;Cloud&nbsp;Infrastructure.<br>Service&nbsp;Bus&nbsp;provides&nbsp;reliable,&nbsp;secure&nbsp;asynchronous&nbsp;messaging&nbsp;at&nbsp;scale.&nbsp;This&nbsp;article&nbsp;is&nbsp;written&nbsp;by&nbsp;the&nbsp;engineering&nbsp;team&nbsp;at&nbsp;CreateIT and&nbsp;it&nbsp;is&nbsp;intended&nbsp;to&nbsp;show&nbsp;you&nbsp;a&nbsp;case&nbsp;study in one of our projects for a client. </p>



<p>We&#8217;ll&nbsp;take&nbsp;a&nbsp;deeper&nbsp;dive&nbsp;into&nbsp;the&nbsp;Service&nbsp;Bus&nbsp;technology,&nbsp;architecture,&nbsp;and&nbsp;design&nbsp;choices.&nbsp;The&nbsp;post&nbsp;will&nbsp;cover&nbsp;both&nbsp;conceptual&nbsp;material&nbsp;as&nbsp;well&nbsp;as&nbsp;implementation&nbsp;details.&nbsp;Most&nbsp;importantly,&nbsp;we&nbsp;will&nbsp;discuss&nbsp;design&nbsp;and&nbsp;implementation&nbsp;of&nbsp;some&nbsp;of&nbsp;the&nbsp;features&nbsp;that&nbsp;provide&nbsp;secure&nbsp;and&nbsp;reliable&nbsp;messaging&nbsp;at&nbsp;scale,&nbsp;while&nbsp;minimizing&nbsp;operational&nbsp;cost.</p>



<h4 class="wp-block-heading" id="Service-Bus-Entities">Service&nbsp;Bus&nbsp;Entities</h4>



<p>When we are working with Azure Service Bus, we can choose two Entities: <strong>Topics</strong> or <strong>Queues</strong>. You can have multiple Topics or Queues per Service Bus Namespace, but firstly you need to differ one from another. If you want a FIFO queue and only have one Consumer, then Queues are the way to go. If you need multiple Consumers, then the Topic is the better option. In this specific case we will create a Subscription per Consumer (Topics are only available from the Standard Pricing Tier).</p>



<h2 class="wp-block-heading" id="Event-Driven-Architectures">Event-driven architectures</h2>



<h3 class="wp-block-heading" id="Benefits-with-event-driven-architectures">Benefits&nbsp;with&nbsp;event-driven&nbsp;architectures</h3>



<p>What&nbsp;are&nbsp;the&nbsp;benefits&nbsp;of&nbsp;using&nbsp;a&nbsp;queue&nbsp;in&nbsp;the&nbsp;middle&nbsp;of&nbsp;these&nbsp;systems?</p>



<ul class="wp-block-list" style="max-width:991px;margin-top:0px;margin-bottom:0px"><li>We can decide to <strong>load balance the input</strong> from Customer Services. Let&#8217;s say there are a lot of updates being made to a customer, meaning a lot of events being published. We scale the number of consumers and user the <strong>competing pattern</strong></li><li>We can <strong>throttle the input</strong>. If on black Friday there are a ton of events and in case our Audit Log system is down. We simply store these events on the queue and consume them when the service is back online again. Of course we&#8217;d need to implement some logic for this behavior, but adding this &#8220;middleware&#8221; buys us options.</li></ul>



<p>In our use case, we wanted to move to an implementation where the Web API doesn&#8217;t get affected by any changes on these external systems. But in order to change the implementation, we must first figure out what are the challenges associated with this change.</p>



<h3 class="wp-block-heading" id="Challenges-with-event-driven-architectures"><strong>Challenges&nbsp;with&nbsp;event-driven&nbsp;architectures</strong></h3>



<h4 class="wp-block-heading" id="Message/Event-order"><strong>Message/Event&nbsp;order</strong></h4>



<p>Azure Service Bus has a feature called <strong>sessions</strong>. A session provides a context to send and retrieve messages that will preserve ordered delivery. However, in our use case we chose not to use it.</p>



<h4 class="wp-block-heading" id="Message-Lock-Duration"><strong>Message&nbsp;Lock&nbsp;Duration</strong></h4>



<p>When we are using Queues, every message has a lock Duration. During this time the consumer needs to process it. But if this consumer needs to contact multiple external systems this time may rise and our messages could stop in the Dead-Letter. So the best practice is to change it accordingly to your needs. We recommend you to set this time extremely high in the beginning, and then do some tests to calculate the average.</p>



<p>After that add 30% more of its value, in case of some lengthy  requests (in this case if we have outliers, they might stop in the Queue). If you are using a Topic, you will have a Lock Duration per Subscription. So make sure to adjust this time accordingly to its functions.</p>



<h2 class="wp-block-heading" id="Implementation"><strong>Implementation</strong></h2>



<p>In the Figure 1 you can see the initial architecture for the Customer Management system. It was responsible to make the requests to the other systems.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="612" src="https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-1024x612.png" alt="" class="wp-image-12299" srcset="https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-1024x612.png 1024w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-300x179.png 300w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-768x459.png 768w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-696x416.png 696w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10-703x420.png 703w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-10.png 1063w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Figure 1 &#8211; Initial architecture diagram </figcaption></figure>



<p>With the new implementation, a message broker was introduced and we&nbsp;used&nbsp;the <a href="https://martinfowler.com/articles/201701-event-driven.html#Event-carriedStateTransfer" target="_blank" rel="noreferrer noopener">event-carried state transfer pattern</a>, meaning our events&nbsp;had&nbsp;all&nbsp;the&nbsp;information&nbsp;the&nbsp;consumer&nbsp;needed&nbsp;in&nbsp;order&nbsp;to&nbsp;do&nbsp;their&nbsp;job.&nbsp;We&nbsp;took&nbsp;in&nbsp;consideration&nbsp;the&nbsp;<strong>event&nbsp;notifications&nbsp;pattern</strong>,&nbsp;where&nbsp;the&nbsp;consumer&nbsp;would&nbsp;have&nbsp;to&nbsp;make&nbsp;a&nbsp;request&nbsp;to&nbsp;the&nbsp;API&nbsp;that&nbsp;originated&nbsp;the&nbsp;event,&nbsp;in&nbsp;order&nbsp;to&nbsp;get&nbsp;more&nbsp;information.&nbsp;But&nbsp;this&nbsp;brings&nbsp;new&nbsp;problems&nbsp;to&nbsp;the&nbsp;table.&nbsp;What&nbsp;if&nbsp;when&nbsp;the&nbsp;consumer&nbsp;code&nbsp;runs,&nbsp;the&nbsp;information&nbsp;for&nbsp;that&nbsp;customer&nbsp;ID&nbsp;changed?&nbsp;What&nbsp;if&nbsp;the&nbsp;event&nbsp;was&nbsp;<code>CUSTOMER_CREATED</code>&nbsp;but&nbsp;in&nbsp;the&nbsp;meanwhile&nbsp;the&nbsp;customer&nbsp;was&nbsp;deleted?</p>



<h3 class="wp-block-heading" id="Retries-with-Polly"><strong>Retries&nbsp;with&nbsp;Polly</strong></h3>



<p>In a distributed system, many things can go wrong. The network can fail or have additional latency, systems may be temporarily down, etc. We use the <code>Azure.ServiceBus.Messaging</code> NuGet package so we are able to check if the exception is a transient fault or not (more information on <a href="https://github.com/Azure/azure-sdk-for-net/blob/Azure.Messaging.ServiceBus_7.1.1/sdk/servicebus/Azure.Messaging.ServiceBus/README.md#exception-handling)" target="_blank" rel="noreferrer noopener">these docs</a>), then use <a href="https://github.com/App-vNext/Polly" target="_blank" rel="noreferrer noopener">Polly</a> to setup retry logic and fallbacks. There are other options to implement retry policies, for example we took in consideration the <a href="https://docs.microsoft.com/en-us/azure/architecture/best-practices/retry-service-specific#service-bus" target="_blank" rel="noreferrer noopener">Retry guidance for Azure Services</a> documentation from Microsoft. Since we use the latest Azure SDK,  the appropriate class would be <a href="https://docs.microsoft.com/en-us/dotnet/api/azure.messaging.servicebus.servicebusretrypolicy?view=azure-dotnet" target="_blank" rel="noreferrer noopener">ServiceBusRetryPolicy</a>.<br>We configured Polly to retry to publish a message three times (this configuration is on <code>appsettings.json</code>), with exponential times between each attempt.<br>If after the third retry we can&#8217;t publish the message we need to save it, because it has crucial information. So to solve this issue we created a Fallback Gateway, to write these messages to a Container inside an Azure Storage Account.</p>



<h3 class="wp-block-heading" id="Filters-for-message-routing"><strong>Filters&nbsp;for&nbsp;message&nbsp;routing</strong></h3>



<p>This section only applies for Topics Entities on the Azure Service Bus.<br>We can add <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/topic-filters" target="_blank" rel="noreferrer noopener">Filters</a> on our Subscriptions to help us with routing each message to its specific Consumer. We considered two filter types:</p>



<ul class="wp-block-list" style="max-width:1003px;margin-top:-19px;margin-bottom:49px"><li>SQL Filter</li><li>Correlation Filter</li></ul>



<p style="margin-bottom:12px">Using the Correlation Filter you can configure Custom Properties and create Filters for your needs. You just need to make sure the producer of the messages, includes the header, that you are currently using to filter, on the message.</p>



<p>With SQL Filters you can create conditional expression to evaluate the current message. Just make sure that all the system properties are prefixed with <em>sys</em>. in the expression. Either way, both filters work just choose one that suits you the most!</p>



<h3 class="wp-block-heading" id="Dead-Letter-Queue"><strong>Dead-Letter&nbsp;Queue</strong></h3>



<p class="has-text-align-left">In case the consumer application can&#8217;t process the message after the <strong>Max Delivery Count</strong> attempts, instead of returning it to the queue it will be sent automatically to the Dead-Letter queue. If you are using the Topic, each subscriber has its own Dead-Letter queue. You can also, configure different Max Delivery Counts Values for each Subscriber. </p>



<p>All messages that are published to the Service Bus have a TTL (Time-To-Live). After this time ends the message will be transferred automatically to the Dead-Letter. So make sure you adjust this time accordingly to your needs.</p>



<p class="has-text-align-left">With&nbsp;this&nbsp;we&nbsp;are&nbsp;able&nbsp;to&nbsp;save&nbsp;messages&nbsp;that&nbsp;weren&#8217;t&nbsp;processed&nbsp;by&nbsp;the&nbsp;consumer&nbsp;application,&nbsp;but&nbsp;we&nbsp;should&nbsp;always&nbsp;strive&nbsp;to&nbsp;have&nbsp;an empty&nbsp;dead-letter&nbsp;queue.</p>



<h2 class="wp-block-heading" id="Conclusion">Conclusion</h2>



<p>Our&nbsp;first&nbsp;steps&nbsp;into&nbsp;an&nbsp;Event-Driven&nbsp;Architecture&nbsp;was&nbsp;a&nbsp;truly&nbsp;success!<br>We&nbsp;were&nbsp;able&nbsp;to&nbsp;expand&nbsp;our&nbsp;previous&nbsp;solution&nbsp;to&nbsp;be&nbsp;compatible&nbsp;with&nbsp;multiple&nbsp;external&nbsp;systems&nbsp;and&nbsp;instead&nbsp;of&nbsp;having&nbsp;the&nbsp;API&nbsp;sending&nbsp;a&nbsp;HTTPS&nbsp;request&nbsp;for&nbsp;each&nbsp;one&nbsp;we&nbsp;had&nbsp;this&nbsp;Application&nbsp;sending&nbsp;one&nbsp;message&nbsp;to&nbsp;a&nbsp;Topic&nbsp;in&nbsp;the&nbsp;Service&nbsp;Bus.<br>One&nbsp;of&nbsp;our&nbsp;goals&nbsp;was&nbsp;to&nbsp;have&nbsp;load&nbsp;balance&nbsp;in&nbsp;the&nbsp;Publisher&nbsp;Application.&nbsp;We&nbsp;went&nbsp;from&nbsp;a&nbsp;1-&gt;3&nbsp;dependency&nbsp;to&nbsp;a&nbsp;1-&gt;&nbsp;1, as you can see in the Figure 2.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="269" src="https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-1024x269.png" alt="" class="wp-image-12300" srcset="https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-1024x269.png 1024w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-300x79.png 300w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-768x202.png 768w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-1536x403.png 1536w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-696x183.png 696w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-1068x280.png 1068w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11-1600x420.png 1600w, https://blogit.create.pt/wp-content/uploads/2021/05/MicrosoftTeams-image-11.png 1840w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Figure 2 &#8211; Architecture Diagram with Azure Service Bus</figcaption></figure>



<p>Which&nbsp;is&nbsp;great&nbsp;and&nbsp;keeps&nbsp;the&nbsp;system&nbsp;scalable&nbsp;and&nbsp;future&nbsp;proof. Our&nbsp;solution&nbsp;became&nbsp;more&nbsp;decoupled&nbsp;in&nbsp;order&nbsp;to&nbsp;keep&nbsp;the&nbsp;Application&nbsp;agnostic&nbsp;to&nbsp;these&nbsp;changes.<br>If&nbsp;you&nbsp;have&nbsp;a&nbsp;similar&nbsp;situation&nbsp;with&nbsp;an Event-Driven Architecture then we totally recommend you to check more about this technology and it&#8217;s features.</p>



<p>We would like to share a link to <a href="https://github.com/Azure/azure-service-bus" target="_blank" rel="noreferrer noopener">Microsoft Azure Service Bus GitHub</a>. Most of the implementations of either the publisher or the subscriber were&nbsp;inspired&nbsp;by&nbsp;this&nbsp;documentation,&nbsp;so&nbsp;make&nbsp;sure&nbsp;you&nbsp;check&nbsp;it&nbsp;out!<br>If&nbsp;you&nbsp;have&nbsp;any&nbsp;questions,&nbsp;please&nbsp;write&nbsp;them&nbsp;down&nbsp;below.</p>



<h2 class="wp-block-heading" id="Additional-Links"><strong>Additional&nbsp;Links</strong></h2>



<p><a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-exceptions" target="_blank" rel="noreferrer noopener">Service&nbsp;Bus&nbsp;Exceptions</a><br><a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview" target="_blank" rel="noreferrer noopener">Service&nbsp;Bus&nbsp;Basic&nbsp;Steps</a><br><a href="https://docs.microsoft.com/pt-pt/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues" target="_blank" rel="noreferrer noopener">Tutorial&nbsp;with&nbsp;DotNet</a></p>
<p>The post <a href="https://blogit.create.pt/davidpereira/2021/06/02/case-study-azure-service-bus-and-event-driven-architectures/">Case Study: Azure Service Bus and Event-Driven Architectures</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/davidpereira/2021/06/02/case-study-azure-service-bus-and-event-driven-architectures/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Straight A&#8217;s in WebPagetest with Umbraco</title>
		<link>https://blogit.create.pt/andresantos/2018/11/27/straight-as-in-webpagetest-with-umbraco/</link>
					<comments>https://blogit.create.pt/andresantos/2018/11/27/straight-as-in-webpagetest-with-umbraco/#respond</comments>
		
		<dc:creator><![CDATA[André Santos]]></dc:creator>
		<pubDate>Tue, 27 Nov 2018 21:40:06 +0000</pubDate>
				<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure cdn]]></category>
		<category><![CDATA[blobstorage]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[imageprocessor]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[UmbracoFileSystemProviders.Azure]]></category>
		<category><![CDATA[WebPagetest]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=7450</guid>

					<description><![CDATA[<p>Before launching a new website, there&#8217;s a checklist I go through, to make sure that everything is ready. One of the items in my checklist is to test the website against WebPagetest. WebPagetest is a tool that was originally developed by AOL for use internally and was open-sourced in 2008 under a BSD license. The [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/andresantos/2018/11/27/straight-as-in-webpagetest-with-umbraco/">Straight A&#8217;s in WebPagetest with Umbraco</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap dropcap3">B</span>efore launching a new website, there&#8217;s a checklist I go through, to make sure that everything is ready. One of the items in my checklist is to test the website against <strong>WebPagetest</strong>.</p>
<blockquote class="td_quote_box td_box_right"><p>WebPagetest is a tool that was originally developed by <a href="http://dev.aol.com/">AOL</a> for use internally and was open-sourced in 2008 under a BSD license. The online version at <a href="https://www.webpagetest.org/">www.webpagetest.org</a> is run for the benefit of the performance community with several companies and individuals providing the testing infrastructure around the globe.</p></blockquote>
<p>This tool tests any website against 6 major performance affecting factors, and provides a myriad of graphs and logs that make abundantly clear what might be slowing down your site.</p>
<p>In this post I&#8217;ll provide ways to make your site get straight A&#8217;s in WebPagetest.</p>
<p><span id="more-7450"></span></p>
<h1>Setup</h1>
<p>To start this off, let&#8217;s setup our environment. We&#8217;ll just need the following:</p>
<ul>
<li>Visual Studio 2017</li>
<li>Microsoft Azure account</li>
</ul>
<p>In Visual Studio, let&#8217;s create a new empty ASP.NET Web Application project. Then, we&#8217;ll need the latest and greatest Umbraco NuGet package (I used version 7.12.4). Once it finishes installing, just launch the website and install Umbraco with all defaults. This will bootstrap Umbraco with the Starter Website, which we&#8217;ll use as our &#8220;guinea pig&#8221; for WebPagetest.</p>
<p>Next: publish it! We can use the publish wizard to automatically create our new WebApp and SQL Database in Azure. Before installing Umbraco in Azure, we&#8217;ll need to change the Web.config so that the install wizard is run again (I use <a href="https://filezilla-project.org/">Filezilla</a> to change it in Azure):</p>
<p>Clear the Umbraco version number:</p>
<pre class="brush: xml; title: Web.config; notranslate">
&lt;add key=&quot;umbracoConfigurationStatus&quot; value=&quot;&quot;&gt;
</pre>
<p>Clear the Umbraco connection string:</p>
<pre class="brush: xml; title: Web.config; notranslate">
&lt;add name=&quot;umbracoDbDSN&quot; connectionstring=&quot;&quot; providername=&quot;System.Data.SqlClient&quot;&gt;
</pre>
<p>With these changes in place, we&#8217;re good to go. This time, we&#8217;ll not use the defaults in the Umbraco install wizard, since we&#8217;ll want to use the SQL Database we&#8217;ve just created in Azure.</p>
<h1>First test</h1>
<p>For our tests, we&#8217;ll use the people page of the Starter Website. This is the score I got with a standard (S0) database and a basic WebApp:</p>
<p><img decoding="async" class="size-medium wp-image-7454 aligncenter" src="https://blogit.create.pt////wp-content/uploads/2018/09/first-webpagetest-300x91.png" alt="" width="300" height="91" srcset="https://blogit.create.pt/wp-content/uploads/2018/09/first-webpagetest-300x91.png 300w, https://blogit.create.pt/wp-content/uploads/2018/09/first-webpagetest-768x233.png 768w, https://blogit.create.pt/wp-content/uploads/2018/09/first-webpagetest-696x211.png 696w, https://blogit.create.pt/wp-content/uploads/2018/09/first-webpagetest.png 841w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Since this is a very small site, only used for demonstration purposes, half of the metrics are already cleared! However, this is not usually the case for bigger websites. For this reason, I&#8217;ll still present some solutions to improve the grade for these metrics.</p>
<h1>First Byte Time</h1>
<p><em>These test measures the time it takes for the first byte to reach the client&#8217;s browser after the initial http request.</em></p>
<p>There are two main factors that influence this result:</p>
<ul>
<li>Server power</li>
<li>The webpage complexity (integrations with external services, complex logic involved, etc)</li>
</ul>
<h3>How to get an A</h3>
<p>The easiest way to mitigate this problem is by caching. You can see how to do output caching in Umbraco by reading this old post of mine: <a href="https://blogit.create.pt////andresantos/2016/06/30/umbraco-and-donut-output-cache/">https://blogit.create.pt////andresantos/2016/06/30/umbraco-and-donut-output-cache/</a>.</p>
<h1>Keep-alive Enabled</h1>
<p><em>Keep alive is a method to allow the same tcp connection for HTTP conversation instead of opening a new one with each new request.</em></p>
<h3>How to get an A</h3>
<p>This setting is active by default in IIS, so, it&#8217;s also active by default in Azure WebApps, so it&#8217;s easy to get an A!</p>
<h1>Compress Transfer</h1>
<p><em>Gzip compresses your webpages, style sheets and javascripts, before sending them over to the browser. This drastically reduces transfer time since the files are much smaller.</em></p>
<h3>How to get an A</h3>
<p>Just add this setting to your Web.config file:</p>
<pre class="brush: xml; title: Web.config; notranslate">
&lt;httpcompression dynamiccompressionenablecpuusage=&quot;0&quot; dynamiccompressiondisablecpuusage=&quot;90&quot; nocompressionforhttp10=&quot;false&quot; nocompressionforproxies=&quot;false&quot;&gt;
    &lt;statictypes&gt;
        &lt;add mimetype=&quot;text/*&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;message/*&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/javascript&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/font-woff&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/font-woff2&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/vnd.ms-fontobject&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/octet-stream&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;*/*&quot; enabled=&quot;false&quot;&gt;
    &lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/statictypes&gt;
    &lt;dynamictypes&gt;
        &lt;add mimetype=&quot;text/*&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;message/*&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;application/javascript&quot; enabled=&quot;true&quot;&gt;
        &lt;add mimetype=&quot;*/*&quot; enabled=&quot;false&quot;&gt;
    &lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/add&gt;&lt;/dynamictypes&gt;
&lt;/httpcompression&gt;
</pre>
<h1>Compress Images</h1>
<p><em><span class="ILfuVd">Image compression is minimizing the size in bytes of a graphics file without degrading the quality of the image to an unacceptable level.</span></em></p>
<h3>How to get an A</h3>
<p>In Umbraco, to get an A in this grade, you need to do two things:</p>
<ol>
<li>Crop every image and use srcsets where you can</li>
<li>Use the PostProcessor plugin for Image Processor</li>
</ol>
<p>Cropping an image is easy in Umbraco:</p>
<pre class="brush: xml; title: People.cshtml; notranslate">
&lt;div class=&quot;employee-grid__item__image&quot; style=&quot;background-image: url('@person.Photo.GetCropUrl(width: 323, height: 300, quality: 85)')&quot;&gt;&lt;/div&gt;
</pre>
<p>In order to use the PostProcessor plugin, you just need to install it via nuget: <a href="https://www.nuget.org/packages/ImageProcessor.Web.PostProcessor/1.3.1.25">https://www.nuget.org/packages/ImageProcessor.Web.PostProcessor/1.3.1.25</a>.</p>
<h1>Cache Static Content</h1>
<p><em>Static content is content that changes rarely. For this reason it can be cached in the user&#8217;s browser to avoid downloading the same file over and over again.</em></p>
<h3>How to get an A</h3>
<p>Just set the time it takes for the content to expire in the user&#8217;s browser and add extra mime types if you want:</p>
<pre class="brush: xml; title: Web.config; notranslate">
&lt;staticcontent&gt;
    &lt;clientcache cachecontrolmode=&quot;UseMaxAge&quot; cachecontrolmaxage=&quot;7.24:00:00&quot;&gt;
    &lt;remove fileextension=&quot;.air&quot;&gt;
    &lt;mimemap fileextension=&quot;.air&quot; mimetype=&quot;application/vnd.adobe.air-application-installer-package+zip&quot;&gt;
    &lt;remove fileextension=&quot;.svg&quot;&gt;
    &lt;mimemap fileextension=&quot;.svg&quot; mimetype=&quot;image/svg+xml&quot;&gt;
    &lt;remove fileextension=&quot;.woff&quot;&gt;
    &lt;mimemap fileextension=&quot;.woff&quot; mimetype=&quot;application/x-font-woff&quot;&gt;
    &lt;remove fileextension=&quot;.woff2&quot;&gt;
    &lt;mimemap fileextension=&quot;.woff2&quot; mimetype=&quot;application/x-font-woff2&quot;&gt;
    &lt;remove fileextension=&quot;.less&quot;&gt;
    &lt;mimemap fileextension=&quot;.less&quot; mimetype=&quot;text/css&quot;&gt;
    &lt;remove fileextension=&quot;.mp4&quot;&gt;
    &lt;mimemap fileextension=&quot;.mp4&quot; mimetype=&quot;video/mp4&quot;&gt;
    &lt;remove fileextension=&quot;.json&quot;&gt;
    &lt;mimemap fileextension=&quot;.json&quot; mimetype=&quot;application/json&quot;&gt;
&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/mimemap&gt;&lt;/remove&gt;&lt;/clientcache&gt;&lt;/staticcontent&gt;
</pre>
<h1>Effective use of CDN</h1>
<p><em> A content delivery network (CDN) refers to a geographically distributed group of servers which work together to provide fast delivery of Internet content. A CDN allows for the quick transfer of assets needed for loading Internet content including HTML pages, javascript files, stylesheets, images, and videos.</em></p>
<h3>How to get an A</h3>
<p>In Umbraco, you can achieve this last grade by doing two things:</p>
<ol>
<li>Use an Azure Blob Storage for media storage by installing this nuget package: <a href="https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure">https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure</a>.</li>
<li>Create an Azure CDN for serving these blobs through a content delivery network.</li>
</ol>
<p>After creating an Azure CDN service and waiting about an hour for it to be available, the following presents my configuration for the media assets to be provided by it:</p>
<pre class="brush: xml; title: config/imageprocessor/security.config; notranslate">
&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?--&gt;
&lt;security&gt;
  &lt;services&gt;
    &lt;service name=&quot;LocalFileImageService&quot; type=&quot;ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web&quot;&gt;
    &lt;!--Disable the LocalFileImageService and enable this one when using virtual paths. --&gt;
    &lt;service prefix=&quot;media/&quot; name=&quot;CloudImageService&quot; type=&quot;ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web&quot;&gt;
      &lt;settings&gt;
        &lt;setting key=&quot;Container&quot; value=&quot;media&quot;&gt;
        &lt;setting key=&quot;MaxBytes&quot; value=&quot;8194304&quot;&gt;
        &lt;setting key=&quot;Timeout&quot; value=&quot;30000&quot;&gt;
        &lt;setting key=&quot;Host&quot; value=&quot;https://&lt;umbracositename&gt;.blob.core.windows.net/media&quot;&gt;
      &lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/settings&gt;
    &lt;/service&gt;
  &lt;/service&gt;&lt;/services&gt;
&lt;/security&gt;
</pre>
<pre class="brush: xml; title: config/imageprocessor/security.config; notranslate">
&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?--&gt;
&lt;caching currentcache=&quot;AzureBlobCache&quot;&gt;
  &lt;caches&gt;
    &lt;cache name=&quot;AzureBlobCache&quot; type=&quot;ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache&quot; maxdays=&quot;365&quot;&gt;
      &lt;settings&gt;
        &lt;setting key=&quot;CachedStorageAccount&quot; value=&quot;DefaultEndpointsProtocol=https;AccountName=&lt;accountname&gt;;AccountKey=&lt;accountkey&gt;;EndpointSuffix=core.windows.net&quot;&gt;
        &lt;setting key=&quot;CachedBlobContainer&quot; value=&quot;cache&quot;&gt;
        &lt;setting key=&quot;UseCachedContainerInUrl&quot; value=&quot;false&quot;&gt;
        &lt;setting key=&quot;SourceStorageAccount&quot; value=&quot;DefaultEndpointsProtocol=https;AccountName=&lt;accountname&gt;;AccountKey=&lt;accountkey&gt;;EndpointSuffix=core.windows.net&quot;&gt;
        &lt;setting key=&quot;SourceBlobContainer&quot; value=&quot;media&quot;&gt;
        &lt;setting key=&quot;StreamCachedImage&quot; value=&quot;false&quot;&gt;
        &lt;setting key=&quot;CachedCDNRoot&quot; value=&quot;https://&lt;cdnrootname&gt;.azureedge.net&quot;&gt;
        &lt;setting key=&quot;CachedCDNTimeout&quot; value=&quot;1000&quot;&gt;
      &lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/setting&gt;&lt;/settings&gt;
    &lt;/cache&gt;
  &lt;/caches&gt;
&lt;/caching&gt;
</pre>
<h1>Conclusion</h1>
<p>So, if you followed these tips correctly, you&#8217;ll be able to run WebPagetest and get the same result as I did:</p>
<p><img decoding="async" class="wp-image-7937 size-medium aligncenter" src="https://blogit.create.pt////wp-content/uploads/2018/11/straightAs-300x89.png" alt="straightAs" width="300" height="89" srcset="https://blogit.create.pt/wp-content/uploads/2018/11/straightAs-300x89.png 300w, https://blogit.create.pt/wp-content/uploads/2018/11/straightAs-768x228.png 768w, https://blogit.create.pt/wp-content/uploads/2018/11/straightAs-696x207.png 696w, https://blogit.create.pt/wp-content/uploads/2018/11/straightAs.png 837w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>You can find the complete report here: <a href="https://www.webpagetest.org/result/181127_2A_bea6941dcd20d38ab54c29409fca9363/">https://www.webpagetest.org/result/181127_2A_bea6941dcd20d38ab54c29409fca9363/</a>.</p>
<p>The post <a href="https://blogit.create.pt/andresantos/2018/11/27/straight-as-in-webpagetest-with-umbraco/">Straight A&#8217;s in WebPagetest with Umbraco</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/andresantos/2018/11/27/straight-as-in-webpagetest-with-umbraco/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Specifications</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 18:00:04 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=954</guid>

					<description><![CDATA[<p>Internet Connection Create IT as an Internet connection of 100mbps Down/20mbps Up. Azure was capping at a 150mbps symmetrical connection. TeamViewer VPN, Azure Site-to-Site and Point-to-Site connections were capped at 10mpbs. Azure plans In Azure, the most economical plans were chosen, considering our requirements. Some plans were free, some were cheaper than the others, but [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications/">Latency test between Azure and On-Premises – Specifications</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: center"><strong><em>Internet Connection</em></strong></p>
<p>Create IT as an Internet connection of 100mbps Down/20mbps Up. Azure was capping at a 150mbps symmetrical connection.</p>
<p>TeamViewer VPN, Azure Site-to-Site and Point-to-Site connections were capped at 10mpbs.</p>
<p><span id="more-954"></span></p>
<p style="text-align: center"><strong><em>Azure plans</em></strong></p>
<p>In Azure, the most economical plans were chosen, considering our requirements. Some plans were free, some were cheaper than the others, but having VPN capabilities and all configurations supported, we chose the cheaper plans that were available with all these needed features supported.</p>
<p style="text-align: center"><strong><em>Browsers</em></strong></p>
<p>We used Chrome, Firefox and Edge. This was to eliminate browser differences. Not showing any differences in total execution times, we kept using Chrome as a default testing browser.</p>
<p style="text-align: center"><strong><em>LAN Connection</em></strong></p>
<p>Lan wise, our internal network is based on a 1gbps Local Area Network.</p>
<p style="text-align: center"><strong><em>On-Premises Service Host</em></strong></p>
<p>The On-Premises Service was hosted on a machine running Windows 10 Retail with latest updates installed and IIS Express. All code was made with Visual Studio 2017 Enterprise. The relevant host hardware specifications are:</p>
<ol>
<li><em>Intel® Core™ i7-6700HQ CPU @ 2.6GHz</em></li>
<li><em>32GB of RAM DDR4 @ 3400MHz</em></li>
<li><em>NVMe M.2 PCI-e 240GB SSD</em></li>
</ol>
<p style="text-align: center"><strong><em>Testing Hours</em></strong></p>
<p>All tests were executed on working hours, 9am to 18pm, GMT.</p>
<p style="text-align: center"><strong><em>The Writer</em></strong></p>
<p>I’m a consultant @ Create It, a Portuguese company. If you read this, make sure I know about it! ? Hugs and kisses! This was an absolute pleasure to make ?</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications/">Latency test between Azure and On-Premises – Specifications</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Conclusions</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:50:52 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=884</guid>

					<description><![CDATA[<p>And when all testing’s complete… A final review is coming! So, brace yourselves and let’s start with a graph ? Note: 5MB results must be multiplied by 10 (value x 10) Here are the results. All of them. Don’t forget to multiply 5MB results by 10! With the graph below, we can check how message [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions/">Latency test between Azure and On-Premises – Conclusions</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>And when all testing’s complete… A final review is coming! So, brace yourselves and let’s start with a graph ?</p>
<p><img decoding="async" class="aligncenter size-full wp-image-894" src="http://blogit-create.com/wp-content/uploads/2017/11/net-12.png" alt="" width="624" height="369" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-12.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/net-12-300x177.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p style="text-align: center"><strong>Note: 5MB results must be multiplied by 10 (value x 10)</strong></p>
<p>Here are the results. All of them. Don’t forget to multiply 5MB results by 10!</p>
<p><span id="more-884"></span></p>
<p>With the graph below, we can check how message sizes influence latency. After doing some math, these are the results:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-904" src="http://blogit-create.com/wp-content/uploads/2017/11/net-13.png" alt="" width="576" height="334" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-13.png 576w, https://blogit.create.pt/wp-content/uploads/2017/11/net-13-300x174.png 300w" sizes="(max-width: 576px) 100vw, 576px" /></p>
<p>&nbsp;</p>
<p>As we can confirm, latency follows an exponential growing rate, which means, the bigger the message, even greater will be latency. We can confirm that, for each scenario, this applies.</p>
<p><strong>But what does it tell me? </strong>This tells you that you need to be careful if you’re planning on sending big messages between two points. <strong>This exponential growing rate applies to all scenarios!</strong></p>
<p>All values listed and noted, so we gave tests a score. This score is calculated by adding all three results (10kb, 100kb and 5mb) and dividing all by three. This will give us average execution time. For your best understanding, below is an exponential graph. This climbs faster and faster to infinity, being the horizontal axle message sizes, and the vertical one latency:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-914" src="http://blogit-create.com/wp-content/uploads/2017/11/net-14.png" alt="" width="415" height="188" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-14.png 415w, https://blogit.create.pt/wp-content/uploads/2017/11/net-14-300x136.png 300w" sizes="(max-width: 415px) 100vw, 415px" /></p>
<p>&nbsp;</p>
<p style="text-align: center"><strong>Now for the results!</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-924" src="http://blogit-create.com/wp-content/uploads/2017/11/net-15.png" alt="" width="576" height="336" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-15.png 576w, https://blogit.create.pt/wp-content/uploads/2017/11/net-15-300x175.png 300w" sizes="(max-width: 576px) 100vw, 576px" /></p>
<p>As we can check, <strong>Test #2 (Local On-Premises LAN) was the winner here, latency wise.</strong> This was expected. Although this is the fastest, it’s the riskiest and <strong>NOT RECOMMENDED! It’s true that latency is reduced, but with only ~53ms difference between Azure Site-to-Site on a 100Kb message, </strong>is it worth to have a full infrastructure depending on your maintenance? And the networking gear it requires? What about having someone responsible for the room 24/7? How about costs? <strong>Think about it!</strong> Think about savings when migrating your business to Cloud!</p>
<p><strong>Second place</strong> goes to HTTP without VPN (Exposed services). <strong>Not a Cloud solution, and a risky one too! </strong>If you like hackers messing with your vital business services and trying to break in from all over the world 24/7, go right ahead!</p>
<p>Regarding fast and safe Cloud solutions, which is the main reason of reading this document after all, <strong>the winner was Test #4 (Azure Site-to-Site VPN), getting third place on the board, by a difference of 8 points! </strong>This managed to be the <strong>safest, more efficient and with 99.9% uptime</strong> method of expanding your office or network, and have a low-latency data exchange. <strong>This is the optimal and safer solution. No hackers, no maintenance, no worries!</strong></p>
<blockquote>
<p style="text-align: center">Consult us to migrate your business! <strong>You’re at the doorstep to your future!</strong></p>
</blockquote>
<p><strong> <img decoding="async" class="aligncenter size-full wp-image-934" src="http://blogit-create.com/wp-content/uploads/2017/11/create.png" alt="" width="302" height="101" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/create.png 302w, https://blogit.create.pt/wp-content/uploads/2017/11/create-300x100.png 300w" sizes="(max-width: 302px) 100vw, 302px" /></strong></p>
<p>&nbsp;</p>
<p><strong>For full test specifications, <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-specifications">read here</a>!</strong></p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions/">Latency test between Azure and On-Premises – Conclusions</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Part Seven</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:40:45 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=814</guid>

					<description><![CDATA[<p>In this scenario we would be using a Relay. This is yet another way of connecting your on-premises infrastructure to Azure, but not recommended at all in terms of latency. We’ll explain it, don’t worry. We would also be using an Hybrid Connection to establish a “link” between my local machine and Function Apps. First [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven/">Latency test between Azure and On-Premises – Part Seven</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this scenario we would be using a <em>Relay</em>. This is <strong>yet another way of connecting your on-premises</strong> <strong>infrastructure to Azure</strong>, but <strong>not recommended at all in terms of latency</strong>. We’ll explain it, don’t worry. We would also be using an Hybrid Connection to <strong>establish a “link” between my local machine and Function Apps</strong>.</p>
<p>First step is to configure an Hybrid Connection in Function Apps network configuration. Then, you can run Hybrid Connection Manager (assuming you’ve downloaded it from Azure), to manage your connection.</p>
<p><span id="more-814"></span></p>
<p><img decoding="async" class="aligncenter size-full wp-image-834" src="http://blogit-create.com/wp-content/uploads/2017/11/net-8.png" alt="" width="583" height="326" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-8.png 583w, https://blogit.create.pt/wp-content/uploads/2017/11/net-8-300x168.png 300w" sizes="(max-width: 583px) 100vw, 583px" /></p>
<p>&nbsp;</p>
<p>After saving which connection you want to use, you can always confirm connection status in this window:</p>
<p><img decoding="async" class="aligncenter size-full wp-image-844" src="http://blogit-create.com/wp-content/uploads/2017/11/net-9.png" alt="" width="590" height="321" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-9.png 590w, https://blogit.create.pt/wp-content/uploads/2017/11/net-9-300x163.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></p>
<p>&nbsp;</p>
<p>But wait, I see <strong><em>Service Bus</em></strong> referenced in that print screen! What’s that?</p>
<p><img decoding="async" class="aligncenter size-full wp-image-854" src="http://blogit-create.com/wp-content/uploads/2017/11/net-10.png" alt="" width="600" height="343" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-10.png 600w, https://blogit.create.pt/wp-content/uploads/2017/11/net-10-300x172.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>&nbsp;</p>
<p><strong><em>Service Bus</em></strong> is a technology of <strong>asynchronously</strong> sending and receiving messages from multiple publishers to multiple subscribers. This is, as you’ve probably guessed, a <strong>publish/subscribe</strong> mechanism.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-864" src="http://blogit-create.com/wp-content/uploads/2017/11/net-11.png" alt="" width="624" height="320" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-11.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/net-11-300x154.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>This is an example of a publish/subscribe architecture. The image should be self-explanatory. A sender sends a message, and all subscribers have filters to only process the messages that they subscribe to.</p>
<p style="text-align: center"><strong>Why didn’t you test this method?</strong></p>
<p>Well, before you call me anything, you got to understand <strong>why</strong>.</p>
<p style="text-align: center"><strong><em>Architecture!</em></strong></p>
<p>This concept relies on checking the bus for new messages from time to time, with a 10 second interval for instance. Each 10 second, your program/service, or whatever you want to call it, will check the bus for new messages and retrieves them. This generates a “<strong><em>waiting game</em></strong>”, that’s why it’s called an asynchronous process. <strong>It’s not designed to be fast, but to be reliable </strong>and to connect multiple services into one giant message box.</p>
<p><strong>Example:</strong></p>
<p>A highway. A highway in USA connects multiple states together, and you can choose where to leave it. You can choose a city in a certain state, or a totally different city in another state, it just depends where you’re going to. This is the same. The service bus it’s like that highway. A publisher publishes a car. Each message (car) has a topic (destination), and every subscriber (city/state) retrieves a message (car) depending on their topic (destination).</p>
<p>This is the main reason that latency doesn’t apply here. It’s a very robust and clean way of integrating services with applications, <strong>but latency isn’t a concern</strong> here<strong>. It’s just not made to be fast. It’s made to be simple.</strong></p>
<p><strong>Conclusions and summary <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-conclusions">next post</a>!</strong></p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven/">Latency test between Azure and On-Premises – Part Seven</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Part Six</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:35:22 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=714</guid>

					<description><![CDATA[<p>In this test, we’ll be using Function Apps and Logic Apps. Function Apps are a serverless concept of running custom code in Azure. Serverless is capable of scaling when needed. We deployed this C# function that represents the Client Application (but without GUI). &#160; This function calls our  REST Web Service (On-Premises) via Point-to-Site VPN [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six/">Latency test between Azure and On-Premises – Part Six</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this test, we’ll be using Function Apps and Logic Apps. Function Apps are a <strong>serverless</strong> concept of running custom code in Azure. Serverless is capable of <strong>scaling when needed</strong>. We deployed this <em>C# </em>function that represents the Client Application (but without GUI).</p>
<p><img decoding="async" class="aligncenter size-full wp-image-734" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/net-1.png" alt="" width="599" height="367" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-1.png 599w, https://blogit.create.pt/wp-content/uploads/2017/11/net-1-300x184.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>&nbsp;</p>
<p>This function calls our  REST Web Service (On-Premises) via Point-to-Site VPN connection to Azure. This can be called on-demand via URL, via Run button on the image, or via Logic Apps.</p>
<p><strong>Important note:<br />
In this scenario, the client makes <u>one single HTTP request</u>, instead of 10 requests as previous scenarios.</strong></p>
<p><span id="more-714"></span></p>
<p><img decoding="async" class="aligncenter size-full wp-image-744" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/net-2.png" alt="" width="640" height="394" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-2.png 640w, https://blogit.create.pt/wp-content/uploads/2017/11/net-2-300x185.png 300w, https://blogit.create.pt/wp-content/uploads/2017/11/net-2-356x220.png 356w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>&nbsp;</p>
<p>This is a Logic App (Designer View). We start by a Recurrence Action, which is a timer set to run each 30 second. When recurrence action is fired, this logic app starts by calling “HttpTriggerCSharp1”, which is the function app showed previously. When this function app is finished, the logic app sends an e-mail to my Create account reporting total execution time.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-754" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/net-3.png" alt="" width="622" height="268" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-3.png 622w, https://blogit.create.pt/wp-content/uploads/2017/11/net-3-300x129.png 300w" sizes="(max-width: 622px) 100vw, 622px" /></p>
<p>Finally, this is the e-mail that is sent by our logic app. We can see that total execution time reported by the function app is 63ms. Read on for full results!</p>
<p style="text-align: center"><strong>Test #6 10kb message</strong></p>
<p>Called by a Logic App trigger, the client makes a HTTP request to our On-Prem Service, receiving a 10kb message, the same as before.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-764" src="http://blogit-create.com/wp-content/uploads/2017/11/net-4.png" alt="" width="584" height="295" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-4.png 584w, https://blogit.create.pt/wp-content/uploads/2017/11/net-4-300x152.png 300w" sizes="(max-width: 584px) 100vw, 584px" /></p>
<p>&nbsp;</p>
<p>We can see that total execution time was 59ms. This is measured by calling the function app via Run button. We’ll be doing this due to being easier to obtain results. This same result is reported by mail if the function is called by Logic Apps. Execution time oscillated between 47ms and 70ms, being the median value ~59ms. Not bad, and slightly faster than TeamViewer VPN, but slower than direct HTTP request without VPN.</p>
<p>Regarding this same result and comparing it to Site-to-Site VPN, we can see that this method took more ~15ms to execute. This can have a very important influence if you are choosing between PTS and Site-to-Site for your business. Also, <strong>Site-to-Site has a more constant flow</strong>, while this test <strong>was more irregular</strong> (had more peaks).</p>
<p><strong>Rest assured that this method works, if you can trade a slight latency increase over cost.</strong></p>
<p style="text-align: center"><strong>Test #6 100kb message</strong></p>
<p>Now for 100kb message, we’ll repeat the same steps to obtain the results.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-774" src="http://blogit-create.com/wp-content/uploads/2017/11/net-5.png" alt="" width="599" height="300" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-5.png 599w, https://blogit.create.pt/wp-content/uploads/2017/11/net-5-300x150.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>&nbsp;</p>
<p>As we can verify, the test took 78ms to execute. It peaked 97ms and drops to 68ms. Overall, it took <strong>more ~8ms to execute than Site-to-Site but was ~22ms faster than TeamViewer</strong>. Regarding direct HTTP request without any VPN, <strong>this was slower ~17ms</strong>. That’s quite a punch there. Let’s try 5Mb.</p>
<p style="text-align: center"><strong>Test#6 5mb message</strong></p>
<p>Now to the ultimate 5MB test. No more words needed here.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-784" src="http://blogit-create.com/wp-content/uploads/2017/11/net-6.png" alt="" width="603" height="296" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-6.png 603w, https://blogit.create.pt/wp-content/uploads/2017/11/net-6-300x147.png 300w, https://blogit.create.pt/wp-content/uploads/2017/11/net-6-324x160.png 324w, https://blogit.create.pt/wp-content/uploads/2017/11/net-6-533x261.png 533w" sizes="(max-width: 603px) 100vw, 603px" /></p>
<p>&nbsp;</p>
<p>We can see that this is a deal breaker here. The latency here is way over any other test we did. <strong>3.8s</strong>! This may happen due to several reasons, the main ones being:</p>
<ol>
<li>Function App performance not meeting our requirements,</li>
<li>The way that Azure connects PTS VPN to Function Apps,</li>
<li>Consuming a large data might be doing some memory swaps server-side.</li>
</ol>
<p style="text-align: center"><strong>Overall test discussion</strong></p>
<p>Well, this is very surprising. Function Apps is clearly <strong>not the way for a large message.</strong> The processing is inefficient, therefore takes way too much time. <strong>PTS connection to a VM in Azure was faster by more than one second, and surprisingly cheaper</strong>!</p>
<p>This solution may still be in Preview, or may have bugs, or maybe it just <strong>wasn’t made for this type of usage</strong>. Regarding complexity, is clearly <strong>simpler to use than a VM</strong>, <strong>it’s serverless and scalable</strong>. You can get rid of VM and make your functions directly accessible via any web browser on any platform.</p>
<p>For exposing <strong>your logic in a cleaner, faster way, this is what you need</strong>. For data crunching or analytics, it’s also the cleanest way, but if <strong>you’re planning to use it to make HTTP requests to your on-prem services, you should consider other options, unless execution time isn’t on the equation.</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-794" src="http://blogit-create.com/wp-content/uploads/2017/11/net-7.png" alt="" width="385" height="387" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net-7.png 385w, https://blogit.create.pt/wp-content/uploads/2017/11/net-7-150x150.png 150w, https://blogit.create.pt/wp-content/uploads/2017/11/net-7-298x300.png 298w" sizes="(max-width: 385px) 100vw, 385px" /></p>
<p><strong>Read the next post <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-seven">here</a> about relays and service bus!</strong></p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six/">Latency test between Azure and On-Premises – Part Six</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Part Five</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:30:45 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=634</guid>

					<description><![CDATA[<p>Point-to-site. PTS for now on. PTS is a way of connecting single clients (machines) to a gateway in Azure, without connecting the entire infrastructure to it. In this case, you only need a client computer, instead of an enterprise router. The client machine connects directly to Azure via VPN. &#160; Will this be faster that [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five/">Latency test between Azure and On-Premises – Part Five</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Point-to-site. PTS for now on. PTS is a way of connecting <strong>single</strong> clients (machines) to a gateway in Azure, <strong>without</strong> connecting the entire infrastructure to it. In this case, you only need a client computer, instead of an enterprise router. The client machine connects directly to Azure via <strong>VPN</strong>.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-654" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen7.png" alt="" width="624" height="392" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen7.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/screen7-300x188.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>&nbsp;</p>
<p>Will this be faster that Azure Site-to-Site?</p>
<p><span id="more-634"></span></p>
<p style="text-align: center"><strong>Test #5 10kb message</strong></p>
<p>10Kb is our base message. PTS didn’t show any issues regarding this one.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-664" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen8.png" alt="" width="624" height="350" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen8.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/screen8-300x168.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>Execution time is practically the same as before (on Site-to-Site scenario), with the same message size. <strong>1%</strong> is not noticeable on a large batch execution. Let’s see for 100KB. If results change more drastically, then we can analyze and find a reason for this.</p>
<p style="text-align: center"><strong>Test #5 100kb message</strong></p>
<p>We didn’t see a big difference before. Will 100kb be the game changer?</p>
<p><img decoding="async" class="aligncenter size-full wp-image-674" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen8-1.png" alt="" width="624" height="339" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen8-1.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/screen8-1-300x163.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>Actually, it is! It’s ~10ms faster than before! Site-to-Site is beginning to lose to PTS.</p>
<p><strong>Probable causes are:</strong></p>
<ol>
<li>Router delays due to packet queues (Site-to-Site)</li>
<li>Router processing power limitations of encrypting packets (and routing them)</li>
<li>General hardware limitations</li>
</ol>
<p><strong> </strong>We start to see some differences now. ~10ms is a noticable improvement. How fast will 5MB be?</p>
<p style="text-align: center"><strong>Test #5 5mb message</strong></p>
<p>The ultimate test on PTS.</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter size-full wp-image-684" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen8-2.png" alt="" width="599" height="321" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen8-2.png 599w, https://blogit.create.pt/wp-content/uploads/2017/11/screen8-2-300x161.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></p>
<p>Well, PTS <strong>it’s not</strong> for large messages. It’s inefficient and takes a lot of time! <strong>You should only use this for a one-time-only scenario</strong>, like accessing a VM or downloading some files from Azure. Processing large messages with PTS is <strong>not</strong> recommended, as execution times increased ~1 second in average.</p>
<p style="text-align: center"><strong> O</strong><strong>verall test discussion</strong></p>
<p>This is an awkward situation. 100KB is faster than Site-to-Site, but 5MB it’s not. While processing small to medium messages you should be fine. <strong>Not recommended for production as it showed to have some unusual peaks, so latency may be compromised.</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-694" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/net.png" alt="" width="624" height="142" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/net.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/net-300x68.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>&nbsp;</p>
<p><strong>Go to <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-six">next test</a>!</strong></p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five/">Latency test between Azure and On-Premises – Part Five</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Latency test between Azure and On-Premises – Part Four</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:25:30 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Hybrid Cloud]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[On-Premises]]></category>
		<category><![CDATA[webservices]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/gustavobrito/?p=554</guid>

					<description><![CDATA[<p>Starting with a real-world application of Azure (it’s used here on Create), this scenario is a direct 24/7 VPN link to a gateway in Azure. This is a business-oriented solution. The whole on-premises network is connected to a whole network of devices in Azure (only the ones associated to this VPN gateway obviously). Consider it [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four/">Latency test between Azure and On-Premises – Part Four</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Starting with a real-world application of Azure (it’s used here on Create), this scenario is a direct 24/7 VPN link to a gateway in Azure. This is a <strong>business-oriented</strong> solution. The whole on-premises network is connected to a whole network of devices in Azure (only the ones associated to this VPN gateway obviously).</p>
<p>Consider it as an <strong>extended</strong> office, with VMs and Azure Functions running outside your premises, as if they were there right next to you! <strong>It’s the future.</strong></p>
<p>We’ll be using the same messages, as well the same service-client logic (Via HTTP GET). Instead of using TeamViewer VPN or exposing our service, <strong>we’ll use a secure VPN connection to a gateway, that has one VM that’s running the client app associated to it.</strong></p>
<p><span id="more-554"></span></p>
<p><img decoding="async" class="aligncenter size-full wp-image-574" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud-1.png" alt="" width="540" height="275" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/cloud-1.png 540w, https://blogit.create.pt/wp-content/uploads/2017/11/cloud-1-300x153.png 300w" sizes="(max-width: 540px) 100vw, 540px" /></p>
<p>&nbsp;</p>
<p>We’ll start by doing 10kb, following 100kb and 5MB. Again, this is the most common scenario nowadays!</p>
<p style="text-align: center"><strong>Test #4 10kb message</strong></p>
<p>Running 10kb of data through Azure VPN Site-to-Site is surely a piece of cake.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-584" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud-2.png" alt="" width="624" height="328" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/cloud-2.png 624w, https://blogit.create.pt/wp-content/uploads/2017/11/cloud-2-300x158.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></p>
<p>It took ~44ms to execute! It’s roughly the same as <strong>263bits through TeamViewer VPN</strong>! Using the same 10kb, this test scenario has a <strong>reduced</strong> execution time of~20ms! Now that’s an improvement. A secure, tight VPN to Azure, site-to-site, with reduced latency! That’s quite a hit in P2P (<em>Peer-to-Peer</em>) VPN connections!</p>
<p style="text-align: center"><strong>Test #4 100kb message</strong></p>
<p>Well, after seeing a ~20ms drop with a 10kb message, will execution times drop with a message that’s <strong>10 times bigger?</strong></p>
<p><img decoding="async" class="aligncenter size-full wp-image-594" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud-3.png" alt="" width="608" height="335" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/cloud-3.png 608w, https://blogit.create.pt/wp-content/uploads/2017/11/cloud-3-300x165.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></p>
<p>&nbsp;</p>
<p>Remember how TeamViewer VPN managed ~100ms on this test? If that’s quick, this is <strong>blazing fast!</strong> Less ~30ms than P2P VPN solution. Azure Site-to-Site connection is proving to be better than TeamViewer, and only ~9ms slower than HTTP without VPN. Let’s go for 5MB.</p>
<p style="text-align: center"><strong>Test #4 5MB message</strong></p>
<p>Let’s go through the ultimate test. Can we saturate the Azure VPN connection with this?</p>
<p><img decoding="async" class="aligncenter size-full wp-image-604" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud-4.png" alt="" width="630" height="335" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/cloud-4.png 630w, https://blogit.create.pt/wp-content/uploads/2017/11/cloud-4-300x160.png 300w" sizes="(max-width: 630px) 100vw, 630px" /></p>
<p>&nbsp;</p>
<p>Well, that’s astonishing. For a message this size, execution time it’s greater by ~150ms only! Guess that’s the price to pay for a secure tunnel. Direct HTTP execution times are smaller, but considering risk over latency, this is a great and optimal candidate.</p>
<p style="text-align: center"><strong>Overall test discussion</strong></p>
<p>Well, this did prove me wrong. Initially, I had the idea that TeamViewers’ P2P VPN connection was born to be faster, but it’s not! Azure Site-to-Site is <strong>faster</strong>, <strong>safer</strong>, <strong>scalable</strong> and <strong>available to multiple devices</strong>, both on Azure and on-premises. Personally, I think this solution is optimal for enterprise integration, as is your business logic needs. For a <strong>fast and secure</strong> connection to Cloud computing, this is an excellent candidate. It has <strong>99.9% uptime</strong>, which is great for 24/7 intensive data crunching or message exchanging.</p>
<p><img decoding="async" class="aligncenter size-full wp-image-614" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud-5.png" alt="" width="214" height="135" /></p>
<p>&nbsp;</p>
<p><strong>Proceed to test #5 <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-five">here</a>!</strong></p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four/">Latency test between Azure and On-Premises – Part Four</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
