Sunday, June 14, 2020

Advantages of Microservice


Scalability – It’s easy to scale in or scale out services depending on business need. Also doesn’t have to scale the entire application.

Availability – even if one service is down, application can be functional.

Partial deployment – it’s possible to deploy changes to specific to a microservices. This is faster compared to deploying the entire application.

Independently upgradable – each microservices are like components, it’s possible to independently upgrade or replace them.

Multiple platforms/technology - software development can be done using different technologies.  (Polyglot)

What is Microservice?

Microservice is a way of building distributed software.

Here business capabilities are broken down into independently deployable services. Relatively smaller teams works on each of microservices. It talks to each other using inter process communication. Microservices let each service to choose its own data store and manage its data. These data will not be directly accessed by other microservice.

Saturday, March 28, 2020

Azure Cache for Redis - Observation

Redis cache is an open source In-Memory data store.

In-memory is best way to store and get data faster, but its not ideal for persisting data.

Nuget package StackExchange.Redis helps to configure Redis cache on .NET code

ConnectionMultiplexer class helps to establish connection with Redis cache.


Note: Redis Pricing Tier C0 Basic offers up to 250MB cache and is sufficient for the hands-on 


Wednesday, March 18, 2020

Terraform - Getting started

Terraform is an opensource tool for creating, changing and versioning infrastructure. It uses config files.

In other words, it uses Infrastructure as a Code (IaC) to provision cloud resources or any infrastructure.

Terraform execution steps are:

  1. init
  2. plan
  3. apply
  4. destroy
Terraform generates execution plan, before applying them.
Terraform plan command throws if any syntax or runtime error exits.
Terraform apply command provision the infrastructure on the cloud.
Terraform destroy command deletes the infrastructure from the cloud.

Reference:

Monday, March 16, 2020

Load Balancer Types in Azure

Load Balancers helps to distribute incoming network traffic
  1. Azure Load Balancer
  2. Azure Application Gateway
  3. Azure Traffic Manager

 Azure Load Balancer operates at Layer 4 of OSI model (TCP/UDP). It is a single point of contact for clients.

Azure Application Gateway operates at Layer 7 of OSI model (HTTP/HTTPS). It is a web traffic load balancer. That is it manages traffic to web applications

Azure Traffic Manager is DNS Based traffic load balancer. It manages traffic across multiple azure regions.


Wednesday, February 12, 2020

Swagger - Observations (Screenshots)

Swagger UI


Configuration in the startup - 1

Configuration in the startup - 2


Inject human friendly description



Swagger - Observations

Swagger is a framework for documenting REST API

Nuget package Swashbuckle.AspNetCore helps to configure swagger on .NET core web api

Swagger Generator helps to configure documentation title, description, contact details etc

Human friendly description can be injected for Web API methods. This is by including XML comments.