Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cranking It Up: Web Performance Gains in NetSui...

Cranking It Up: Web Performance Gains in NetSuite 17.1 - SuiteWorld 2017

Presented at SuiteWorld 2017 in Las Vegas, Nevada.

With the release of NetSuite 17.1 comes several exciting new features that can give your website massive performance gains. In this session, we’ll look at these new features and show you how to leverage them to dramatically improve the speed of your website. We'll also look at some of the most common performance problems that we encounter when optimizing SuiteCommerce Advanced websites, and show you how to diagnose and remedy these problems for yourself.

Diego Cardozo

April 25, 2017
Tweet

More Decks by Diego Cardozo

Other Decks in Technology

Transcript

  1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    2 CRANKING IT UP: WEB PERFORMANCE GAINS IN NETSUITE 17.1 Jeff Binder, Head of Commerce Performance & Scalability, Oracle + NetSuite Diego Cardozo, Sr. Web Performance Engineer, Oracle + NetSuite Mark Sweeting, Sr. Web Performance Engineer, Oracle + NetSuite April 25, 2017 NEXT STARTS NOW
  2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    4 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    5 AGENDA – PERFORMANCE 5 1 Benchmarks and updates 2 Improvements in 17.1 3 Performance checklist 4 Common problems and solutions 5 Services
  4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    6 PERFORMANCE STANDARDS INDUSTRY BENCHMARKING
  5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    7 NETSUITE 2016 PERFORMANCE STANDARDS 3,5 1,5 1,5 2 3 2 1 5 4 4 1 1 3 1 2 0 2 4 6 Seconds
  6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    8 NETSUITE INDUSTRY INDEX (Q3, 2016) STRICTLY CONFIDENTIAL. DO NOT DISTRIBUTE.
  7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    9 STRICTLY CONFIDENTIAL. DO NOT DISTRIBUTE.
  8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    10 STRICTLY CONFIDENTIAL. DO NOT DISTRIBUTE.
  9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    11 STRICTLY CONFIDENTIAL. DO NOT DISTRIBUTE.
  10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    12 PERFORMANCE IMPROVEMENTS PRODUCT / PLATFORM
  11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    13 PERFORMANCE IMPROVEMENTS IN 2017.1 1. Single domain shopping and checkout over HTTPS 2. MatrixChildDetails & Related Item custom fieldsets 3. The ability to turn user event scripts on/off in webstore 4. Performance improvement for larger carts
  12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    16 WITHOUT MATRIX CHILD DETAILS - FIELDSET Items API call: http://advanced.localhostloopback.com/api/items?q=iphone&fieldset=itemssearcher Notice that all the fields returned for Matrix Child Items are from the default Matrix Child Items Related Field Set
  13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    17 WITH MATRIX CHILD DETAILS - FIELDSET Items API Call: http://advanced.localhostloopback.com/api/items?q=iphone&fieldset=itemssearcher&matrixchilditems_fieldset=searchmatrix Notice that there are fewer fields returned, and all the fields returned for Matrix Child Items are from newly created Related Field Set “Search Page Matrix Child Items”. With fewer fields to return per matrix child item, the page will load faster.
  14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    18 TURNING OFF SCRIPTS IN SCA/SCIS: 3. The ability to turn user event scripts on/off in webstore:
  15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    20 PERFORMANCE IMPROVEMENTS COMING UP Please note: “The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle Corporation.” 1. Support for HTTP2 for SuiteCommerce 2. Merge Shopping, Checkout and My Account into one SPA 3. Faster SEO Engine 4. Faster Item API based on Elastic instead of SOLR
  16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    22 CHECKLIST •It is not just about what we can do for you •You can have an enormous positive impact in your own performance •We built the following checklist to help you out −You can evaluate your own website performance −Identify and tackle common performance problems •https://developers.suitecommerce.com/performance
  17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    23 • 40+ page guide on performance tuning that follows the checklist structure CHECKLIST • 1 page checklist that summarizes all the important action items
  18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    25 COMMON PROBLEMS •Searching for a product is slow •Slow home page load •Navigating directly into inner pages is slow •Adding a product to the cart is slow •Proceeding to checkout is slow •Placing an order is slow
  19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    26 SEARCHING FOR A PRODUCT IS SLOW • We need to understand how search works in order to understand why it is slow • A SolR query is ran on the application server, which indicates which items are to be returned • A database query is ran on the database server, which returns data for those items • We can see those timings the timings using the following parameter: &ssdebug=T Browser SolR Database query
  20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    27 SEARCHING FOR A PRODUCT IS SLOW 1. Open request on chrome dev tools 2. Add &ssdebug=T parameter SoLR = 325 ms SQL = 2.5 s
  21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    28 SOLUTION – REMOVE UNUSED FIELDS Item (24) Item Data Related Items (30) Custom Fields Item Data, Stock Info, Images • itemid • internalid • displayname • ispurchasable • quantityavailable • isbackorderable • isinstock Stock Info Images Pricing Info • onlinecustomerprice • onlinecustomerprice_formatted • priceschedule
  22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    29 SOLUTION – REMOVE UNUSED FIELDS Item (24) Item Data Related Items (30) Custom Fields • ispurchasable • quantityavailable • isbackorderable • isinstock Stock Info Images Pricing Info • onlinecustomerprice • onlinecustomerprice_formatted • priceschedule
  23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    30 SOLUTION – REMOVE UNUSED FIELDS • 84% reduction in download time, from 7.7 seconds to 1.3 seconds • 98% reduction on payload size, 126 KB to 3 KB
  24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    31 • Problem 1: Bootstrap the whole application −shopping.ssp −shopping.environment.ssp −shopping.user.environment.ssp −Live.Order.ss • Problem 2: Load the whole home page on top −JS −CSS −Images −Fonts SLOW HOME PAGE LOAD SINGLE PAGE APPLICATION
  25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    32 SOLUTION FOR PROBLEM 1 - ENVIRONMENTS •shopping.user.environment is blocking but non-cacheable −Only user-specific content should be found here •shopping.environment.ssp is blocking but cacheable −Bootstrap information here, but only if it is needed on all pages −If the information is not needed on all pages, you should retrieve it on demand −Make sure that categories are lightweight for Shopping −We will mention how categories affect Checkout later
  26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    33 CATEGORIES •Design your category structure for performance and usability •Golden rules for blazingly fast categories: −Your category tree shouldn’t be deeper than 3 levels −Each product should be assigned to a single category
  27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    35 SOLUTION FOR PROBLEM 2 - CONTENT OPTIMIZATION According to the HTTP Archive, total page size and number of requests have the highest bearing on the time it takes a page to download and render. ➢ Average homepage size: 2.5 MB ➢ Average number of requests: 101 These numbers are particularly critical for mobile users, where download speeds and roundtrip latencies can be quite poor. Source: http://httparchive.org/interesting.php (7 Mar 2017)
  28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    36 CONTENT OPTIMIZATION •Last year we talked about how faster websites sell more •Every extra byte or request has a COST •Ask yourself some difficult questions. •Can you attribute a dollar-value upside to every page component? If not, how can you justify each one? •REMOVE anything that has no measurable value, or that doesn’t have a business purpose.
  29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    37 CONTENT OPTIMISATION: CAROUSEL EXAMPLE 5 seconds 5 seconds 5 seconds
  30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    39 CONTENT OPTIMIZATION: IMAGES • Average Image bytes on page: 1.6 MB (66% by weight) • Image optimization is easily overlooked (often not owned) • Easily fixed - add it to your image work flow as final step before loading into Netsuite file cabinet • Use the correct image format: JPG for photos, PNG for logos and graphics. Avoid GIF. • Don’t scale images in the browser, unless you have good reason to do so. • Compress your images • Consider using imager.js (https://github.com/BBC- News/Imager.js)
  31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    40 CONTENT OPTIMIZATION: REDUCE, REUSE, RECYCLE Source: http://requestmap.webperf.tools
  32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    42 Popularity Products NAVIGATING DIRECTLY INTO INNER PAGES IS SLOW •Problem 1: SEO Page Generator −Errors −Delays −Upcoming: new SEO engine •Problem 2: We cannot always rely on cache hits for PDPs −There are usually thousands of them, many may be seldom visited
  33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    43 SOLUTION – DEBUG THE SEO ENGINE • Add seodebug=T as a parameter to the URL and view source • Error logs, and detailed breakdown on weight, loading time and memory consumption for each asset
  34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    44 SOLUTION – EXCLUDE CONTENT FROM SEO ENGINE •You can wrap functionality under the following snippet, which will prevent it from executing on the SEO Engine •Example: third parties, widgets in PDP, correlated items
  35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    45 SOLUTION - CDN: SETUP SuiteCommerce Advanced comes with Akamai support out of the box. Requires two configuration actions: 1. Create a CNAME pointing at your Netsuite “CNAME Alias” 2. Tick the ”Use CDN” checkbox in website set up
  36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    46 SOLUTION - CDN: CHECK YOUR CONFIGURATION Easy to do from command line on Mac/Linux: dig IN A +short www.example.com Three conditions can be identified: 1. CNAME created and CDN enabled 2. CNAME created but CDN not enabled 3. CNAME not created (CDN checkbox has no effect without it) (Or use Akamai debug headers plugin)
  37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    47 SOLUTION - CDN: EXAMPLE 1 - PASS $ dig IN A +short www.example.com www.example.com.hosting.netsuite.com. website-cdn.netsuite.com. website-cdn.netsuite.com.mdc.edgesuite.net. a1168.q.akamai.net. 81.150.22.78 81.150.22.102
  38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    48 CDN: EXAMPLE 2 - FAIL $ dig IN A +short www.example.com www.example.com.hosting.netsuite.com. shopping.netsuite.com. 167.216.129.13 Why? CNAME created, but CDN checkbox not ticked
  39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    49 CDN: EXAMPLE 3 - FAIL $ dig IN A +short www.example.com 64.89.45.13 Why? No CNAME created. A record points straight to Netsuite DC
  40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    50 CDN ENHANCEMENTS •CDN on Checkout – use a vanity domain −e.g. checkout.example.com instead of checkout.netsuite.com −Uses Amazon Cloudfront •Single domain shopping and checkout −Requires HTTPS −Uses Amazon Cloudfront −Opens the gates for HTTP/2
  41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    51 ADDING A PRODUCT TO THE CART IS SLOW •What is scriptable cart? •Parallelism between the back end and the web store Sales Order form  BOGO
  42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    52 ADDING A PRODUCT TO THE CART IS SLOW •What is scriptable cart? −Executes client scripts for the Sales Order record on the web store −Per-website setting −Problem: it executes ALL client scripts
  43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    53 SOLUTION – SCRIPTABLE CART •Customization  Scripting  Scripted Records
  44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    54 SOLUTION – SCRIPTABLE CART •You can exclude client scripts from the web store −If you set execution context to “All Roles”  it executes on the web store −If you set it to “All Employees”  it doesn’t •New feature in 17.1 −The performance of the shopping cart has been enhanced in 17.1 −Evident in larger shopping carts with more than 50 unique items
  45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    55 PROCEEDING TO CHECKOUT IS SLOW •Last year milestone: running shopping and checkout on the same server •This year −Running them on the same domain −Enabling CDN for Checkout •Next year: same .ssp page (no page reload)
  46. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    58 SOLUTION – WHAT DID WE DO? •Removed mini cart – No LiveOrder.Service.ss request −No loading time −No spinning wheel •Removed categories from the environment −Had to remove navigation bar in consequence •If you pay closer attention, you will see that it was gone from checkout steps already •Following these steps makes the page load in less than 4s
  47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    60 ISSUE - PLACING AN ORDER IS SLOW •Customization  Scripting  Scripted Records
  48. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    61 ISSUE - PLACING AN ORDER IS SLOW •Placing an order triggers workflows and user events •New feature in 17.1: User Event script execution context −There is a new option in the deployment called “Execute in Commerce Context” −When this option is not selected, the script will not trigger for events that take place in SCA, SB or SCIS •Setup  Company  Enable Features  Web Presence −Asynchronous AfterSubmit Sales Order Processing
  49. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    62 PERFORMANCE SERVICES CHECKPOINTS, AUDITS, REPORTING AND ALERTING
  50. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    63 PERFORMANCE CHECKPOINT - FAIL 0 2 4 6 8 10 Home Category1 Search Item Add to Mini Cart View Cart Proceed To Checkout Login Shipping Address Shipping Method Payment Seconds www.customerABC.com Good Warning Problem Industry Standards Feb 12 – Feb 18, 2017
  51. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    64 PERFORMANCE CHECKPOINT - PASS 0 2 4 6 8 10 Home Category1 Search Item Add to Mini Cart View Cart Proceed To Checkout Login Shipping Address Shipping Method Payment Seconds www.customerABC.com Good Warning Problem Industry Standards Feb 21 – Feb 28, 2017
  52. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    67 MONITORING & ALERTING Keynote/Dynatrace global test node locations (Feb 2016) Google Chrome at each location
  53. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    68 PERFORMANCE AUDITS •360-degree review of your website performance −Frontend −Backend −Implementation •Identifies factors impacting site performance •Provides possible solutions to these problems •Audit document with prioritized list of actions •Webex delivery, Q&A
  54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved.

    69 Industry Expertise • Business Analytics • KPI Reporting • Regular Checkpoints Performance • Monitoring and Alerting • Reports and Industry Benchmarking • Audits Design • Advice on Accessibility and Design • UX/UI Design Audits • Mock-ups SEO • Expert Advice and Assistance • Migration Analysis • On-Page Optimization Audit Customizations • Included hours for enhancements and customizations www.netsuite.com/success-services [email protected] COMMERCE SUCCESS SERVICES We’re here to help!