Advantages of Service Fabric Microservices vs Collection of Azure Cloud services/web apps - azure

I have a application that can be broken down into multiple communicating services. My current implementation is monolithic and I want to reorganize it so that individual components can be deployed,iterated upon, scaled independently. I see two ways to do this with Azure:
Service Fabric service composed of set of communicating micro-services (stateless, web-api etc.)
A collection of individual Azure Web Apps/ Cloud Services that call each other at the http end points.
Are there any obvious advantages of 1 over 2? Any rule of thumb to chose one over the other would also be very helpful.

I think this page compares it well: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cloud-services-migration-differences/
I can't tell it better than this.
There is not really a rule of thumb. Service Fabric might seem more complex but offers some things that Cloud Services / Web Apps don't.
A quick summary (taken from the link provided):
Service Fabric itself is an application platform layer that runs on Windows or Linux, whereas Cloud Services is a system for deploying Azure-managed VMs with workloads attached. The Service Fabric application model has a number of advantages:
Fast deployment times. Creating VM instances can be time consuming. In Service Fabric, VMs are only deployed once to form a cluster that hosts the Service Fabric application platform. From that point on, application packages can be deployed to the cluster very quickly.
High-density hosting. In Cloud Services, a Worker Role VM hosts one workload. In Service Fabric, applications are separate from the VMs that run them, meaning you can deploy a large number of applications to a small number of VMs, which can lower overall cost for larger deployments.
The Service Fabric platform can run anywhere that has Windows Server or Linux machines, whether it's Azure or on-premises. The platform provides an abstraction layer over the underlying infrastructure so your application can run on different environments.
Distributed application management. Service Fabric is a platform that not only hosts distributed applications, but also helps manage their lifecycle independently of the hosting VM or machine lifecycle.

Peter has done a great summary. And here are my additional points:
Cloud Service is not designed for micro service pattern, while Service Fabric is. If you want to enjoy the benefits brought by micros service, Service Fabric is your best choice.
With Cloud Service, if you want separate your application into autonomous services, you either
Create multiple cloud services. Which is difficult to monitor and manage since there is not a unified interface for a group of cloud services, Cloud Service is just not designed for this pattern.
Or add multiple roles into a single cloud service, this will lead to a) bloat of your cloud service configuration file, because all service configurations are in a single config file; and b) to upgrade a single role, you end up redeploy the whole cloud service!
Cloud Service doesn't support cross region/DC deployment, while Service Fabric does. That means you can turn a DC level disaster recovery into a normal failover, which automatically handled by Service Fabric, see this.

Related

Hosting on Microsoft Azure

I already have a domain name purchase from Google Domains.
I would like to host this site on Microsoft Azure, How should I plan to purchase all the required resources on Azure, if I want to host a Wordpress site, but would also need control over the size, if in future I plan to host some microsite with NodeJS or any other technologies like Java or .Net Core.
What would be my cost per month considering the above requirements?
Below is the list that I envisioned that I may need, can anyone suggest something this I missed.
A VM with Ubuntu (That would take care of Wordpress, Database(MySQL), NodeJS, Java and others)
Map my domain with Azure and map it with the VM
The solution you're thinking of is also known as IaaS (Infrastructure as a Service) and it is something you'd usually consider when migrating from an on-prem solution where you already have the VMs images for your needs.
In your particular case I'd recommend looking into PaaS (Platform as a Service) - specifically Azure App Service.
Everything you enumerated can be hosted in an Azure App Service as it supports all major technologies for deploying web apps today (.Net, Node.js, Java, etc).
In addition to your own code, Azure offers a number of build-in templates for 3rd party vendors that allow you to deploy pre-packaged solutions such as Wordpress without having to worry about the installation yourself. See this Wordpress on Azure article for more details.
Pricing information for Azure Web Apps can be found on the docs page. In your case I suspect you could do with a B1 or S1 instance.
Lastly, for your domain name, you can easily map and configure any custom domain to an Azure Web App by simply updating the DNS records in your Domain Management system and reference that in the Azure Portal. See docs for details.
Adding to Alex's response. To provide you a good understanding on hosting website on Azure. Firstly, I wish to highlight that Azure offers several ways to host websites: Azure App Service WebApps (PAAS solution), Virtual Machines (IAAS), Service Fabric, and Cloud Services.
Azure App Service (PAAS solution) is the best choice for most web apps. Deployment and management are integrated into the platform, sites can scale quickly to handle high traffic loads, and the built-in load balancing and traffic manager provide high availability.
WebApp is a fully managed compute platform that is optimized for hosting websites and web applications.
If you wish to host your website/app on an Azure VM (IAAS solution), you would typically install, design and configure the app in a similar way as you would onprem. If you have an existing application that would require substantial modifications to run in App Service you could choose Virtual Machines in order to simplify migrating to the cloud.
Take a look at the supported and unsupported configuration on App Service Migrate - Migration checklist when moving to Azure App Service : https://azure.microsoft.com/en-us/blog/migration-checklist-when-moving-to-azure-app-service/

