Wednesday, January 05, 2011

[WCF]WCF performance testing information share

PerfGoals
Check the application design for potential synchronous and asynchronous operations
Check the application design for WCF binding configurations
Determine the optimal service throttling settings for the application
Measure the WCF services' ServiceContract (methods) throughput and response times (server and client end)
Calls Per Second
Call Duration      
Check if the application topology is scaled out by deploying them into a load balanced server farm
Execute both end to end and component level performance tests

PerfTesting
WCF service hosted in IIS (using certificates)
In VSTS solution, Add Service Reference to WCF service.  After you enter web address where service is hosted, you see list if services that can be found at the selected web address. Each service might contain multiple service contracts and/or endpoints. The operations displays a list of operations (methods) that are available for each service contract.
App.config is added to the solution consisting of service bindings and endpoints
If the application uses client certificates, you would install the cert and update the thumprint in the app.config
    <system.serviceModel>
       <behaviors>
       <endpointBehaviors>
         <behavior name="ClientCredentialsBehavior">
           <clientCredentials>
             <serviceCertificate>
               <authentication certificateValidationMode="PeerTrust" revocationMode="NoCheck"/>
             </serviceCertificate>
             <clientCertificate findValue="7e cd 30 4a 60 af 6f e5 e9 03 8f 4e 51 7d 8b bd cd 48 c7 29"
                                storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint"/>
           </clientCredentials>
Read more: Steven Cheng's MSDN Notes