NGINX for Service Fabric

Service Fabric is a powerful platform. Besides giving you the raw power of the virtual machine, you get fine grained control on scaling. Worth mentioning is the Actor programming model which is useful in given scenarios.

In this particular scenario I needed to host only 4 AspNetCore applications in a 5-node cluster. Since these applications are self hosted they need to listen for communication on their own port. These are multi-tenant application where tenants are resolved via the host name i.e. from a base domain example.com, you'd have tenants such as:

  • tenant1.example.com

  • tenant2.example.com

  • tenant3.example.com

The same would be done for the other 3 domains: example.info, example.org, example.net

Cleanup AzureAD Applications for Azure Stack

Cleanup AzureAD Applications for Azure Stack

Recently, as I was trying out Azure Stack (which, by the way, looks promising in my sight), I had to repeat installation more than twice. At one time I had to format the whole machine because only 2 of the 11 required roles (Virtual Machines) could startup. Since the original setup had already succeeded, including the ability to send usage information to Azure using Azure Stack Bridge, there were two things I needed to clean up before a fresh setup; the Azure AD service principals and the Azure Bridge connection.

High speed search millions of phone numbers

High speed search millions of phone numbers

A couple of days after the post, I was presented with millions of records having such numbers. The requirement being able to search through these numbers to get the records and get just one of them. As would other persons in my profession, I uploaded the data into a database on my local machine. I chose MS-SQL and used the SQL Server Management Studio (SMSS). Discussion on the choice of tool deserves a post on its own. The original file format was flat (see flat file format) occupying a little less than 4 GB but when loaded into the database it doubled and there my worries began.

Phone Number input validation in Kenya

Phone Number input validation in Kenya

Many times, I have seen developers write code for validating entries and they write very many if blocks or worse combine them with numerous switch cases. This approach would not have a problem but then more times than not, they need to be updated in certain periods when something new arises or for certain edge scenarios not originally considered.

Changing Azure WebApp AppSetting in VSTS

During an application development cycle, we almost always begin by testing locally. Several times, it works locally but not after deployment. But we also do not like deploying directly to the production environment. To solve this, it is common practice to have a Staging environment that works in between.

In Microsoft's Azure App Service, an App can have several slots from the Standard ties and above (as at the time of writing). I commonly use this feature to implement a Staging slot.

The essence of the Staging slot is to check if everything is okay before making the app version currently running in the staging slot visible in production. Due to this requirement, it is sometimes necessary to have two different sets of resources associated with the app.