简体   繁体   中英

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?

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 .

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM