Oubound Traffic – AWS vs Azure

To receive inbound traffic, you need a public IP – a no-brainer. The concept of public IP exists in both Azure and AWS. An Azure static public IP is AWS’ elastic IP – a public IP that does not change.

Outbound traffic concept is slightly different and is interesting to understand the concept/terminology differences.
Continue reading


Kubernetes Scheduling

Kubernetes schedules Pods on the worker nodes based on multiple factors. For the most part, you would want to leave Kubernetes alone to do its job. However, there are cases where you would want to have a say on the scheduling. A great didactic scenario is a mix of nodes having SSDs and HDs (spinning disks) and you would want to influence scheduling by making sure I/O hungry Pods go to nodes with SSDs.
Continue reading

Is Azure Cosmos DB Really Expensive?

When you mention Azure Cosmos DB in any architecture/solutioning discussion, a likely question you get is “Isn’t Azure Cosmos DB expensive?”. Like any other thing in this world, the right but not so useful answer is that it depends. First of all, let us understand how Cosmos DB is priced. Cosmos DB is not priced based on the usage. Of course, Cosmos DB is more than a simple NoSQL database but like other NoSQL databases, the price is based on what you reserve. So, the analogy is renting a car rather than hailing a cab – you pay regardless of you used the rented car or not. So, what you reserve with Cosmos is the capacity – what Microsoft calls Request Units (RU) per second. You pay for the RU as well as the space (GB).
Continue reading

Sending Docker Container Logs to Azure Application Insights Using GELF Driver

Docker has a default logging driver, which each container uses. However, you can configure the Docker daemon, or for that matter a Docker container to use a different logging driver. One such driver is Graylog Extended Format logging driver. The Graylog Extended Log Format (GELF) is understood by a number of tools such as Graylog, Logstash, Fluentd, etc. But you can write your own GELF server, which is basically an UDP server. Once you get the GELF message in the UDP server, you can send the message to where you want and for this post, I use Azure Application Insights. Of course, you can create your own Docker logging driver too but I use the GELF driver because it is less work to do! I do not know what the legal/license implications are, in terms of using the GELF driver With Azure Application Insights but the point of this post is to illustrate what is possible.
Continue reading

ASP.NET Core 2.0 Apps on Kubernetes in Google Cloud Platform (Google Kubernetes Engine)

The official instructions for deploying ASP.NET Core app on GKE is available here. So, why this post? If you are like me, you will want to do all the development in Windows using Visual Studio and want to finally deploy the app in the K8s cluster. So, this post shows doing most of the work through Windows command prompt. Of course, some of the manual steps shown here will be part of the CI/CD process in a real project.
Continue reading

ASP.NET Core 2.0 OIDC Authentication Using AWS Cognito

AWS Cognito has two parts: User Pools and Federated Identities. With Cognito User Pools, you can add sign-up and sign-in functionality to your ASP.NET Core 2.0 web apps. Although the blog posts such as this one illustrates the use of AWS SDK, you can use Cognito without SDK. Cognito User Pools allow you to integrate your apps using OpenID Connect (OIDC). This will be handy especially when you want to use Cognito with an app such as a third-party product for which you don’t have the source code to tinker with. Of course, the app must support OIDC and that attributes related to OIDC are configurable. Anyways, the objective of this post is to show Cognito integration with ASP.NET Core 2.0 app and that you have the source code, which you can modfiy to your heart’s content.
Continue reading