Home > .NET 2.0 > Performance and Scalability Issues

Performance and Scalability Issues

February 4th, 2008 admin

The main issues that can adversely affect the performance and scalability of your Web services are summarized below

. Subsequent sections in this paper provide strategies and technical information to prevent or resolve some of these issues.

  • Chatty calls.
  • Network roundtrips to and from a Web service can be expensive. This issue is magnified if clients need to issue multiple requests to a Web service to complete a single logical operation.

  • Improper choice of parameters.
  • Your choice of parameters depends upon various factors such as interoperability, the varying platforms used by the clients, maintainability, and the type of encoding format used and so on. Improper choice of parameters can lead to a number of issues including increased serialization costs, and potential versioning problems for the Web service. Where possible you should always prefer to use primitive types. If interoperability is not an issue avoid using the XmlElement and XmlDocument types and prefer types specific to your application like an Employee or Person class.

  • Serialization.
  • Serializing large amounts of data and passing it to and from Web services can cause various performance related issues including network congestion, and excessive memory and processor overhead.

    Other issues that affect the amount of data passed across the wire include improper data transfer strategies for large amounts of data. Selecting an appropriate data transfer strategy such as using DIME attachments, or offloading data transfer to other services is critical to the performance of your Web service solution.

  • Improper choice of encoding format.
  • The choice of encoding format at a conceptual level is deciding between the message-style and data-style communication. They map to SOAP-document and SOAP-RPC style encoding format respectively for Web services.

    The data-style encoding involves more SOAP-processing overhead and involves lots of XML parsing whereas message-style encoding involves comparatively less overhead.

    Choosing the right encoding format can significantly affect performance of your Web service. The choice of encoding format depends upon various factors including the type of client platform, desired data contract between the clients and the Web service, network considerations and so on.

  • Lack of caching or inefficient caching.
  • In many scenarios, application or protocol level caching can improve Web service performance. Some caching related issues which can significantly impact Web service performance include failure to use caching for Web methods, caching too much data, caching inappropriate data, and inappropriate expiration settings.

  • Inefficient state management.
  • Inefficient state management design in Web services can lead to scalability bottlenecks due to overloading the server with state information that needs to be maintained on per user basis. Some common pitfalls for Web service state management include using stateful web methods, using cookie-container based state management, and choosing an inappropriate state store.

  • Inefficient Web method processing.
  • A common example of inefficient processing is not validating input upfront with a schema. This issue can be significant because the Web method may end up de-serializing the incoming message and then throwing exceptions later on while processing the input data.

Categories: .NET 2.0 Tags:
Comments are closed.