Skip to main content

Posts

Showing posts from August, 2015

(Azure) Difference between Shared Access Signature and Shared Access Policy

In this post we will discuss about Shared Access Signature and Shared Access Policy, focusing on what are the different between them. Let's start with Shared Access Signature (SAS). It provides delectated access to a specific Azure resource. We can specify the resources that we want to allow access, how long we allow access (start and end time) and what kind of operations can be done. The SAS key is like a token, that can be used by a 3rd party to access a specific resource. In general, the SAS key is included in the URL that is used to access the resource. A SAS token can be generated very easily and will be available until the expiration time. What happens when we realize that the token is in hands of an unauthorized person or system. Unfortunately we cannot revoce the token. What we can do in this case is to revoke all the SAS tokens that were created with a specific account key. By regenerating the primary account key of a Azure Storage for example we will invalidate all th

Deep dive in Append Blob - A new type of Azure Storage Blob

In this post we will take a look about a new type of blob - Append Blob Until now, we had two types of blobs in Azure Storage: Page Blob Block Blob Block Blob is useful when we needs to work with large files. Each block can have different sized (max 4 MB) and we can work with each block independently. Features similar with transactions are supported on blocks. The maximum size of a block blob is 195 GB. Page Blob are optimized for random access. A Page Blob is a collection of pages of 512 bytes and are useful when we need to support random access to the content (read and write). We can refer to a specific location of a Page Blob very similar with a cursor. The maximum size of a Page Blob is 1 TB. When you create a Page Blob you need to specify the maximum size of the Page Blob (and you will pay for it from the beginning, even if you don't use all the space. Append Blob Concept This new type of blob is formed by multiple blocks. Each time when you create a block, it wi

Azure Load Balancer and Sticky Connection (Source IP Affinity)

In this post we will talk about Azure Load Balancer and how we can have stick connection to our Azure Resources when we have multiple instances. Background When we are using Azure VMs, Web Roles or Worker Roles and having multiple instances of the same type, all our requests will fly through a Azure Load Balancer. By default, Azure Load Balancer is not offering sticky sessions based on Source IP and Destination IP (see the last part of blog post). This means that multiple requests that are coming from the same client are not guaranteed to end up to the same instance when port is changing. Based on different counters, like CPU level for example, Azure Load Balancer can decide to redirect a request to another instance. There are cases when we need sticky connection and all the requests to end up to the same instance on Azure side. A good example is a relay server, where ports are changing for each request. In this case we need to be sure that all requests from the same source end up

Azure Service Bus Topics - How communication works over HTTP (80,443)

In this topic we will talk about different protocols and ports that can be used to communicate between our machines and Azure Service Bus Topics. The communication between Azure Service Bus Topic and our machines we can use: AMQP (new and hot) TCP/IP HTTP For TCP/IP connection is pretty clear what ports are used (9351 and 9552). It seems that 9351 is used for inbound traffic and 9552 is used for outbound traffic (this ports may change) The interesting discussion is when we are taking about HTTP. The communication over HTTP protocol is done over two ports - 443 and 80. Each port is used for specific use case: 80 :   is used for outbound traffic 443 : is used for inbound traffic This means that when we are listening to a subscription we will use port 80 to check if a message is available. The same port will be used to receive the message from subscription.  The port 443 is used when we need to send messages to topic. Each time when we send a message to a topic, th

[Post Event] August 30-31, 2015 - DOTNET Core (Fundamentals)

Last week I delivered a two days workshop about .NET Fundamentals. This two days workshop covered the base pillars of programming in C#. Topics like: - C# Syntax - Creating methods - Handling exceptions - Monitoring applications - Working with classes - Type-Safe collections - Class Hierarchy - Using Inheritance - Accessing Database - Working with streams - Improve application performance - Improve application responsiveness - Encrypting / Decrypting - Reusable Types and Assemblies - Reflection - C# 6.0 were covered during this workshop.