0
votes

I have created the Service fabric in my application for connecting 3rd party services. we have the multiple provider for the same feature. here i have created one fabric application & created multiple stateless service for each provider (3rd party service) & it is working fine. Now i need to add some other provider for all the feature.

Is there any performance issue will come while creating more stateless service under one application?

Feature 1:

F1_provider 1, F1_provider 2, F1_Provider 3.

Feature 2:

F2_provider 1, F2_provider 2, F2_provider 3.

  1. whether need to create separate fabric application for feature 2 & create multiple stateless services for the F2_Providers?

  2. Can we create the Multiple provier under the same fabric Application?

1

1 Answers

1
votes

Your question is not clear on what is the real problem. If you give real examples, could be easier to give you better answers.

Regarding the main question:

Applications are just a logical isolation for your services, so does not make much difference having one application with 100 instances of one service type or having 100 applications with one instance each, at the end, the number of instances running will be the same(unless you decide for a shared process approach, that does not look is your case), the biggest difference will be how you gonna manage them.

If the concern is management, multiple applications might give you more flexibility, but will be harder to maintain.

For example:

Let's assume you have one application with two service types(ServiceAlphaType, ServiceBetaType) and each one have multiple named instances (US, UK), Like:

ApplicationName
- ServiceAlphaType (Type)
  - ServiceAlphaUS (NamedService)
  - ServiceAlphaUK (NamedService)
- ServiceBetaType (Type)
  - ServiceBetaUS (NamedService)
  - ServiceBetaUK (NamedService)

If you want to upgrade the service type ServiceBetaType to newer version, using differential packaging, then both named instances of ServiceBetaType (ServiceBetaUS,ServiceBetaUK) will be upgraded, you can't avoid that if they are part of the same Application instance.

If you want to upgrade just part of them, you have to create them in separate applications, and upgrading the application will affect just those services running underneath it:

ApplicationUS
- ServiceAlphaType (Type)
  - ServiceAlphaUS (NamedService)
- ServiceBetaType (Type)
  - ServiceBetaUS (NamedService)

ApplicationUK
- ServiceAlphaType (Type)
  - ServiceAlphaUK (NamedService)
- ServiceBetaType (Type)
  - ServiceBetaUK (NamedService)

Note: To upgrade an application with changed services only, you have to package the application using the differential packaging feature of service fabric.