What are the advantages of using a Service Fabric stateless service over a Cloud Service Worker Role?

I am trying to understand the advantages of using Service Fabric over a cloud service worker role.
Currently, I am using a cloud service for hosting (web role and worker role).
Will there be any advantage if I change the cloud service to an App Service Web app for hosting the web role and a Service Fabric stateless service for hosting the worker role? If so, what are the advantages?
Service Fabric itself is an application platform layer that runs on Windows or Linux, whereas Cloud Services is a system for deploying Azure-managed VMs with workloads attached. The Service Fabric application model has a number of advantages:
Fast deployment times. Creating VM instances can be time consuming. In Service Fabric, VMs are only deployed once to form a cluster that hosts the Service Fabric application platform. From that point on, application packages can be deployed to the cluster very quickly.
High-density hosting. In Cloud Services, a Worker Role VM hosts one workload. In Service Fabric, applications are separate from the VMs that run them, meaning you can deploy a large number of applications to a small number of VMs, which can lower overall cost for larger deployments.
The Service Fabric platform can run anywhere that has Windows Server or Linux machines, whether it's Azure or on-premises. The platform provides an abstraction layer over the underlying infrastructure so your application can run on different environments.
Distributed application management. Service Fabric is a platform that not only hosts distributed applications, but also helps manage their lifecycle independently of the hosting VM or machine lifecycle.
For more details, refer "Learn about the differences between Cloud Services and Service Fabric before migrating applications".
This article helps you understand the options and make the right choice for your web application.
As #PRADEEP CHEEKATLA said,Service Fabric itself is an application platform layer that runs on Windows or Linux, whereas Cloud Services is a system for deploying Azure-managed VMs with workloads attached.
In Cloud Services, a Worker Role VM hosts one workload. In Service Fabric, applications are separate from the VMs that run them, meaning you can deploy a large number of applications to a small number of VMs, which can lower overall cost for larger deployments.
And the key difference between Service Fabric and Cloud Services is that in Cloud Services you connect to a VM, whereas in Service Fabric you connect to a service.
This is an important distinction for a couple reasons:
1.Services in Service Fabric are not bound to the VMs that host them; services may move around in the cluster, and in fact, are expected to move around for various reasons: Resource balancing, failover, application and infrastructure upgrades, and placement or load constraints. This means a service instance's address can change at any time.
2.A VM in Service Fabric can host multiple services, each with unique endpoints.
Here is a comparing Cloud Services with Service Fabric:
Also, you could refer to this article to converting Web and Worker Roles to Service Fabric stateless services.

Running Service Fabric on non-Azure clouds

