Have you cleared the cache?


Published on

Give business owners and non-technical stakeholders an understanding of some key "technical" concepts relating to Magneto in particular and web projects in general. This is to empower them to make decisions and manage operations in such a way that promotes stability and protects their conversion rates.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Have you cleared the cache?

  1. 1. Have you cleared the cache? A non-technical guide to technical concepts andtheir impact on stability, performance & conversion
  2. 2. Who am I?l  Stephen McNairn ...in a past life. l  Project Manager at •  Marketing Manager Session Digital l  Intro to E-commerce l  Certified Scrum l  Business focused Master l  Feel your pain! l  Warner Music, Dreams, Missguided, Football League Magento projects
  3. 3. Aiml  Share some lessons learnedl  Promote site stability and protect conversionl  Explain key technical conceptsl  Using that knowledge to drive business decisionsl  Share standard processes and best practice
  4. 4. Topicsl  Platform stability is cruciall  Loadl  Caching and Indexingl  Magento Flat Tablesl  Magento Content Staging Storesl  Managing changel  Sharing, Q & A
  5. 5. Apologies!l  No silver bulletl  I am not technicall  I will use bad metaphorsl  I will over simplifyl  “The brain is very much like a big computer”
  6. 6. Performance and Stabilityl  23% of dissatisfied online shoppers attributed [this] to the Web site being too slow or taking too long to render.l  Another 17% reported dissatisfaction due to site crashes or error messages they received.l  1/3 of shoppers who abandoned a recent shopping session were dissatisfied with a retail site’s performance. eCommerce Web Site Performance Today (Forrester Consulting)
  7. 7. Performance and Stabilityl  79% of online shoppers who experience a dissatisfying visit are likely to no longer buy from that site.l  46% of dissatisfied online shoppers are more likely to develop a negative perception of the companyl  44% will tell their friends and family about the experience. eCommerce Web Site Performance Today (Forrester Consulting)
  8. 8. Performance and Stabilityl  When a site experiences an outage, 9% of online customers permanently abandon the site, and 48% of site users establish a relationship with a competitor. Jupiter Researchl  There is a nearly 50% relationship between performance and site abandonment - i.e., a 10% decrease in site [performance] leads to a 5% increase in site abandonment. Zona
  9. 9. We know poor performance and down-time impacts revenue… …why do we put good performance at risk?
  10. 10. The Internet!
  11. 11. Load
  12. 12. Under Heavy Load
  13. 13. Know your limitsDo: Avoid:l  Know your capacity l  Too much loadl  Load test l  Mailing the world atl  GA real-time once l  Changes at peakl  Plan your campaignsl  Plan your growth times l  Hope it will cope l  Give yourself headroom
  14. 14. Cache
  15. 15. Hot cache!
  16. 16. Magento Cache Management
  17. 17. What does each line do•  Configuration: Everything you manage in the configuration in System>>Configuration•  Layout: Front end layout rules (layout.XML). How the page is laid out•  Block HTML: More template info. Front end HTML generated by blocks (.phtml)•  Translations: Core translations (so if you change locale)•  Collections: Collections are requests to the DB regarding product info (ie. sort, view all)•  EAV types: DB information - particularly related to attributes, attributes sets, names values etc•  Web services: API - How and what Magento use to speaks to 3rd party applications•  Class rewrites: When you extend Magento you rewrite classes. Magento caches details of where and what you have rewritten.•  FPC – Full page Cache – Enterprise only – The actual pages of your site•  Catalog Images and JavaScript/CSS only need refreshed if you have made front end design changes•  Flush Magento Cache: Completely empties all Magento cache lines so they can be rebuilt•  Flush Cache storage. Completely empties all caches (inc. Magento, sessions, memcache etc.)
  18. 18. Have you cleared the Cache? l  No! Youve refreshed the relevant cache lines l  Avoid flushing the cache or cache storage (unless you want to annoy customers). l  Up-to-date caches are good... l  ...be not afraid of the invalid cache l  Refreshing cache is change l  Change at peak is risky!
  19. 19. Theres a hole in my bucket
  20. 20. The Magento DB
  21. 21. The Magento DB•  Horribly complex!•  Not a spread-sheet•  EAV (Entity attribute value)•  Flexible (new attributes, values)•  Finding data is complex•  DB bottlenecks cause performance
  22. 22. Data structure
  23. 23. Indexed data
  24. 24. Index Management
  25. 25. Issues resolved by Indexing•  Products not displaying•  Product not in correct category•  Out-of-stock products not visible•  Redirects not working•  Products appear at incorrect price•  Products not appearing in search resultsYou may also need to refresh page or block cache
  26. 26. “Have you updated the index?”l  Up to date indexes are goodl  ...but be not afraid of the out-of-date-indexl  Indexing is an intensive process (URLs)l  Extenuated on multi-storel  Use auto-update carefullyl  Indexing is changel  Change at peak is risky
  27. 27. Caching and Indexingl  They make Magento perform betterl  Keep them up-to-datel  Updating them can cause performance issues: l  Cache changes will impact front end, more at peak l  Indexing can cause additional load on the DB l  Don’t flush – Do refreshl  Choose appropriate times to update cache and index or wait for auto-updates
  28. 28. www.mymagestore.com/admin•  Intensive Processes•  Can contribute to performance issues•  Separate admin server does help server load•  Separate admin server does not reduce impact on DB•  /admin can cause chaos
  29. 29. Flat tablesSystem>>Configuration>>Catalog>>Frontend
  30. 30. Flat tables Benefits: Be aware:•  Gives the front-end a •  >1000 products single table for products •  Must be periodically rebuilt•  Gives the front-end a for changes to appear single table for categories •  Run after other indexes•  Improves F/E performance updated•  Can reduce DB locks •  Another index to maintain•  Can reduce /admin impact on front end
  31. 31. Staging Websites•  Enterprise Edition only•  Uses Magento multi-store architecture•  Requires minimal development work•  Highly recommended•  It works!
  32. 32. Staging Websites Features Benefits•  New store view you •  More controlled work flow access through admin •  Separates admin•  Preview catalogue, maintenance from front content and config end store changes •  Publish changes at best•  Simple control of merge, time for front end back up and roll-back •  Reduce need for cache•  Can schedule merges and indexing (e.g. sales)
  33. 33. Maintenance•  An unmaintained Magento platform will be slower •  Admin processes take longer •  Front end processes slower•  Use default Magento log clearing•  Deploy custom maintenance script to improve standard •  Clean up sales flat quotes table •  Examples in the community
  34. 34. Change ManagementNew features and fixes•  4,500,000 lines of code in Magento•  Bad code will lead to instability/poor performanceYour decisions should be made based on protecting thequality of that code.
  35. 35. Agile Release early, Release often
  36. 36. The Fear Do not release anything. Ever.
  37. 37. Easing the Fear… Good Source control Safe Deployment Processl  Manage “Versions” of •  Have one! your code •  Avoid hot fix!l  Track changes •  Should be automatedl  Avoid the disappearing •  No manually copying feature! •  Don’t deploy at peakl  Collaborative •  Ask your dev teaml  Helps roll back •  Capistranol  Ask your dev team l  GIT, SVN
  38. 38. Planning change•  Define a release schedule •  Avoid hot-fixing•  Use the release plan to protect your code •  Can it wait until the next release?•  Always discuss risk vs. business value •  Need to hot fix? What’s the business value? •  Can the blue button wait?
  39. 39. Planning change•  When defining new features consider business value •  Improve sales •  Improve business process •  Improve customer experience •  Resolve immediate critical issue•  Document business value as part of requirement: •  BDD, Gherkin •  User stories •  1,2,3,4,5
  40. 40. Value Based PlanningLong term •  Invest based on business valueMedium term •  Priorities based on business valueShort term •  Release based on business value •  Risk vs. Business Value •  Only hot-fix critical issues
  41. 41. Testing – Final acceptance•  Don’t just test the new features•  Don’t avoid manual testing•  Test list of key processes •  Admin tasks •  Front end journeys•  Trust your sense of smell
  42. 42. Test the checkout•  Test the checkout •  Test the checkout •  Test the checkout•  Test the checkout •  Test the checkout •  Test the checkout •  Test the checkout •  Test the checkout•  Test the checkout
  43. 43. Agile Release early, Release often
  44. 44. A recommendation… Do not release anything… …on a Friday
  45. 45. Example 1You biggest selling product is incorrectly priced andyou’re selling it for £16.99 (should be £18.99). Youdiscover this a 4pm and you expect to sell 100 units inthe next hour.
  46. 46. Example 2Promotional campaign is scheduled to 500,000 usersoffering free delivery.A high response rate is expected.2 days before launch it is suggested that the serversmay not be able to cope with extra traffic levels… (Forecast response x audience) + standard traffic level
  47. 47. Example 3The CEO demands the “home” link in the navigation tobe green. He has been asking for it for the last weekand it must go live NOW!It is in a release with one other fix but the release hasnot been fully tested.
  48. 48. Summary•  Stability = happy customers = revenue•  Know your platforms load capacity•  Consider load in campaign and growth planning•  Avoid changes at peak •  Deployments, catalogue updates, cache and indexing•  Avoid impact of business processes on front end •  Use flat tables •  Use content staging stores •  Use maintenance scripts
  49. 49. Summary•  Change is risky•  Minimise the risk of releasing code •  Automated deployment •  Source control •  Define a release schedule. •  Avoid hot-fixing •  Always test the checkout!•  Define every features business value•  Use business value in all your planning and decisions•  Don’t release on a Friday!
  50. 50. Any questions?