8
Whitepaper The Top 10 Tips to Improve Web Application Performance Whitepaper

SOASTA Top10 tips to improve web application performance

Embed Size (px)

DESCRIPTION

The Top 10 tips to improve web application performance

Citation preview

  • Whitepaper

    The Top 10 Tips to Improve Web Application Performance

    Whitepaper

  • Testing for the Lifecycle ....................................................................................................................................3

    Tip No. 1: Bandwidth: Make Sure Everyone Can Get In .........................................................................4

    Tip No. 2: Load Balancing: Make Sure Everyone Pulls Their Weight ..................................................4

    Tip No. 3: Watch for Application Issues ........................................................................................................4

    Tip No. 4: Measure Database Performance ................................................................................................5

    Tip No. 5: Assess Your Architecture ...............................................................................................................5

    Tip No. 6: Ensure Proper Connectivity .........................................................................................................6

    Tip No. 7: Dont Overlook Configuration Settings ...................................................................................6

    Tip No. 8: Watch Out for Shared Environments ........................................................................................7

    Tip No. 9: Verify Third-Party Services ............................................................................................................7

    Tip No. 10: Create a Performance Culture ...................................................................................................7

    Get Started Today ................................................................................................................................................8

    About SOASTA, Inc. .............................................................................................................................................8

    SOASTA, Inc.

    Table of Contents

    Top 10 Tips to Improve Web Application Performance | 2

  • SOASTA, Inc. Top 10 Tips to Improve Web Application Performance | 3

    In labs around the world, development and testing teams face relentless pressure to ensure the software they create can deliver the uncompromising performance that users expect and demand. And in many organizations, that can encompass a globally distributed operation, requiring worldwide collaboration throughout the entire software development lifecycle.

    Thats why its essential to performance-test your applications at every step of the way from the test lab to the production environment. Some issues, such as third-party services, content-delivery networks, and bandwidth constraints, will only manifest themselves in a production environment not in a test lab or staging environment.

    The following white paper describes the top 10 issues that development and testing teams should consider in their efforts to bring greater depth and breadth to their testing efforts and to derive the maximum performance from their Web applications.

    Note that these issues can be viewed in the context of the companys overall software architecture. From an internal infrastructure perspective, the issues to consider involve bandwidth, load balancing, application code, and database intricacies. At the perimeter of the infrastructure, we will examine architecture issues, connectivity, configuration settings, shared environments, and third-party services. Underpinning it all: a thorough understanding of the culture and mindset that must be instilled and ever-present across the entire development organization.

    Testing for the Lifecycle

  • SOASTA, Inc. Top 10 Tips to Improve Web Application Performance | 4

    Tip No 1. Bandwidth: Makes Sure Everyone Can Get InBandwidth is one of the most common issues that impacts load testing. While you may have planned carefully for the bandwidth your application will need to generally sustain and maintain a proper user experience, what happens when you experience surges in traffic? When a peak shopping season arrives (think: Cyber Monday), when high-interest media-intensive content draws thousands of simultaneous users, or when a social media campaign pulls in prospects do you have a pipe thats big enough for the traffic youll see? Whether you have a broad site with thousands of pages or a simple site for a small company, its difficult to test at full scale.

    One key to pay attention to: the use of unnecessarily large high-res files. For instance, one large beauty shot of a popular retail item can be a pointless bandwidth hog that disrupts the desired user experience. Or a jittery video can turn off would-be buyers. If youre operating on a global basis, users can arrive from different countries that have low bandwidth, making efficient performance more important than ever.

    Those slow connections as well as varying wireless conditions now also extend to mobile devices where carrier speeds can be notoriously finicky. One strategy to account for this variablility is to design your mobile and desktop apps differently. This means that those mobile apps, even when they share infrastructure with web apps, need to be performance tested differently. Understanding your customers and how they are assessing your site is critical, and testing plans must accomodate for mobile traffic and impact.

    Tip No 2. Load Balancing: Make Sure Everyone Pulls Their WeightOver the years, SOASTA has conducted tens of thousands of tests and logged more than 1 million hours in the cloud. In a majority of instances, load balancing issues emerge as a consistent impediment to proper performance. Load balancers, of course, can be very complex devices presenting at least 15 different algorithms and countless permutations per environment.

    SOASTA CloudTestss ability to simultaneously monitor all back-end systems and infrastructure during the load test makes it easy to quickly identify resources that arent being used to maximum capacity. After youve identified those resources, adjust your load-balancing algorithm and retest to confirm youre deriving the expected utilization from each of those resources.

    And if you didnt configure it yourself, the lack of visibility makes load balancing even more of a black-box mystery. At a minimum, make sure you monitor and track your load balancers, looking specifically at CPU and memory consumption and SSL transactions.

    Tip No 3. Watch for Application IssuesIts the inescapable reality and truth of all software development: Theres no such thing as perfect code. And that means that everything in your app should be tested to find inefficient code, synchronization issues, code thats locking or blocking other functions (e.g. an e-commerce ordering system that can only process one order at the time) garbage collection memory leaks, or application deadlocks that bring your code to a standstill.

    Configuring the application is a critical piece of improving the performance of your Web application. This problem often manifests itself through page errors or response codes indicating missing resources or incorrect domains. Be vigilant for these errors when youre migrating your application from development to production. Back-end monitors can help identify latency and imbalanced CPU utilization, which can indicate application-configuration issues that must be addressed.

  • SOASTA, Inc. Top 10 Tips to Improve Web Application Performance | 5

    Tip No 4. Measure Database PerformanceWhen was the last time you directly stress-tested your database? As your Web application grows more complex and you begin to store more information about your users, your database will slow down if you havent optimized for your changing environment. For instance, make sure you generate and refresh indexes for all tables. Regularly review your SQL queries and statements to ensure optimum efficiency (and avoid returning too much or too little data). Monitor the memory usage as well as the connections into and out of the database.

    You also want to ensure your database locks by rows and not entire tables. One SOASTA customer had configured its order processing system to lock an entire order table when an order was being processed instead of merely locking the row. Under low volumes this wouldnt have a meaningful impact on performance. But as the company experienced higher volumes and concurrent orders, errors, timeouts and performance issues started to become disruptive. Once the customer identified the particular types of transactions that were failing at such a high rate (in this case ordering transactions), it quickly corrected the database configuration and experienced a significant performance improvement.

    SOASTA lets you directly load-test databases by defining database connection parameters and creating SQL statements to perform create, update, insert, and modify operations. This load testing lets you immediately and clearly understand the capacity and performance of your databases. You can even use this process/technique in a presales evaluation to compare alternative DBMSs and choose the one that maximizes performance and capacity.

    Finally, beware of the unrestricted, unmanaged growth of data in your databases. Many companies are finding it advantageous to implement careful data lifecycle programs that balance the sometimes-conflicting needs to compress and archive less-frequently used data with the need for optimal responsiveness for more current data.

    Tip No 5. Assess Your ArchitectureOn the perimeter of the corporate software infrastructure, its essential to factor in architectural considerations. Unbalanced tiers, mismatched technology choices, scalability limitations, suboptimal designs, and inefficient network configurations can all ultimately manifest themselves in poor application performance. With proper testing in place, you can bring these issues to the surface before they impact the user experience.

    As your application infrastructures ages and becomes increasingly complicated, its more difficult infrastructure for the various tests you conduct. SOASTA CloudTest serves as a central repository for all testing assets and information, including high-level information about CPU and memory settings. This means you can see and compare the configuration of the participant systems from the current load test vs. previous tests.

    For instance, are your servers optimally and fairly balanced? Its an issue that presents some subtle points to consider. A typical round robin load balancing might attempt to apportion work equally across all the servers in a cluster. However, if the servers in that cluster arent identical say, some servers are older, arent up-to-date on their patches, or are equipped with fewer/older CPU/memory resources, you wouldnt want the work assigned on a strict round-robin basis. Youd want the more capable servers to receive a greater share of the processing load.

  • SOASTA, Inc. Top 10 Tips to Improve Web Application Performance | 6

    Tip No 6. Ensure Proper ConnectivityConnectivity is a crucial factor in Web application performance. How many connection points does your Web application have at the present time? Are you planning to revise, update, or change those connection types? If so, you want to have a clear understanding of happens to those applications when you make those proposed changes.

    SOASTA CloudTest visually displays the actual traffic from your Web and mobile applications to provide an accurate representation of resource utilization from various domains. It even provides detailed information around those resources during the load test, such as connection times, DNS lookup times, and HTTPS handshake times.

    For instance, there could be latency issues among various systems, as well as firewall capacity or DNS routing issues. Its a best practice to provide redundancy or failover for critical systems and that requires full testing as well. Finally, there could be varying performance profiles, such as mobile networks vs. LAN connections.

    Tip No 7. Dont Overlook Configuration SettingsConfiguration settings may be easy to overlook (and both tiresome and repetitive to deploy across countless environments), but its essential that we dont settle for out-of-the-box defaults. The right configurations help improve performance (and strengthen security, to boot). Make sure you tune all environments from lab to staging to production, and apply those settings on a consistent basis.

    And as your infrastructure becomes more complex and diverse, its increasingly difficult to confirm that the infrastructures in your test, development, and QA environments are, in fact, identical. One helpful technique is to baseline the testing environment. Run a reference load test on the infrastructure and run that same load test on another environment (or on the same environment at a different time). This will help you confirm youre getting the same results before you move forward with any code changes or identify areas where you can improve performance without making any code changes at all.

    SOASTA CloudTest makes it easy to compare testing results to ensure configuration settings are applied consistently across multiple environments. SOASTA CloudTest provides a central repository of all of your testing results. In a few clicks, you can see a results comparison from two or more systems / tests.

  • SOASTA, Inc. Top 10 Tips to Improve Web Application Performance | 7

    Tip No 8. Watch Out for Shared EnvironmentsWith many major sites employing complex architectures, you must be fully aware of all of the shared environments that can impact your applications performance. Its critical to not only communicate with stakeholders, but also be cognizant of your internal partners who share the same technical resources.

    For instance, in one recent test, a major retailer encountered this exact problem during Cyber Monday its peak sales day of the year. The site was unexpectedly unavailable to meet traffic demand and the company was forced to turn away crucial business. The error was still unidentified after 3 days, and another peak sales day was approaching.

    Through a series of quickly deployed load tests in the production environment, the culprit was identified: a lowly batch job that was reporting against the same database. After the batch job was rescheduled, the site was able to meet capacity goals for its next spike - which happened one week later. This is a great example of how on-demand testing services can jump on an issue to run tests, analyze results, and identify and resolve issues - quickly.

    Tip No 9. Verify Third-Party ServicesMany websites rely on third-party providers that connect to the site to provide additional data and crucial services, such as Google Analytics, credit card processing, or social-media widgets. These third-party services sit outside your architecture, but you must include them in your test plans because they have a direct impact on your Web application performance. The solution is rooted in end-to-end testing from the lab/development to pre-production staging to production.

    SOASTA CloudTest breaks down transactions by different domains so that can easily differentiate the response times and error rates coming from third-party systems.

    In one instance, a retailer experienced a significant failure from a rather unexpected source. The company was testing its site up to a very high capacity. Over the series of tests, the site, indeed, reached its target capacity, but when running test purchase transactions, the third-party payment processing system wasnt able to handle the load. The solution was to work with this third party partner to increase their capacity so the overall system could meet its volume goals.

    Tip No 10. Create a Performance CultureAll of the proper testing the world wont make a difference if your organization lacks a performance-centric culture. By emphasizing the importance of performance in all areas of your company, you can better plan, develop, and release a high-performing Web application. Ultimately, you want your processes and habits to be ingrained and oriented to finding and resolving issues identified in this paper.

    That starts with identifying who owns Web performance metrics in your organization. Empower that individual or team to gain the expertise they need and acquire the tools needed to execute a comprehensive, end-to-end test plan.

    SOASTA CloudTest has no geographic licensing restrictions and includes all HTTP protocols - Web, Web services, JSON, AMF, and AJAX. An easy Web interface makes it easy for users in distributed locations to open a browser and create clips, run tests, or review results.

    Company-culture barriers such as internal non-technical issues - can inhibit the organization from performing the proper levels of load testing they need. Sometimes, it stems from legacy load testing tools were previously licensed and implemented. They place geographic licensing. Or they charge additional fees for each incremental protocol you add such as AJAX or AMF. And they often involve a very heavy client installation that present unwelcome headaches for installation, deployment, and maintenance.

  • Connect with us: TEST FASTER. RELEASE SOONER.

    2013 SOASTA. All rights reserved. SOASTA, the SOASTA logo, SOASTA CloudTest, SOASTA TouchTest and SOASTA mPulse are trademarks of SOASTA. All other product or company names may be trademarks and/or registered trade-marks of their respective owners.

    Headquarters 650-210-4950 444 Castro St, Fourth Floor Mountain View, CA 94041 FAX: 650-210-4957

    To learn more visit:soasta.com or email us at [email protected]

    EMEA +44 (0)1753 752375 Thames Court 1 Victoria Street Windsor, Berkshire SL4 1YB

    ASIA Room 11/12 25/F Central Plaza No.381 HuaiHai Middle Road Shanghai, China, 200000

    Get Started TodayFind out more about how SOASTA cloud-testing solutions can dramatically improve the performance of your Web applications. Get started for free by visiting http://soasta.com/free or email us at [email protected].

    About SOASTASOASTA is the leader in cloud testing. Its web and mobile test automation and monitoring solutions, SOASTA is the leader in cloud testing. Its web and mobile test automation solutions, SOASTA CloudTest and SOASTA TouchTest, and SOASTA mPulse, enable developers, QA professionals and IT operations teams to test and monitor users with unprecedented speed, scale, and precision, and visibility. The innovative product set streamlines test creation, automates provisioning and execution, and analyzes real user behavior in real time distills analytics to deliver actionable intelligence faster. With SOASTA, companies can have confidence that their applications will perform as designed, delivering quality user experiences every timeeven in peak traffic. SOASTAs customers are many of todays most successful brands including Avaya, American Girl, Bonobos, Backcountry.com Chegg, Experian, Gilt Groupe, Hallmark, Intuit, Microsoft, and Netflix. SOASTA is privately held and headquartered in Mountain View, Calif. For more information about SOASTA, please visit http://www.soasta.com.