Choosing an Azure datacenter for your service

When building a web-based service that will be used by people all around the world you also have to think about network latencies that are imposed by geographical distances. Your service itself may be very fast, but it won't matter if users on the other side of the globe will experience it with a delay of 1 second.

With Microsoft Azure, the cloud provider that we also use for all of our own services, you can choose from datacenters at different locations to run your service, thus optimizing network distance for your target audience. That is, of course, if you only want to run your service in just one datacenter and not in multiple ones to be able to reach more geographical regions on fast lines. We'll deal with the one-datacenter case in this blog post, since running a web-based service in multiple locations is neither technically simple, neither cheap, but optimizing the user experience for the intended target audience is something even the smallest applications are ought to do. So let's see how we can decide which datacenter to choose!

The methodology described here is the same we used to decide where to deploy our Orchard SaaS, DotNest.

Where are my users located?

First, you have to determine where your (inteded) target audience is mostly located, since foremost you want users of your target audience to have the best user experience.

If your service is already running in some form, or you know that your target audience is the same as one of your other service's than you can consult your web analytics to get some exact anwers. This is of course not available if your service is totally new and you don't yet have experience of this sort; then it depends on your business plan to make a guess that's sufficiently educated.

For DotNest we decided that our primary audience is in West Europe and North America. This acutally is quite lucky match: since there are a lot of high-speed network cables laid out under the Atlantic Ocean between the two continents (as you can see from e.g. this slightly out-of-date picture) it's actually possible to find a location that will be able to serve both sides of the big pond equally well.

Gathering the tools

OK, now we know where our users are located. But how are we going to determine which datacenter is best suited for them? We'll make some measurements!

Firstly we need to set up endpoints in all of the datacenters so we can use them to measure latency. For this we'll use Azure Web Sites: we won't deploy anything to the websites, the default page that a blank website returns will be enough, since we don't want to measure server performance but only network latency as much as possible. The websites will be just free ones, as the performance of a blank website, in our experience, doesn't differ from or vary significantly more than one on a paid tier, so it doesn't affect latency measurements.

At the time when our measurements were made less datacenters were available on Azure, so we've only made test websites for those DCs, namely the following:

You can use these endpoints for your own tests if you wish of course.

Since websites can go idle, especially the ones on the free tier, it's best if you warm them up by opening them before making any measurements.

Seondly we also need some tool to measure latency of the various endpoints from different locations. For this we've used Alertra's Spot Check tool (see the textbox on the top of the page) that can measure response times from a variety of locations. (Another interesting tool to check the latency from your current locations to all Azure datacenters is Azure Speed Test.)

Evaluating the results

So we've set up all the test sites and have the right tool to measure response times. The next step is get the numbers clear and see which location performs best.

For this purpose we've created a simple spreadsheet that you can use to evaluate the results. As you cen see we've made measurements to all of the websites with Alertra's tool and put them into a table. Then we calculated the average repsonse times for our intended target audience's locations, namely London, Chicago, Los Angeles and Washington DC in the P column. By simply changing the function that calculates the values in that row you can see the numbers for your target audience too.

As one can see from the spreadsheet East US came out as the winner with North Central US being a close second. East US was faster than North Central US in the majority of cases and also a bit faster on average too.

While the proportion of these numbers may be accurate, take the concrete values with a grain of salt. In our experience the actual response times are much better than the ones measured by Alertra's tool. For example from Hungary, where we're located, we can get a response from DotNest within 150ms at worst for cached pages, what is much faster even than what Alertra's tool measured from London (about 500ms)

For DotNest we've gone with the East US datacenter, and so far it seems like a good decision. We've got numerous feedbacks form our users that the service is very fast.

So where are you going to put your application?

zoltan.lehoczky Azure Latency

Other recent posts

Municipal government permit management run on Orchard Core - GovTech company case study

