Improve the webservice performance
General Considerations
As general rule, capacity planning is very important for the webservice to work as per designed. though tuning the system to its best performance is necessary too. When the work load is more than system could take, it willl inevitably lead to the pool performance. The resource the webservice consuming includes connections and threads. Too many thread will cause the client or server to busy with switching between the threads.
Design Considerations
Check Description
Connections
Check Description
Threading
Check Description
Remarks:
Intermittent burst load could be serious problem for real time application/system. Especially when the system is approach its capacitiy limitations. The webservice might suddenly become slow once a while. At this point of time, accessing the webservice description from web browser become slow suddenly too, which can be used as an indicator that the webservice is expriencing a burst load.
One Way (Fire and Forget) Communication
Check Description
Asynchronous Web Methods
Check Description
Asynchronous Invocation
Check Description
Asynchronous Invocation involves creating extra working thread. As result, the clients might become very busy with switching between threads, and also occupying the connections to the target servers. Asynchronous invocation of webservice might not suitable with calling the webservice on a continuous basis. For the later, limit the number of calling thread is necessary. However, it doesn't mean that you should resort to synchronous invocation causing responsiveness issue, a queue (buffer) which is used to synchronize slow device and fast process could be the solution.
Timeouts
Check Description
WebMethods
Check Description
Serialization
Check Description
Caching
Check Description
State Management
Check Description
As general rule, capacity planning is very important for the webservice to work as per designed. though tuning the system to its best performance is necessary too. When the work load is more than system could take, it willl inevitably lead to the pool performance. The resource the webservice consuming includes connections and threads. Too many thread will cause the client or server to busy with switching between the threads.
Design Considerations
Check Description
- Design chunky interfaces to reduce round trips.
- Prefer message-based programming over remote procedure call (RPC) style.
- Use literal message encoding for parameter formatting.
- Prefer primitive types for Web service parameters.
- Avoid maintaining server state between calls.
- Consider input validation for costly Web methods.
- Consider your approach to caching.
- Consider approaches for bulk data transfer and attachments.
- Avoid calling local Web Services.
Connections
Check Description
- Configure the maxconnection attribute.
- Prioritize and allocate connections across discrete Web services.
- Use a single identity for outbound calls.
- Consider UnsafeAuthenticatedConnectionSharing with Windows Integrated Authentication.
- Use PreAuthenticate with Basic authentication.
Threading
Check Description
- Tune the thread pool using the formula for reducing contention.
- Consider minIoThreads and minWorkerThreads for intermittent burst load.
Remarks:
Intermittent burst load could be serious problem for real time application/system. Especially when the system is approach its capacitiy limitations. The webservice might suddenly become slow once a while. At this point of time, accessing the webservice description from web browser become slow suddenly too, which can be used as an indicator that the webservice is expriencing a burst load.
One Way (Fire and Forget) Communication
Check Description
- Consider using the OneWay attribute if you do not require a response.
Asynchronous Web Methods
Check Description
- Use asynchronous Web methods for I/O operations.
- Do not use asynchronous Web methods when you depend on worker threads.
Asynchronous Invocation
Check Description
- Consider calling Web services asynchronously when you have additional parallel work.
- Use asynchronous invocation to call multiple unrelated Web services.
- Call Web services asynchronously for UI responsiveness.
Asynchronous Invocation involves creating extra working thread. As result, the clients might become very busy with switching between threads, and also occupying the connections to the target servers. Asynchronous invocation of webservice might not suitable with calling the webservice on a continuous basis. For the later, limit the number of calling thread is necessary. However, it doesn't mean that you should resort to synchronous invocation causing responsiveness issue, a queue (buffer) which is used to synchronize slow device and fast process could be the solution.
Timeouts
Check Description
- Set your proxy timeout appropriately.
- Set your ASP.NET timeout greater than your Web service timeout.
- Abort connections for ASP.NET pages that timeout before a Web services call completes.
- Consider the responseDeadlockInterval attribute.
WebMethods
Check Description
- Prefer primitive parameter types.
- Consider buffering.
- Consider caching responses.
- Enable session state only for Web methods that need it.
Serialization
Check Description
- Reduce serialization with XmlIgnore.
- Reduce round trips.
- Consider XML compression.
Caching
Check Description
- Consider output caching for less volatile data.
- Consider providing cache-related information to clients.
- Consider perimeter caching.
State Management
Check Description
- Use session state only where it is needed.
- Avoid server affinity.

0 Comments:
Post a Comment
<< Home