Skip to content

geeksarray/how-per-call-service-instance-works-in-wcf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How Per Call Service Instance works in WCF

This article helps you to understand how per call WCF service works and how its instances get created. This article will also go through a tutorial for implementing and executing Per Call WCF Service.

How instances are created in WCF Per Call Service mode?

A WCF service configured as InstanceContextMode.PerCall will create a dedicated instance for each request irrespective of existing or new client. It does not save any client data in service memory. Once service returns response to client, instance get disposed.

When and why InstanceContextMode.PerCall

  1. If your service needs to be stateless and scalable.
  2. Your service must have light weight or none initialization execution.
  3. PerCall services are single threaded.
  4. PerCall services are highly scalable. Server crash affects to only current ongoing instance and its execution, next calls will be routed to another server.
  5. PerCall services are less expensive than PerSession services as only those objects will be in service memory for whose client call is in process.

For more details on implementation please visit - WCF Per Call Service

WCF Per Call Service - It is a WCF Service with configuration to create a new instance of service on every request.

WCF Service Client app - Console application that consumes WCF service.

Following diagram explains how per call service creates instance of WCF service and destroy after it's use.

WCF Per call service execution

About

This article helps you to understand how per call WCF service works and how its instances get created. This article will also go through a tutorial for implementing and executing Per Call WCF Service.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages