user217648
user217648

Reputation: 3466

Service Fabric Actors or Azure Functions

I am trying to understand differences between a FaaS in Azure and Actors in Service Fabric. To me both almost do same and are serverless. The only difference is Actor is single threaded. Is there a good explanation to distiguish these two?

Upvotes: 1

Views: 732

Answers (2)

Joe Healy
Joe Healy

Reputation: 5817

My rough notes on this.

ASE = App Service Environ, CP = Consumption Plan for functions, SF = Service Fabric

Configuration

  • Functions - PaaS model, no real OS considerations
  • SF - Must provision up containers. Closer to IaaS

Computing

  • Functions in Consumption Plan – shared space
  • Functions in ASE – dedicated execution zone
  • SF Dedicated scale set

Costs

  • Functions in CP – most likely cheaper – pay per use
  • Functions in ASE – on par or more expensive than SF
  • SF – moderate pricing, requires 5 node min

Developer Experience

  • Functions - fairly easy
  • SF - fairly Complicated

Service Ramp Up

  • Functions CP - easy, no min bar for config. Just deploy function.
  • Functions ASE – takes a bit. Full ASE environ.
  • SF – takes a bit. 5 node minimum

Scaling

  • Functions - Automatic Consumption and ASE
  • SF - Supported

Dialog welcome...

Upvotes: 1

duongthaiha
duongthaiha

Reputation: 855

Service Fabric Actor actual is a stateful service so service fabric will maintain the state for you. Over simplify example: You have a method to add 1 into a variable x start at 0. You call that method twice. When you get x you will get 2 with stateful service.

Whereas Azure function is not. Similar with example above you will get 1 even you call it twice as your state is not maintained.You can actually sharing state as describe here. However it is possible doesnt mean you should do it :-) https://markheath.net/post/sharing-state-between-azure-functions.

Upvotes: 1

Related Questions