Microservices: Picking the .NET Framework for your containerized applications.

The objective of this blog post is to explain the factors that should be considered when picking a framework for a .net application that you intend to deploy in containerized fashion.

.Net Core

Generally, .Net Core is the preferred option when building applications that were intended to be deployed in containers due to the fact that .Net Core is built using modular architecture (.net core app images contains only the dependencies it requires to run). .NET Core apps are packaged using Windows Nano Server which is a far smaller compared to the OS required by the standard .NET runtime (Windows Server Core) therefore producing lighter images (end product of building containerized application).

On the image above, you will see an image built for .Net Core app that prompts "Hello World". Please take note of the size of the image (251 MB) as it would be critical to demonstrating the difference of the two frameworks.

Download Demo Apps from GITHUB

When to pick .NET Core?

  • Building Polyglots

    Polyglots are applications built using different platforms (EG. Combination of Java and .Net processes in a SOA app). Basically, .Net Core can be used to build applications that run on both Linux and Windows.

  • Your application's architecture is Microservices

    Containers are perfect for deploying Microservices because they allow the complete isolation of services. This basically enables the use of different platforms and dependencies per service without the nasty side-effects of hosting this applications together.

  • You intend to save on hardware cost

    Images built using .NET Core have small footprints (RAM and Storage) which enables us to host different containers inside a VM or Physical machine.

  • You need fast app start up

    Since .NET Core apps ship with things it only depends on, application can quickly startup.

  • You intend to build Green-Field applications

    .NET core is the most advised framework to be used for building green-field applications (Fresh Projects). Since it is designed for the future of .NET development.

  • You intend to build high density and scalable applications.

    Since containerized applications are easy to scale using container orchestrators like Docker Swarm, Kubernetes, DC OS and Mesosphere; .NET core is the perfect framework

.Net Framework

.Net Framework is the preferred option when you intend to containerize an existing application or utilize things that deeply depend on Windows API. It is always advised to pick .NET Core over .NET framework because of the Huge image that .NET framework images produces. NOTE: Huge image size corresponds to higher cost of hosting in cloud based docker image repositories. It also means larger cost for compute power to run the containerized app.

On the image above, you will see an image built for .Net Framework app that prompts "Hello World". It is quite noticeable that this image is way larger (10.4GB) than the image built using .Net Core.

When to pick .NET Framework over .Net Core?

  • Migrate an application that is difficult to port in .Net Core

    If migrating an application from .NET Framework to .Net Core is associated with high risk over produced value, it is highly suggested to keep the existing app and host it on containers.

  • Your application depends on a binary that doesn't have a .Net Core counterpart.

    Since .NET Core is still young and hot, there are still binaries that don't have a .NET core counterpart. A perfect example of this is proprietary or internal frameworks of companies.

  • Usage of .Net technologies not available for .Net Core

    As of November 2017, ASP.net Web Forms, WCF services and Workflow related services are still not supported.

Related Articles


Why don't you become a Microservice Ninja?


Comments

  1. Useful article which was very helpful. also interesting and contains good information.
    to know about python training course , use the below link.

    Python Training in chennai

    Python Course in chennai

    ReplyDelete
  2. Good, Keep up the good Work, Very Informative Content,
    Thanks For Sharing.

    Java Training in Chennai

    Java Course in Chennai

    ReplyDelete
  3. Great Post with valuable information. I am glad that I have visited this site. Share more updates.

    Spoken English Classes in Anna Nagar
    Spoken English Classes in Medavakkam
    Spoken English Classes in Chennai

    ReplyDelete
  4. เราคือผู้นำด้านเกมพนันออนไลน์ Major168 เราคือผู้ให้บริการ คาสิโนออนไลน์ ที่ได้รับรองว่าดีที่สุดในประเทศไทย มีค่ายเกมส์ให้เล่นมากมาย Sagaming, Sexy bacarat, Dreamgame, Ebet, Wm casino, Vivo gaming ไม่ผ่านเอเย่นต์ ระบบปลอดภัยมีทีมงานดูแลตลอด 24ชม.

    SAGAME88 แหล่งรวมเกมส์พนันออนไลน์ คาสิโนสด บาคาร่า กำถั่ว คาสิโนออนไลน์ ไฮโล รูเล็ต รับเครดิตฟรีเล่นได้ทุกเกมส์ โบนัสสมาชิกใหม่เพียบ พร้อมระบบฝากถอนออโต้ 10วิ เรามีทุกค่ายเกมส์ให้คุณเลือกเดิมพัน SA Game Sexy bacarat Dreamgame WM Casino VIVO Gaming Ebet เล่นได้ทุกเกมส์

    Our website ufabet provides betting services in the system of Auto Deposit-Withdrawal. Our members are not only in Thailand. Online football betting UEFA Bet market And this makes a guarantee that Ufabet168 is another reliable football betting website

    ufa through the website UFABET1688 a web gambling online , one that integrated all the bets from online casinos , online casino , online , and also have a game a lot more to be chosen to play such games.

    ReplyDelete
  5. Excellent Blog, I like your blog and It is very informative. Thank you

    English Speaking Course online
    Online Spoken English Classes

    ReplyDelete

Post a Comment

Popular posts from this blog

API Gateway: Response Aggregation with Ocelot and ASP.net Core

API Gateway in a Nutshell

Security: HTTP headers that expose web application / server vulnerabilities

Building Simple API Gateways with Ocelot and ASP.net Core