Skip to main content

Posts

[IoT Home Project] Part 9 - Extending Azure Function to support Thieves Alarm

Recent posts

[IoT Home Project] Part 8 - Connecting to Azure Function and to a virtual heat pump

In this post we will discover how to:
Push content from Azure Stream Analytics to Azure Service BusWrite an Azure Function in Node.JS that fetch data from Azure Service Bus Topic and push it to Azure TableDevelop a ASP.NET Core application that plays the role of a heating system that start/stop the heating in a houseStory:
Use temperature data collected from sensors connected to Raspberry PI to start/shop a heating system from a housePrevious post: [IoT Home Project] Part 7 - Read/Write data to device twin
GitHub source code: https://github.com/vunvulear/IoTHomeProject 

Push content from Azure Stream Analytics to Azure Service Bus
This step is the most simple one. We just need to Add a new output to Stream Analytics and specify the Service Bus Topic where we want to push data. After this, we'll need to update the Stream Analytic query by adding:SELECT * INTO outputSensorDataTopic FROM avgdata , where 'outputSensorDataTopic' is the name of the output that we crea…

ARM and Resources Policies

Why?
Managing an Azure Subscription where 10 or 20 people have access can become a nightmare after the a few weeks. You will end up with people that creates resources will wrong name or in the right location.
You might want to have control what kind or resources can be created in specific location, what name should be used or what tags needs to be set for each resource. I remember once we even had a resource created in another subscription, that was discovered after almost one year.

What about Role-Based Access Control (RBAC)? Aren't the same...
RBAC and Resource Policies are focusing on different thing. They are complementary and together give you ability to have control at all levels. Role-Base Access is focussing on managing rights and actions that that a user can do. In contrast using resource policies you enforce naming convention at resource level, what resources can be created, in what Azure Regions and so on.
A good example of using RBAC and resource policies is when you gi…

Blue and Red Network Topology in Azure (Virtual Network without internet access)

Context
When you create the infrastructure of a system, it is common to have two separate network. One that has access to public internet where front-end system are hosted (web pages, web services). Another network is without internet access, more protected from intruders. In this kind of secure network backend services are hosted, databases and other private services.

In this post we will do the following references:

Blue Network - The network that had direct access to internetRed Network - The network that doesn't have access to internet and can be accessed only from internal systems

As we can see above, from Public Internet a requests goes to the front-end layer (Blue Network). Systems that runs in the Blue Network can make a direct call to the Red Network systems directly. But a request cannot goes from Public Internet directly to the Red Network. Red Network configuration (e.g. routers, firewalls) don't allow requests from Public Internet.

Can we have such a network topolog…

Azure Load Balancers - HTTP/External/Internal/Global load balancers

In this post we'll take a look on different types of load balancers that are available in Azure. The main scope is to understand what is the role of each load balancer and when we shall use each type of load balancer.

What is a Load Balancer?
It is a system that distributes the workload across multiple instances.
For more information related to how does it work and what are the base principles I invite you to take a look on Wikipedia - https://en.wikipedia.org/wiki/Load_balancing_(computing).

What types of Load Balancer are available on Azure?
Personally I would say that there are 4 types of load balancers that are available on Azure:

HTTP based Load BalancerInternal Load BalancerExternal Load BalancerGlobal Load Balancer Each of them can be used in different situations and they never exclude each others. This means that you might need to use multiple types of Load Balancer, based on what you want to achieve. 
HTTP based Load Balancer (Application Gateway) The most common one in our d…

Why back-off mechanism are critical in cloud solutions

What is a back-off mechanism?
It's one of the most basic mechanism used for communication between two systems. The core idea of this mechanism is to decrease the frequency of requests send from system A to system B if there are no data or communication issues are detected.
There are multiple implementation of this system, but I'm 100% sure that you use it directly of indirectly. A retry mechanism that increase the time period is a back-off mechanism.

Why it is important in cloud solutions?
In contrast with a classical system, a cloud subscription will come at the end of the month with a bill details that will contain all the costs.
People discover often too late that there are many services where you pay also for each request (transaction) that you do on that service. For example, each request that is done to Azure Storage or to Azure Service Bus is billable. Of course the price is extremely low - Azure Service Bus costs is around 4 cents for 1.000.000 requests, but when you ha…

Azure Price estimation - what you need to take into account

Calculating the cost consumption for a solution that runs in cloud can be sometimes challenging. First of all you need do a forecast of how many resources are required and secondly you need to put on the paper all things that are billable by the cloud provider.

Azure Price Calculator The pricing calculator offered by Microsoft for Azure is a nice tool, that helps you to take into account all the items. It is able to persist the cost even if you close the tab and when you are done you can export it to an excel file. For basic estimations is good, but I expect that you'll end up pretty fast with a complex excel.


Excel Calculator In the last few years, I was involved at least 2 time per month in Azure consumption estimations for different projects - from the small one that consume a few hundreds of euros per month to big ones where you end up with a bill that has six or seven figures per year.  You'll find different templates on the internet that you can use and don't be surpri…