31

My thinking is that people use Docker to be sure that local environment is the same as production and that I they can stop thinking about where are their apps running physically and balancing mechanisms should just allocate apps in best places for that moment.

I'm 100% web based and I'm going to move to cloud together with our databases, and what cannot be moved will be seamlessly bridged so the corporate stuff and the cloud will become one subnetwork.

And so I'm wondering, maybe Service Fabric already does the same thing that Docker does plus it gives as address translation service (fabric:// that acts a bit like DNS for the processes in fabric space) plus (important for some) encourages on demand worker allocation - huge scalability perk.

  1. Can Service Fabric successfully replace Docker?
  2. Is it gaining audience and acceptance? Because otherwise even the greatest invention can fail.
Nathaniel Waisbrot
  • 23,261
  • 7
  • 71
  • 99
jjaskulowski
  • 2,524
  • 3
  • 26
  • 36

3 Answers3

57

It's confusing since Docker (the company) is trying to stake claims in everything cloud.

  • Docker Engine (what most people call "Docker") is a containerization technology. It can give you
    • Process isolation
    • Network isolation
    • Consistent application environment
  • Docker Hub is an image registry. It stores Docker images so you can download them as part of your deployment.
  • Docker Cloud is an orchestration system for Docker. It can give you
    • Scale your applications up and down
    • Connect your applications to each other
    • CI testing, integrated with Docker Hub (this isn't part of orchestration, just another thing it does)

Service Fabric is an orchestration system. It can orchestrate Docker containers, but it can also integrate more tightly with your services if you build specifically for Fabric. (Docker is completely agnostic about what runs inside a container.)

So Service Fabric is mostly comparable to Docker Cloud, though it's not an exact match. There are some other Docker-based orchestration solutions (Kubernetes is probably the biggest) and there are other cloud-based micro-service solutions (Heroku is probably the best-known).

The primary disadvantage of Service Fabric is that it's a Microsoft technology and so you're going to be tied to Azure to a greater degree than if you were running Docker. The other is that Docker has a broader range of choices for building your stack: all three Docker-things I listed above have at least one open-source alternative (this is also a big disadvantage of Docker, since nobody's laying out a single Best Practices For You document).

If you love Microsoft and if cobbling systems together is not something that's important to you, then Service Fabric should be a fine alternative to the Docker ecosystem. (And you can still run Docker containers under it.)

Nathaniel Waisbrot
  • 23,261
  • 7
  • 71
  • 99
  • I understand that I can set up a standalone fabric in case Azure fails. https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-cluster-creation-for-windows-server/ – jjaskulowski Sep 02 '16 at 10:41
  • I've seen that Azure has a docker container service but I didn't know that there is something more like that running container in fabric. I'm not sure if correctly understood this part because what would be the advantage of running container in fabric? Will it have an interface to create a Workers Containers the same way it does create Worker asp.net apps on demand (when frontal service requests "hey, create me a worker and do me a job" )? Will it have some layer of abstraction to let the docker container to ask for current address of services (the fabric:// protocol translation)? – jjaskulowski Sep 02 '16 at 10:47
  • Docker on SF: as a "guest executable", where you don't get any special abilities. You would do it if you already have some applications in Docker and you're transitioning to Service Fabric. – Nathaniel Waisbrot Sep 02 '16 at 11:05
  • 22
    Just to clarify a couple points: First, 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. There is Azure integration available, but it is *always* optional. – Vaclav Turecek Sep 09 '16 at 19:02
  • Second, when you say "cobbling systems together," that's actually something Service Fabric solves really well. Unlike, say, Kubernetes, where you do need to cobble several systems together to get a useful platform, Service Fabric is all inclusive: Orchestration, leader election, cluster federation - all of this is built in to a single package. You don't need to pull in multiple systems or products to get to a point where you can run applications. – Vaclav Turecek Sep 09 '16 at 19:03
  • Many people _like_ cobbling systems together (you can at least imagine that you have more control and customization). I've edited to try to be more clear. – Nathaniel Waisbrot Sep 09 '16 at 23:36
  • 8
    @NathanielWaisbrot I was reading about App Service Fabric and is not tied to Azure, you can have clusters on PREM, on Amazon or in Azure, so that statement is not correct. – Luis Valencia Jan 08 '17 at 00:35
  • @Vaclav Turecek w.r.t "Service Fabric is agnostic to the underlying hosting provider. You can run it in Azure, you can run it on AWS", can you please point me to a link or provide instructions on how to run Service Fabric on AWS? – mvark Jan 16 '17 at 05:29
  • @mvark I propose that you ask this as its own question. When you get an answer there, someone can link the answer in here to show how wrong I am for suggesting that there's any connection between Azure and "Azure Service Fabric" :-) – Nathaniel Waisbrot Jan 16 '17 at 20:53
  • 1
    @Vaclav-Turecek Nathaniel's comment helped me dig into the naming of different Service Fabric variants and I wish the official documentation explained it better. I wish "Azure Service Fabric for Windows Server" (ref https://azure.microsoft.com/en-in/updates/service-fabric-windows-server-ga/) and Azure Service Fabric the PaaS platform, had more distinct names – mvark Jan 17 '17 at 06:14
  • 3
    Relevant to the discussion, http://stackoverflow.com/q/41756276/397817 asks about running Service Fabric on cloud platforms other than Azure – Stephen Kennedy Mar 16 '17 at 10:47
  • 1
    RE: "The primary disadvantage of Service Fabric is that it's a Microsoft technology and so you're going to be tied to Azure". This is incorrect: despite it has Azure in its name, ServiceFabric is by no means tied to Azure. We are are deploying our ServiceFabric to our cluster of Windows machines without even having an Azure account. – Dmitry Apr 17 '19 at 03:56
  • For my team, Service Fabric makes service orchestration accessible to a team that, while already familiar with a service-oriented architecture, isn't ready to take the leap in 'dockerizing' all of our services. It handles so many of the tough networking and deployment problems for us, so we can just focus on writing our services. – pixelTitan Jun 26 '19 at 14:30
5

The key similarities between the Service Fabric and Docker containerization:

  1. Both Dockers and SF, are capable of creating an immutable image out of your micro-service implementation, on both the platforms - Linux and Windows.
  2. Both Dockers and SF, are capable of orchestrating your containerized application within a cluster of VMs. These VMs can be anywhere - public cloud, private cloud or your own data center. Please note that both of them are cloud platform agnostic, that means, they don't have strong affinity on any of the cloud service. So as long as you are not using any cloud specific feature within your micro-service, this should be fine.
  3. Both Dockers and SF, are capable exhibiting essential capabilities of an orchestrating platform: Service Discovery, Service level load balancing, Network level isolation among services, fail-over handling and replication control etc.

The key differences between the Service Fabric and Docker containerization:

  1. Docker container is essentially a deployment / packaging construct. That said, docker doesn't dictate on what you are packaging within a container as part of your service implementation. Neither it provides any programming construct to implement your kind of service. Whereas, Service Fabric provides programming constructs in the form of base types / interfaces from which your service implementation can start with a certain kind of service declared - stateful service, stateless service, virtual actor.
  2. In the Docker world, everything is a container, i.e. your minimum deployment / orchestration unit is a container. Hence, it doesn't recognize or support an individual process. Whereas, in SF, we have a provision wherein, your micro-service derived from stateless / stateful service can be orchestrated and governed as a process. However, SF also supports container orchestration the way Docker does. Also, the latest version of SF allows packaging your stateful / stateless service within a container.

With above facts in mind, please note that SF doesn't have any strong affinity on any cloud provider. It can run equally on any public cloud - Azure, AWS or GCP, as long as you are able to create the VMs with desired platform.

3

It is not comparable at all. With service fabric, you get health monitoring, code integration with the fabric, logging, monitoring, load-balancing, and other intelligent features. Your application can even execute shutdown code. Service Fabric is not just for Microsoft technologies and even docker can reside inside SF so is rkt or Unix OS. Security and networking features(in-line with web apps) is another plus. Reliable collections is simply brilliant. And a roadmap to better application building and performance is guaranteed for the companies adopting it (history says so).

This question is highly favoring 'greatest invention' Docker. This comparison can do good for Docker marketing but no one will replace SF for Docker. Docker is just a tiny OS copy (nothing to do with services, applications or intelligence). Docker even has nothing to do with application development, it wasn't the intention. Just that people have started to find the need for isolation and sharing. And that is what Docker is all about.

Blue Clouds
  • 7,295
  • 4
  • 71
  • 112
  • 3
    Sad to see that so little people understand the true power of Service Fabric "Native". If your applications are **all** based on .Net or Java, you can use the Service Fabric SDK to build an extremely powerful (micro)services landscape with full support for service orchestration, load balancing, health probing and even very clever statefull services like Actors and distributed collections. So no containerization and Kubernetes/plugins configuration learning curves. – Ted van der Veen May 22 '19 at 06:56
  • 2
    @TedvanderVeen I completely agree. In my opinion, if you are a software shop that already has a 'service-oriented' architecture, and want to get into the micro-services/orchestration space, Service Fabric is a great choice. – pixelTitan Jul 01 '19 at 19:31