I have just started exploring Azure Service Fabric & I'm finding the concepts involved a little overwhelming
Consider these 2 statements -
"Service Fabric is agnostic to the underlying hosting provider. You
can run it in Azure, you can run it on AWS, you can run it on 5
laptops - it doesn't matter."
"Azure Service Fabric for Windows Server..can be used
to..provision Service Fabric clusters in their own datacenters or
other cloud providers, and run production workloads"...any Windows Server environment...there is no real lock-in to Azure as a cloud platform
As per my understanding,
1) in Azure, app can be deployed to "Azure Service Fabric" PaaS platform.
2) On a local development machine, it can be deployed to physical or virtual machine(S) that support Azure Service Fabric SDK
3) On "other cloud providers", "Azure Service Fabric for Windows Server" has to be installed(?) on VMs before app can be deployed.
So when an app runs on Azure, it is the "Azure Service Fabric" PaaS platform but if it is deployed to any other cloud provider, it is in an IaaS mode and the maintenance of the SF infrastructure & supporting functions have to be done by deployer of the app
Is my understanding correct?
Is there any documentation on running Service Fabric on non-Azure cloud like AWS?
Can someone elaborate on the purpose of "Azure Service Fabric for Windows Server" & Azure Service Fabric SDK?
When using Azure as the cloud platform to host your Service Fabric cluster then you get some benefits from being able to setup and manage (some aspects of) your cluster directly in the Azure portal, as well as connecting it to other Azure resources such as Azure Key Vault for storing your cluster certificate securely and OMS/Azure Log Analytics for analyzing your log data from the cluster. You still get a set of IaaS resources created for you though when you set up a Service Fabric cluster in Azure, a minimum of the following IaaS resources are at least created for you:
Virtual Machine Scaleset
Public IP address
Virtual Network
Load Balancer
Storage accounts
Depending on the number of nodes and nodetypes there may be multiple instances of these. Each of the nodes are in turn a VM running (by default) Windows Server 2012 R2 Datacenter (you can change that in your template as well).
Running Azure Service Fabric on Azure is not really a PaaS solution, you are far to much in contact with the supporting infrastucture for that to be true. It is a mix of IaaS and PaaS I would say.
On you local development machine you can run a local development cluster that emulates running a 1 or 5 nodes cluser on you local machine. It is only intended for development and there are some features of this local cluster that will behave differently (for instance, you cannot run a reverse proxy there). https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started
If you want to run Service Fabric on any other platform than Azure, such as an on premice data center or in another cloud platform (AWS for instance), then you should look at Create and manage a cluster running on Windows Server. You will then need to create an infrastructure similar to the infrastructure created by Azure when you create an Azure Service Fabric resource directly in Azure. You will need to create a number of VMs (or physical machines) with Windows Server 2012 R2 (or later) that are connected on the same network (virtual or physical) and you will likely need some form of load balancer. When you run Azure Service Fabric in this way you are yourself responsible for maintaining your infrastructure in terms of monitoring and maintaining them (patching the OS on your VM's, monitoring the network for vulnerabilities, etc.).
There is also a preview for running Service Fabric on Linux machines but it does not support Standalone installations yet. https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-linux-overview.
When you have your Service Fabric cluster running on either Azure, local development cluster or as a Standalone cluster, then you could in a way consider that installation as your PaaS platform for adding new microservices.

Azure service fabric with ApplicationGateway

i have Service fabric Cluster Running on Azure ,i have deployed Application to Service Fabric.
Now i want to use azure Application Gateway on this Scenario like Request First served to Application Gateway and then it migrated to Fabric Load Ba-lancer. I am Quite Confused on this.How to meet above Challenges with ApplicationGateway
I also able to configure ApplicationGateway but dont have IDea how to use it for service fabric
Microsoft Azure Application Gateway offers layer 7 load balancing capabilities, SSL offloading, layer-7 routeing, cookie based session affinity, URL routeing and able to host multiple web application. Azure Application Gateway requires its subnet; sometimes it is confusing if you are not familiar with Azure VNet and Subnet segmentation.
First what you need to understand is the architecture pattern, how Microsoft Application Gateway would play a part in.
I have written some detail series documenting my journey throughout Azure ServiceFabric.
I would suggest you go through these posts, and it will explain Architecture viewpoint for having Application Gateway in front of Service Fabric Cluster.
Irrespective of Application Gateway, you would need Internal Loadbalancer or External Loadbalancer (depends on your topology).
Cloud Architecture Pattern: Azure Service Fabric and Microservices - Part 1 (Physical Architecture)
How to implement Application Gateway with Azure Service Fabric
Also try to understand how it is going to impact, security architecture of your implementation
Also, I would recommend you Reverse proxy in Azure Service Fabric.
Not fully sure your meaning, but you could create sf cluster and related resources using ARM teplates. Thats what I have done. I created appgw, cluster, vmss etc. In the virtualMachinesScalesets networkProfile you must configure the ApplicationGateway back endAddress pool instead of configuring loadBalancerBackendAddressPools. The appgw must exist before vmss deployment. You don't necessarily need lb at all. Appgw can handle the load balancing for you. Even though internal lb would bring in some nice additional features, which you could utilize later on...
I have to admit that these things are quite poorly documented...

Azure Virtual Machine as Worker Roles inside an App Service Environment

I would like to run Virtual Machines as Worker Role inside an Azure App Service Environment. I think I've tried and read everything. Is this scenario supported at all?
The short answer is no. Azure VM's, worker roles (cloud services), and App Services are three different hosting offerings.
Virtual Machines are an Infrastructure as a Service (IaaS) solution. Think of it as your own server in the cloud. It is the most most flexible option. However, you are responsible for managing and patching it.
Cloud Services are a Platform as as Service (PaaS). Your concerns are limited to building and deploying your application. Microsoft manages updating the underlying VM.
App Services are a higher level of PaaS. Specifically, you can think of Web Apps (formerly Web Sites) as a hosted IIS. You have the least amount of control compared to the other platform offerings, but it is the easiest way to get started.
I would suggest trying to run your application first in an App Service, then moving to a cloud service if you need more control, and finally to a VM when even more flexibility is required.
More information:
http://robertgreiner.com/2014/03/windows-azure-iaas-paas-saas-overview
http://blogs.msdn.com/b/hanuk/archive/2013/12/03/which-windows-azure-cloud-architecture-paas-or-iaas.aspx

Resources