Governments use Orchard Core too! Even in this blog, we've seen how Lombiq worked with the municipal government of Santa Monica and with the Smithsonian Folkways Recordings, which is an agency of the US federal government. But did you know that apart from flashy websites, Orchard can also provide important services for citizens behind the scenes? The multi-tenant case management platform of a GovTech company we worked with does exactly that: If you live in a US city, you may have dealt with your permit or other license via the platform! And as you may have guessed, we're working with the company as Orchard Core experts.We've been helping the company since late 2022 with a variety of Orchard Core consulting, troubleshooting, and development tasks. This started with a general review of the GovTech app, and how it's hosted in Azure, to find areas of improvement or potential issues. Since Lombiq has run Orchard, then Orchard Core projects, and hosted apps in Azure for a decade now, we can always pinpoint things we recommend changing.They also asked us to deliver some specific development tasks that improve the UX of the permit management platform or help the development team. Here's a quick overview of some of these: Setting up automated QA tools. For these, we utilized our Orchard Core-optimized projects: Lombiq UI Testing Toolbox for automated UI testing, Lombiq .NET Analyzers for checking the code for any possible issues, and Lombiq GitHub Actions to provide full-featured CI builds and Azure deployments. These all help keep the platform working well, improving the development team's productivity. A WYSIWYG editor for the Orchard Core admin area, utilizing the user-friendly Froala editor. Users of the platform weren't fully satisfied with Orchard's built-in editor, so this was a welcome improvement. Chunked file uploads: Hosting environments commonly have some restrictions on the size of an HTTP request. So, if you want to allow users to upload larger files, the app needs to upload them in multiple chunks (parts). This was important for them since files related to permit management can routinely grow beyond the usual size limits. So, we've implemented chunked file uploads both in the platform and as a contribution to Orchard Core. Since we at Lombiq are really focused on open-source, it's always great to work with clients who understand how the open-source ecosystem works and that you also have to contribute back. This is what their CTO & Co-founder says about us working together:Lombiq excels in SaaS technology development, particularly in the context of Orchard Core. Their distinctive expertise and capabilities enabled us to expedite the expansion of our platform. They were consistently responsive, delivered high-quality code, smoothly transitioned each project to our development team, and assumed full responsibility for their tasks. I highly recommend collaborating with them for any SaaS related project.Do you also work with government clients and want to make sure your Orchard Core app runs smoothly? Get in touch with us and let the Orchard Core experts help you!

Modernization and Orchard Core Migration of hastlayer.com

With a strong background in migrating websites to Orchard Core, we embarked on a journey to revamp hastlayer.com, the home of our cutting-edge .NET hardware acceleration project Hastlayer. This transformation was not merely a migration from the older Orchard 1 CMS; it was an opportunity to embrace Orchard Core's superior performance, modularity, and development experience. However, this migration was more than just a technical upgrade. It was a chance to refresh our website's appearance and align it with contemporary design trends. Hastlayer’s website was due for a facelift, its design needed a modern touch to resonate with current web aesthetics. Leveraging our expertise and experience, we utilized several of our own open-source projects developed over the years. Key Orchard Core modules such as Lombiq Privacy and Lombiq Helpful Extensions, along with utilities like Lombiq NodeJs Extensions, played a pivotal role. The Lombiq Base Theme as well as the theme of our company website served as the foundation for our theme, providing a robust starting point for customization. A distinctive aspect of this project was the creative process of reimagining hastlayer.com. Unlike client projects where we respond to external requirements and feedback, this was an internal endeavor. Collaborative brainstorming sessions shaped the vision and identity we wanted to communicate to our audience. We aimed to maintain a visual coherence with lombiq.com’s design, simultaneously, we aspired to inject a sense of uniqueness and distinction into hastlayer.com. To maintain simplicity, we reused numerous design elements and built upon them. Aligning the team's diverse perspectives required several iterations, but it ultimately led to a cohesive design that represented Hastlayer's ethos. The result is a revamped site that we are immensely proud of. It reflects our identity and the services we provide. We invite you to explore the new hastlayer.com and experience the innovation that defines us. As we revel in the success of this project, we look forward to future opportunities to renew and refine our digital footprint. Stay tuned for more exciting updates from Hastlayer, and more Orchard Core migration projects!

Git-hg Mirror is running on Orchard Core

