we always start on performance after completing the development of WCF service. but there are some points which we should remember to have hige performance WCF service.
below are some points which can help you in increasing the performance of WCF service :
- choose carefully between singleton instance and per call instance.
- if you have like 100 users hitting your wcf service simultaneously use per call instance as this will give you best result.
- problem with singleton instance is with concurrency. we faced this issue in one of our wcf service.
- response time decreased from 120 ms to 80ms :O wooow
- use tracing to find out which method is taking maximum time and try to minimize that.
- Make sure to use web service throttling. you can find a lot of articles on web service throttling, but in my case it didn't work as expected though it is very useful.
- try to minimize the database hits . use caching to get configuration . surely this is going the increase wcf service's performance a lot.
- if you are using logging or trying to log the request and response message do it in a sync way.
- always free the objects as soon those are not required .
No comments:
Post a Comment