<?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>azure Archives - Blog IT</title>
	<atom:link href="https://blogit.create.pt/tag/azure/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/tag/azure/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Fri, 28 Jun 2024 13:30:49 +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>Configuring Azure Application Insights on a .NET 6 API</title>
		<link>https://blogit.create.pt/andrepires/2024/05/27/configuring-azure-application-insights-on-a-net-6-api/</link>
					<comments>https://blogit.create.pt/andrepires/2024/05/27/configuring-azure-application-insights-on-a-net-6-api/#respond</comments>
		
		<dc:creator><![CDATA[André Pires]]></dc:creator>
		<pubDate>Mon, 27 May 2024 08:21:04 +0000</pubDate>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[azure]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=13492</guid>

					<description><![CDATA[<p>In this blog post we are going to be showing you can configure Azure Application Insights to send your logs, exceptions and performance metrics from a .NET 6 API. InstallationStart by installing the Microsoft.ApplicationInsights.AspNetCore nugget package. Now in your startup class you will need to configure some options for the telemetry collection.You can use the [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/andrepires/2024/05/27/configuring-azure-application-insights-on-a-net-6-api/">Configuring Azure Application Insights on a .NET 6 API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p></p>



<p>In this blog post we are going to be showing you can configure Azure Application Insights to send your logs, exceptions and performance metrics from a .NET 6 API.<br><br><strong>Installation</strong><br>Start by installing the <em>Microsoft.ApplicationInsights.AspNetCore</em> nugget package.<br><br>Now in your startup class you will need to configure some options for the telemetry collection.<br>You can use the <em>AddApplicationInsightsTelemetry </em>extension method on the <em>IServiceCollection </em>and pass your options as so:<br></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: csharp; title: ; notranslate">
public class Startup
{
    public virtual void ConfigureServices(IServiceCollection services)
    {
        services.AddApplicationInsightsTelemetry(GetApplicationInsightsServiceOptions());    
    }

    private static ApplicationInsightsServiceOptions GetApplicationInsightsServiceOptions()
    {
        return new ApplicationInsightsServiceOptions
        {
            AddAutoCollectedMetricExtractor = false,
            EnableEventCounterCollectionModule = false,
            EnableDiagnosticsTelemetryModule = false,
            EnablePerformanceCounterCollectionModule = true,
            EnableDependencyTrackingTelemetryModule = true,
            EnableRequestTrackingTelemetryModule = false,
            ConnectionString = Configuration&#x5B;ConfigurationConstants.ApplicationInsightsConnectionString],
        };
    }
}
</pre></div>


<p>This is where we define the types of telemetry we want to collect.<br>The documention of the options are here: <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#use-applicationinsightsserviceoptions">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#use-applicationinsightsserviceoptions</a><br>We are also getting the connection string of the application insights resource from our appsettings.</p>



<p><strong>Telemetry modules</strong><br>Now if we want to go further, we can even specify what metrics to collect for each module.<br>For instance, let&#8217;s say we want to indicate which performance metrics to collect. Then you can do the following:<br></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: csharp; title: ; notranslate">
        services.ConfigureTelemetryModule&lt;PerformanceCollectorModule&gt;((module, applicationInsightsServiceOptions) =&gt;
        {
            module.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@&quot;\Process(??APP_WIN32_PROC??)\Private Bytes&quot;, @&quot;\Process(??APP_WIN32_PROC??)\Private Bytes&quot;));
            module.DefaultCounters.Add(new PerformanceCounterCollectionRequest(@&quot;\Process(??APP_WIN32_PROC??)\% Processor Time&quot;, @&quot;\Process(??APP_WIN32_PROC??)\% Processor Time&quot;));
        });
</pre></div>


<p>You can view the documentation on configuring telemetry modules here: <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#configure-or-remove-default-telemetrymodules">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#configure-or-remove-default-telemetrymodules</a><br><br><strong>Extensibility</strong><br>To add or remove properties from collected telemetry (before it gets sent to Azure) you can create classes that implement the <em>ITelemetryInitializer </em>class from the Azure Application Insights SDK (<a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#add-telemetryinitializers">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#add-telemetryinitializers</a>).<br><br>A classic example for a telemetry initializer is a correlation id initializer. You would get a correlation id from your http request and pass it to all telemetry so that you can have a nice trace of everything that went through your system:<br></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: csharp; title: ; notranslate">
public class CorrelationIdInitializer : ITelemetryInitializer
{
    private readonly IHttpContextAccessor _httpContextAccessor;
    private const string CorrelationIdProperty = &quot;CorrelationId&quot;;

    public CorrelationIdInitializer(IHttpContextAccessor httpContextAccessor)
    {
        _httpContextAccessor = httpContextAccessor;
    }

    public void Initialize(ITelemetry telemetry)
    {
        ISupportProperties telemetryProperties = (ISupportProperties)telemetry;

        // This is just an extension method where you would extract the correlation id from the request headers according to your header name.
        string correlationId = _httpContextAccessor.HttpContext.GetCorrelationId();

        if (!string.IsNullOrWhiteSpace(correlationId) &amp;&amp; !telemetryProperties.Properties.ContainsKey(CorrelationIdProperty))
        {
            telemetryProperties.Properties.Add(CorrelationIdProperty, correlationId);
        }
    }
</pre></div>


<p>To register the telemetry initializer, simply register the class and its respective interface (always ITelemetryInitializer) on your service collection: <em>services.AddSingleton&lt;ITelemetryInitializer, CorrelationIdInitializer&gt;();</em></p>



<p><strong>Filtering</strong><br>Additionally, you also have the ability to filter out telemetry from being collected. This is a great feature that allows you to focus only storing what you really care about and will save you a LOT of costs.<br>Do keep in mind that filtering out telemetry does mean that you won&#8217;t be able to query it and therefore can make your tracing a bit difficult.<br>This is all related to telemetry processors (<a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#add-telemetry-processors">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#add-telemetry-processors</a>).<br><br>Imagine you have thousands of fast dependencies (see the list of automatically tracked dependencies <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies#automatically-tracked-dependencies">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-dependencies#automatically-tracked-dependencies</a>) that are being stored by your system but you come to a conclusion that they only make it hard to monitor your system and you don&#8217;t really need them.<br>Filtering them out is the way to go OR you could consider sampling instead <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#sampling">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#sampling</a>.<br>Lets create a processor that filters out successful dependencies that had a duration under 500 milliseconds:<br></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: csharp; title: ; notranslate">
public class FastDependencyProcessor : ITelemetryProcessor
{
    private ITelemetryProcessor Next { get; set; }

    public FastDependencyProcessor(ITelemetryProcessor next)
    {
        Next = next;
    }

    public void Process(ITelemetry item)
    {
        if (!ShouldFilterTelemetry(item))
        {
            Next.Process(item);
        }
    }

    public bool ShouldFilterTelemetry(ITelemetry item)
    {
        bool shouldFilterTelemetry = false;

        DependencyTelemetry dependency = item as DependencyTelemetry;

        if (dependency != null
            &amp;&amp; dependency.Duration.TotalMilliseconds &lt; 500
            &amp;&amp; dependency.Success.HasValue &amp;&amp; dependency.Success.Value)
        {
            shouldFilterTelemetry = true;
        }

        return shouldFilterTelemetry;
    }
}
</pre></div>


<p>After creating the class, you have to register the telemetry processor as part of your service collection like so:<br><em>services.AddApplicationInsightsTelemetryProcessor&lt;FastDependencyProcessor</em>&gt;<em>();</em><br><br>Keep in mind that if your telemetry processors will be executed in the order in which you&#8217;ve called them in your register process.<br><br><strong>Final notes</strong><br><br>&#8211; Azure Application Insights is a great tool that gives you visibility on how your application is doing.<br>You can use the SDK to collect most telemetry automatically or you could even instrument specific scenarios manually by making use of the <em>TelemetryClient</em> instance (<a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#how-can-i-track-telemetry-thats-not-automatically-collected">https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew#how-can-i-track-telemetry-thats-not-automatically-collected</a>).<br>&#8211; It is important to monitor your costs as it is easy to end up storing everything and not only what you need. So start by defining what you need to collect and what metrics will be relevant for you.<br>Then you can filter out the irrelevant data and from there on you could even create alerts from the data you collect, using Azure Monitor.<br>If you are trying out Application Insights on a test environment, you can even set a daily cap of X GB so that you control your spending. Simply navigate to the Azure Application Insights resource through the Azure Portal and click &#8220;Usage and estimated Costs&#8221; on the sidebar:<br></p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" width="248" height="229" src="https://blogit.create.pt/wp-content/uploads/2024/05/image.png" alt="" class="wp-image-13493" style="width:238px;height:auto" /></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="638" height="40" src="https://blogit.create.pt/wp-content/uploads/2024/05/image-1.png" alt="" class="wp-image-13494" srcset="https://blogit.create.pt/wp-content/uploads/2024/05/image-1.png 638w, https://blogit.create.pt/wp-content/uploads/2024/05/image-1-300x19.png 300w" sizes="(max-width: 638px) 100vw, 638px" /></figure>



<p><br>&#8211; From what I&#8217;ve seen so far, the collection of dependencies/exceptions can represent the majority of costs as you may have a lot of dependencies flowing through your system and because exceptions are a type of telemetry that occupies a lot of space. Filtering out irrelevant dependencies will definitely help.<br>As for exceptions, you may consider using the Result pattern instead of using exceptions for the normal control flow of your code. This also has the advantage of decreasing the impact on performance lead by exceptions to your application since you reduce the amount of exceptions thrown.</p>
<p>The post <a href="https://blogit.create.pt/andrepires/2024/05/27/configuring-azure-application-insights-on-a-net-6-api/">Configuring Azure Application Insights on a .NET 6 API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/andrepires/2024/05/27/configuring-azure-application-insights-on-a-net-6-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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 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>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>
		<item>
		<title>Latency test between Azure and On-Premises – Part Three</title>
		<link>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-three/</link>
					<comments>https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-three/#respond</comments>
		
		<dc:creator><![CDATA[Gustavo Brito]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 17:20:12 +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=474</guid>

					<description><![CDATA[<p>This scenario is based by direct HTTP connection via exposed web service, accessible without VPN. This can be a very common situation nowadays too, as it’s just like a website or a web API, and it’s cheap! VPN connections can be the main cause of delays between two points. A secure tunnel brings delay into [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-three/">Latency test between Azure and On-Premises – Part Three</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This scenario is based by direct HTTP connection via exposed web service, accessible without VPN. This can be a very common situation nowadays too, as it’s just like a website or a web API, and it’s cheap! VPN connections can be the main cause of delays between two points. A secure tunnel brings delay into the equation by itself.</p>
<p>We’ll be exposing the REST Service (on-premises), and connecting the client application via HTTP (Azure), transmitting the same messages as previous tests.</p>
<p><span id="more-474"></span></p>
<p>Starting at 10kb, then 100kb and 5Mb. 10kb, only a fifth (1/5) of an average HTML file. For instance, Google main page size is 392.8 kB in total.</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter size-full wp-image-494" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen6.png" alt="" width="623" height="300" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen6.png 623w, https://blogit.create.pt/wp-content/uploads/2017/11/screen6-300x144.png 300w" sizes="(max-width: 623px) 100vw, 623px" /></p>
<p>&nbsp;</p>
<p><strong>Exposed services</strong>. The hackers’ paradise and snoopers’ ocean. A security risk for sure. VPN protects you from all that. It’s a secure tunnel to anywhere.</p>
<p>&nbsp;</p>
<p style="text-align: center"><strong>Test #3 10kb message</strong></p>
<p>After changing port forwarding configurations in our on-prem router, we’re able to expose our REST web service, listening on port 65443 (a random port was chosen). This will be for testing purposes only and will be removed immediately after all testing’s done (for security reasons).</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter size-full wp-image-504" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen6-1.png" alt="" width="606" height="327" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen6-1.png 606w, https://blogit.create.pt/wp-content/uploads/2017/11/screen6-1-300x162.png 300w" sizes="(max-width: 606px) 100vw, 606px" /></p>
<p>&nbsp;</p>
<p>Results are in! It took almost the same time as before (with TeamViewer VPN)! This is amazing, because the VPN we used added no delay whatsoever, at least for this message size! Execution times peaked at ~55ms.</p>
<p style="text-align: center"><strong>Test #3 100kb message</strong></p>
<p>Now for 100kb of text. Will HTTP be faster than HTTP over VPN?</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter size-full wp-image-514" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen6-2.png" alt="" width="647" height="334" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen6-2.png 647w, https://blogit.create.pt/wp-content/uploads/2017/11/screen6-2-300x155.png 300w" sizes="(max-width: 647px) 100vw, 647px" /></p>
<p>&nbsp;</p>
<p>WOW! Less ~40ms each! TeamViewer VPN is losing ground now! This took ~60ms each for 100kb of data. This is almost half the time that VPN took! How about 5MB of data?</p>
<p style="text-align: center"><strong>Test #3 5MB message</strong></p>
<p>The ultimate 5MB of text over HTTP. No explaining needed here… Image speaks by itself.</p>
<p>&nbsp;</p>
<p><img decoding="async" class="aligncenter size-full wp-image-524" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/screen6-3.png" alt="" width="638" height="330" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/screen6-3.png 638w, https://blogit.create.pt/wp-content/uploads/2017/11/screen6-3-300x155.png 300w" sizes="(max-width: 638px) 100vw, 638px" /></p>
<p>&nbsp;</p>
<p>Wait, didn’t TeamViewer VPN take ~1600ms each to execute? This is very surprising, as we start to notice serious delay due to VPN! ~1.2 seconds each is what HTTP takes to execute a request and a 5MB response. If you do the math, for each 10 messages, you save ~4 seconds! That’s a lot!</p>
<p style="text-align: center"><strong> </strong><strong>Overall test discussion</strong></p>
<p>Well this is a no brainer. TeamViewer VPN didn’t stand a chance here. For 10kb of data, the results are nearly the same. Neither VPN or HTTP (no VPN) struggled with 10kb, but 100kb and 5MB came with a lot of differences. No VPN proved to be faster in larger messages, but VPN provides a safer, encrypted transmission. I call this your decision: Speed over Security. Exposed services are a serious risk, but VPN is a bit slower. In execution time, HTTP without VPN is clearly a winner here.</p>
<p><img decoding="async" class="size-full wp-image-534 aligncenter" src="http://blogit.create.pt/gustavobrito/wp-content/uploads/sites/274/2017/11/cloud.png" alt="" width="162" height="123" srcset="https://blogit.create.pt/wp-content/uploads/2017/11/cloud.png 162w, https://blogit.create.pt/wp-content/uploads/2017/11/cloud-80x60.png 80w" sizes="(max-width: 162px) 100vw, 162px" /></p>
<p><strong> Test#4 on the <a href="http://blogit.create.pt/gustavobrito/2017/11/27/latency-test-between-azure-and-on-premises-part-four">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-three/">Latency test between Azure and On-Premises – Part Three</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-three/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
