1 CS6320 – Web Services and Performance L. Grewe
Web Services Services available via the Internet that complete tasks or conduct transactions. Services available via the Internet that complete tasks or conduct transactions. Self-contained, modular applications that can be described, published, and invoked over the Internet. Self-contained, modular applications that can be described, published, and invoked over the Internet. Can be automatically invoked by application programs. Can be automatically invoked by application programs.
Web Services May be invoked at one site or may combine results of several services executed at different sites. May be invoked at one site or may combine results of several services executed at different sites.
Performance concerns differ from standard Client/Server May involve both web service processing and network delays May involve both web service processing and network delays May be accessed by wide variety of devices -- desktop computers, PDAs, mobile phones, other servers May be accessed by wide variety of devices -- desktop computers, PDAs, mobile phones, other servers Access via wireless communication networks: dynamic connectivity, low bandwidth, high latency Access via wireless communication networks: dynamic connectivity, low bandwidth, high latency
Performance concerns differ from standard client/server Undpredictable nature of requests Undpredictable nature of requests Highly burstyHighly bursty Varies with geographical location of clients, day of week, time of dayVaries with geographical location of clients, day of week, time of day Highly variable size of requested objects Highly variable size of requested objects “Robot” access “Robot” access Autonomous software agents that can consume significant amounts of system resourcesAutonomous software agents that can consume significant amounts of system resources
Types of servers providing Web Services Web servers Web servers Transaction servers Transaction servers Proxy servers Proxy servers Cache servers Cache servers Wireless gateway servers Wireless gateway servers Mirror servers Mirror servers
Common problems Insufficient bandwidth at peak times Insufficient bandwidth at peak times Overloaded servers Overloaded servers Uneven server loads Uneven server loads Delivery of dynamic content Delivery of dynamic content Shortage of connections between application servers and database servers Shortage of connections between application servers and database servers Failure of third-party servers Failure of third-party servers Delivery of multi-media content Delivery of multi-media content
Example: Bill Paying Service Portal offers bill paying service Portal offers bill paying service Customers can pay variety of bills through the service Customers can pay variety of bills through the service Uses services provided by others: Uses services provided by others: Debit authorization (100 tps capability)Debit authorization (100 tps capability) Electronic funds transferElectronic funds transfer Customer authenticationCustomer authentication
Example: Bill Paying Service
Portal B is bill paying service Portal B is bill paying service Treat overall web service as ‘system’ Treat overall web service as ‘system’ Treat component services as ‘devices’ Treat component services as ‘devices’ What is the capacity of B, given that the debit authorization service can support 100 tps and that each payment transaction requires 2 visits to the authorization service …..answer 50tps. (this assumes that the authentication is the slowest device). What is the capacity of B, given that the debit authorization service can support 100 tps and that each payment transaction requires 2 visits to the authorization service …..answer 50tps. (this assumes that the authentication is the slowest device).
Review – web service can return many kinds of Web (HTTP) content
Perception of Performance User view: User view: Fast response time; no connections refusedFast response time; no connections refused Management view: Management view: High throughput; high availabilityHigh throughput; high availability Need to have quantitative measurements that describe behavior of Web service Need to have quantitative measurements that describe behavior of Web service
Metrics Two most important; Two most important; Response time -- secondsResponse time -- seconds Throughput -- http_ops/sec, also bits/secThroughput -- http_ops/sec, also bits/sec
Other metrics Hit Hit any connection to a web site, including in-line requests and errorsany connection to a web site, including in-line requests and errors difficult to compare across sitesdifficult to compare across sites Visit Visit Series of page requests by a user at a single siteSeries of page requests by a user at a single site Inter-request times < timeout_valueInter-request times < timeout_value Session Session Series of consecutive and related requests made during a single visitSeries of consecutive and related requests made during a single visit Inter-request times < timeout_valueInter-request times < timeout_value
Other metrics User-perceived response time User-perceived response time Set of geographically distributed agents poll the WSSet of geographically distributed agents poll the WS Error rate Error rate Increase indicates degrading performanceIncrease indicates degrading performance Examples:Examples: Overflow of pending connection queue Overflow of pending connection queue For streaming services: For streaming services: JitterJitter Startup latencyStartup latency
Most common measurements of Web service performance End-to-end response time End-to-end response time Site response time Site response time Throughput (req/sec or transactions/sec) Throughput (req/sec or transactions/sec) Throughput (Mbps) Throughput (Mbps) Errors/sec Errors/sec Visitors/day Visitors/day Unique visitors/day Unique visitors/day
Example - Travel Agency Monitor for 30 minutes: Monitor for 30 minutes: 9000 HTTP requests9000 HTTP requests Three types of objects delivered:Three types of objects delivered: Html pages (30%, avg. size 11,200 bytes) Html pages (30%, avg. size 11,200 bytes) Images (65%, avg. size 17,200 bytes) Images (65%, avg. size 17,200 bytes) Video clips (5%, avg. size 439,000 bytes) Video clips (5%, avg. size 439,000 bytes) What is the throughput: What is the throughput: 9000 requests/1800 sec = 5 req/sec9000 requests/1800 sec = 5 req/sec What is the throughput in Kbps?What is the throughput in Kbps?
Throughput in Kbps? X r = (total_req * class% * avg. size)/time X r = (total_req * class% * avg. size)/time X html = (9000 * 0.30 * 11,200*8)/1800 = X html = (9000 * 0.30 * 11,200*8)/1800 = X image = (9000 * 0.65 * 17,200*8)/1800 = X image = (9000 * 0.65 * 17,200*8)/1800 = X video = (9000 * 0.05 * 439,000*8)/1800 = X video = (9000 * 0.05 * 439,000*8)/1800 = X 0 = X 0 = X 0 = Kbps X 0 = Kbps To support the Web traffic, the network connection should be at least a T1 line ( Mbit/s ). Mbit/s
QoS indicators for Web Services Response time Response time Availability Availability Percentage of time a service is ‘live’ (serving customer requests)Percentage of time a service is ‘live’ (serving customer requests) Reliability Reliability Probability that WS will perform in satisfactory manner for a given period of time under specified operating and load conditionsProbability that WS will perform in satisfactory manner for a given period of time under specified operating and load conditions Predictability Predictability Cost Cost
Input data needed to monitor QoS Traffic Traffic Performance Performance Usage patterns Usage patterns Knowledge of average and peak load Knowledge of average and peak load