Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design of Application in Azure Service Fabric

I need help how to think about designing our application to fit into the new Azure Service Fabric template.

Today we have an application built on Azure Cloud Services. The application is built around DDD and we have separate bounded contexts for different subsystem parts of the application. The bounded contexts are today hosted in one worker role that exposes these subsystems using a single WebAPI.

Additionally we have one Web Role hosting the web frontend and one Worker Role processing a background queue.

We strive to move to a micro services architecture. The first thing I planned to do was to extract all bounded context into their own API-hosts. This will result in 5-10 new WebAPI services supporting our subsystems.

To my question, should all of these subsystem/bounded context/API-hosts be their own Service Fabric Application or a service within a single Service Fabric Application?

I've read the documentation, found here Service Fabric Application Model, over and over and I can't figure out where my services fits in.

We want the system to support different versions of the services, and the services should also be possible to scale different from another. There might even be a requirement to have one micro service to run in a larger VM size then the rest.

Please can someone guide me in which suits my needs.

like image 433
honk Avatar asked Jun 01 '16 11:06

honk


People also ask

What type of application architecture is Azure service Fabric made for?

Azure Service Fabric is a Platform as a Service (PaaS) offering designed to facilitate the development, deployment and management of highly scalable and customizable applications for the Microsoft Azure cloud platform. Fabric, in this context, is a synonym for framework.

What is Azure service Fabric application?

Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices and containers. Service Fabric also addresses the significant challenges in developing and managing cloud native applications.

Are used to develop Microservice based applications in service Fabric?

Azure Service Fabric is Microsoft's platform-as-a-service (PaaS) and is used to build and deploy microservices-based cloud applications.


1 Answers

I think you have the right idea, in general terms, that each bounded context is a (micro) service. Service Fabric gives you two levels of organization with applications and services, where an application is a logical grouping of services. Here's what that means for you:

Logically speaking, think of an application as a cohesive set of functionality. The services that collectively form that cohesive set of functionality should be grouped as an application. You can ask yourself, for each service: "does it make sense to deploy this service by itself without these other services?" If the answer is no, then they should probably be grouped in the same application.

Developmentally speaking, the Visual Studio tooling is geared a bit more toward multiple services in one application, but you can have multiple applications in one solution too.

Operationally speaking, an application represents a process boundary, upgrade group, and versioning group:

  • Each instance of an application you create gets its own process (or set of processes if you have multiple service types in the application). Service instances of a service type share host processes. Service instances of different service types get their own process per type.
  • The application is the top level upgrade unit, that is, every upgrade you do is an application upgrade. You can upgrade individual services within an application (you don't always have to upgrade every service within an application), but each time you do an upgrade, the application version changes.
  • You can create side-by-side instances of different versions of the same application type in your cluster. You cannot create side-by-side instances of different versions of the same service type within an application instance.

Placement and scale is done at the service. So for example, you can scale one service in an application, and you can place another service on a larger VM.

like image 74
Vaclav Turecek Avatar answered Sep 19 '22 20:09

Vaclav Turecek