Git-hg Mirror is a site of our own, that was previously built on Orchard 1 and was migrated to Orchard Core. The site is a simple-to-use (at least this is the intention) web application to automatically keep a Git and a Mercurial repository or two Mercurial or two Git repositories in sync. This allows you to create mirrors of repositories in the other version control system. The site’s FAQ page provides more information about the site’s purpose and functionality. This case study delves into the intricate journey of transforming Git-hg Mirror from its original Orchard 1 roots to the contemporary Orchard Core, highlighting the technical challenges and solutions that made this transition possible. Migrating a site from Orchard 1 to Orchard Core is beneficial because it allows you to take advantage of the latest features, improved performance and a more modern architecture, ensuring your website remains up-to-date and competitive in the ever-evolving digital landscape. As usual, we leveraged many of our own open-source modules that we've built and refined over time, such as Lombiq Helpful Extensions, utility modules like Lombiq NodeJs Extensions, Lombiq Base Theme as a base for the themes, Lombiq Hosting Tenants for tenant management, and Lombiq Helpful Libraries, as the name suggests, for generally useful libraries. The migration needed some work with User accounts (mainly a converter from Orchard 1 to Orchard Core and depersonalization maintenance, which is responsible for replacing the registered user's sensitive data like email address, the repository URLs or access tokens with randomly generated data for privacy reasons) thus this resulted in new additions to our open-source modules. Feel free to check these out, the User converter is now part of the Orchard 1 Recipe Migration feature and the depersonalization maintenance is included in the Lombiq Hosting Tenants project. Because of the user account migrations, the previously registered users will just have to reset their password the first time they try to log in, but they will get a notification about it and once they have done it, they will be good to go, nothing else has changed. We are happy with the results and the additions to our open-source modules and stay tuned, as we keep the migrations rolling.

Lombiq’s Journey with WTW’s Client Portal

WTW is a multinational company that provides businesses with various services such as insurance brokerage, risk management, and human resources consulting to help them manage risks and optimize their operations. Recently we had the opportunity to implement a specialized Orchard Core-based Client Portal for them. This portal, targeted towards insurance companies, was intended to be a replacement for an old portal used to download on-premises software & license keys, raise support tickets, and read knowledge base articles. WTW chose us to be partners on this project because we are large contributors to the open-source community, and found us to be knowledgeable and experienced based on our previous work. Our flexibility during the initial conversations was also a huge factor in their decision. With this opportunity, we got the chance to improve our experience in developing a user-friendly portal with a modern front-end framework and how it can be integrated into Orchard Core’s content management capabilities. The Client Portal, which was designed to be used by the customers, is just one crucial component of an overarching system architecture. The rest of the systems were responsible for managing software and license keys by administrator users. WTW specifically chose Orchard Core for this portal because of its robust content management capabilities. Content manager users now create announcements, external training materials, manage the product and services catalog, and arrange different widgets throughout the webpages using the Admin UI. Other components on the platform pull in information like product download links or license keys from other parts of the WTW system using web APIs. Given that it's a customer-facing portal, user experience was a priority. While it’s always a good idea to rely on Orchard Core’s display management the only way to use that is with page reloads during navigation between pages or filtering. Paginations are filters on the pages that should always be asynchronous, so we had to come up with a solution that uses modern front-end technology along with Orchard Core’s great features. During the course of this project, we’ve developed an open-source Vue.js module for Orchard Core to make user interactions smoother while still maintaining the built-in display management capabilities, such as widget and menu functionality. For quality code and maintainability, we utilized Lombiq's .NET Analyzers, Gulp Extensions, Helpful Libraries, Helpful Extensions, and NPM MSBuild Targets. Stability was critical, so we implemented several UI tests using the UI Testing Toolbox, ensuring they were executed before introducing a new feature using our reusable GitHub Actions. It was an exciting project and we delivered it on time. While the final steps on the rest of the architecture are being completed the whole portal is gradually being rolled out to users during the summer of 2023. If you're thinking about integrating a powerful CMS like Orchard Core into your architecture, we're here to help. We can either do the work for you or guide you through it in our consulting calls, just get in touch with us!