1. Define Azure Service Fabric.
Azure Service Fabric is termed as a stage for distributed systems which eases the work of deploying, packaging and managing reliable and scalable micro services. It also handles noteworthy problems related to the development of cloud applications.
2. Define Service Fabric Cluster.
Service Fabric Cluster can be described as a shared pool of machines. These clusters can have thousands of machines and can expand their areas globally.
3. Describe the importance of application instance in Azure Service Fabric.
Application instance in Azure Service Fabric can be run as a separate process even though they are on the same Fabric Service node. One can have as many as application instances of any type as they want in a cluster. Each application instance will have a specific name in a cluster and independently managed and versioned from rest application instances of same or different type. Moreover, resources and security isolation can be defined by them.
4. Define cluster in Azure Fabric Service
A cluster can be described as a collection of virtual/physical machines that are connected by a network. On these machines only, application instances are getting deployed.
5. Define node in Azure Fabric Service
A node in a cluster is an addressable unit. It has unique IDs and placement properties. The cluster can be formed as different nodes.
6. Does a cluster have any minimum size limit?
Yes. Azure supports a minimum of 5 nodes for the production environment for a Service Cluster. For dev/test environments, Azure supports three nodes of the cluster. This minimum node requirement exists as Azure runs a collection of Stateful Services. These services are directly dependent on consistency. And this strong consistency is directly dependent on the ability of any service to obtain a quorum for an update to the state of them. Quorum amounts to the majority of replicas for a given service.
7. Define Service type in Azure Service Fabric.
A service type is a coding unit or a configuration which runs independently. An application type can have one or more service types. For example, Queue Service
8. Define Service instance in Azure Service Fabric.
The service instance can be defined as code which instantiated for each service type. Every service instance is associated with a specific application instance and will have a unique name.
9. What are the Advantages of Azure Service Fabric?
- Fast deployment times as creation of virtual machines are time consuming while in service fabric its quick to deploy in clusters.
- High density hosting as we can deploy large number of applications to smaller number of VMs.
- Ability to run in any environment or in any operating systems. Not mandatory to be in Azure, can run in on-premises also.
- Distributed application management.
10. Define application package in Azure Service Fabric?
The collection of service code packages and the configuration files combined for a particular application. These are the physical files that are deployed, and they are simply in a file and folder format layout. For example, an application package for an email application could contain a queue service package, a front-end service package, and a database service package.
11. Explain MicroService.
MicroService applications are formed of scalable, compact, stand-alone and customer-focused services, which converse with each other using standard protocols and well-defined interfaces. Service Fabric is agnostic on how you build your service, and you can use any technology. However, it does provide built-in programming APIs that make it very easy to build microservices.
12. Describe different types of MicroServices.
Below are two types of MicroServices:
1. Stateless Microservices – they don’t continue to keep an inconsistent state outside of any request and its response from the service. For example, Azure Cloud Services worker roles, web proxies etc.
2. Stateful Microservices – They continue to keep an inconsistent state beyond the request and its response from the service. For example, Shopping carts, queues etc.
13. Define Application type in Azure Service Fabric.
The application type is a collection of one or more service types or we can describe them as a collection of microservices.
14. Brief about Programming models available in Azure Service Fabric.
To build applications in Azure Service Fabric, we have two programming models:
1. Reliable Services: An API to develop stateful and stateless services using StatelessService and StatefulService .NET classes and save state in .NET collections like dictionary and queue.
2. Reliable Actors: An API to build stateless and stateful objects using the virtual actor programming model that is suitable for applications with different independent units of state and compute.
15. How the Nodes in Service Fabric behave in case of OS updates?
As of now, nodes in Azure Service Fabric don’t receive OS updates automatically. Azure doesn’t support automatic OS updates in nodes of Service Fabric.
16. Is it feasible to turn off the cluster during weekends/night for saving money?
No, it is not at all a feasible option. If we turn off the cluster during weekends/nights when we restart them afterward, almost all the nodes will obtain a brand-new host and in turn makes the system unrecoverable.
17. What is a Container?
The container is an individual component which can be run independently and as an isolated instance to gain the benefits of virtualization which an OS gives. It provides a varying environment for the application to run with different types of isolation.
18. How does Service Fabric relate to containers?
Containers offer a simple way to package services and their dependencies such that they run consistently in all environments and can operate in an isolated fashion on a single machine. Service Fabric offers a way to deploy and manage services, including services that have been packaged in a container.
19. Explain the advantages of the container over virtual machines?
1. Smart: Use a single storage space and layer versions to increase efficiency
2. Fast: Start faster as no need to boot an operating system
3. Portability: Application image can be ported to run on the cloud, virtual machines, premises or physical devices
4. Resource Governance: Resources can be limited consumed by the host.
20. Which two metrics affects resource governance which is supported in Service Fabric?
Two metrics affects resource governance, supported in Service Fabric:
1. CPU: metric name – servicefabric:/_CpuCores
2. Memory: metric name – servicefabric:/_MemoryInMB
21. Define horizontal scaling.
Horizontal scaling can be termed as scaling by increasing machine in the pool of resources.
22. Define vertical scaling.
Vertical scaling can be termed as scaling by increasing more power like CPU or RAM to a machine.
23. Where does Azure Service Fabric Resource Provider store customer data?
Azure Service Fabric Resource Provider doesn’t move or store customer data out of the region it is deployed in.
24. Is fabric a PaaS service?
Beyond just spinning up a cluster of IaaS VMs, Azure Service Fabric is a full “custom PaaS” system. It also allows you to easily scale and manage your micro-services that are hosted within that “custom PaaS” service as well. Azure Service Fabric is a full “custom PaaS” system.
25. What is Azure Cloud Service?
Cloud service can convey a multiple web application in Azure, characterizing a number of parts to disseminate handling and permit adaptable scaling of your application. A cloud service comprises of a minimum of one web pars as well as specialist parts, each with its own particular application documents and design.The fundamental favourable position of cloud service is the capacity to help more complex multi-level structures.
26. Explain Cloud Services vs Service Fabric?
- Applications and infrastructure: In Cloud Services we deploy applications as Virtual Machines where the code is coupled to an instance. There is no difference between an application and VM definition here as both are considered as one, while in Service Fabric we just deploy our applications into existing virtual machines where the service is completely decoupled from the underlying infrastructure.
- Application architecture: We might be having a lot of external service dependencies in cloud service architecture like tables, storage and cache. The service fabric can also follow the same by just replacing the cloud service deployment with the service fabric stateless services in a simple migration with minimal code change or use stateful features by writing some custom services.
- Communication and workflow :The communication between different tier in case of cloud service and service in case of Service Fabric happens commonly in two models: direct and via an external durable storage. In cloud services tiers communicate directly by selecting the instance of the VM role and connecting to the endpoint directly, while in service fabric we just connect to a service.
27. What is service fabric Explorer?
Service Fabric Explorer (SFX) is an open-source tool for inspecting and managing Azure Service Fabric clusters. Service Fabric Explorer is a desktop application for Windows, macOS and Linux
28. What are the different programming models supported by Azure Service Fabric?
- Reliable Services
- Reliable Actors
- Containers
- ASP.NET Core
- Guest Executables
29. What is Reliable Services?
Reliable Services in Azure Fabric are services addressing single or multiple business concerns. However they are different from the normal web services that we usually develop. By design they are reliable, scalable, highly available and consistent as they are hosted on multiple nodes, partitions and replicas in a cluster. Reliable services can easily access rest of Service Fabric APIs and due to this they can discover other services with ease, communicate with other services, can do health reporting and much more.
30. What is Reliable Actors?
Reliable Actors are based on Actor programming model. An actor has three primary components,
- Code to achieve business functionality
- Storage to persist Service state
- Communication system or a mailbox queue to store messages sent by other actors that it will process.
To achieve parallel processing the client can talk to multiple actors. Though the actors can run in parallel, each actor can process the messages it has received in its queue sequentially. In case of Azure Service Fabric the actors are denoted as Virtual Actors. They are not explicitly created or destroyed in the memory rather they get activated or created when the first call or invocation is made. The actor object gets destroyed when it is not used for some period of time. The Reliable Actor model is based on top of Reliable Stateful Service model. A Virtual Actor consists of Reliable Stateful Service that addresses the need to have code and a persistent state. The communication part is handled using Service Remoting.
31. What are the benefits of using container with Service Fabric?
Compared to virtual machines, containers have the following advantages:
- Small: Containers use a single storage space and layer versions and updates to increase efficiency.
- Fast: Containers don’t have to boot an entire operating system, so they can start much faster–typically in seconds.
- Portability: A containerized application image can be ported to run in the cloud, on premises, inside virtual machines, or directly on physical machines.
- Resource governance: A container can limit the physical resources that it can consume on its host.