have you cleared the cache?

50
Have you cleared the cache? A non-technical guide to technical concepts and their impact on stability, performance & conversion

Upload: stephen-mcnairn

Post on 04-Jul-2015

517 views

Category:

Technology


0 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Have you cleared the cache?

Have you cleared the cache?

A non-technical guide to technical concepts and

their impact on stability, performance & conversion

Page 2: Have you cleared the cache?

Who am I?

l  Stephen McNairn l  Project Manager at

Session Digital l  Certified Scrum

Master l  Warner Music,

Dreams, Missguided, Football League Magento projects

...in a past life. •  Marketing Manager

l  Intro to E-commerce l  Business focused l  Feel your pain!

Page 3: Have you cleared the cache?

Aim

l  Share some lessons learned l  Promote site stability and protect conversion l  Explain key technical concepts l  Using that knowledge to drive business decisions l  Share standard processes and best practice

Page 4: Have you cleared the cache?

Topics

l  Platform stability is crucial l  Load l  Caching and Indexing l  Magento Flat Tables l  Magento Content Staging Stores l  Managing change l  Sharing, Q & A

Page 5: Have you cleared the cache?

Apologies!

l  No silver bullet l  I am not technical l  I will use bad metaphors l  I will over simplify l  “The brain is very much like a big computer”

Page 6: Have you cleared the cache?

Performance and Stability

l  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)

Page 7: Have you cleared the cache?

Performance and Stability

l  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 company

l  44% will tell their friends and family about the experience.

eCommerce Web Site Performance Today (Forrester Consulting)

Page 8: Have you cleared the cache?

Performance and Stability

l  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 Research

l  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

Page 9: Have you cleared the cache?

We know poor performance and down-time impacts revenue…

…why do we put good performance at risk?

Page 10: Have you cleared the cache?

The Internet!

Page 11: Have you cleared the cache?

Load

Page 12: Have you cleared the cache?

Under Heavy Load

Page 13: Have you cleared the cache?

Know your limits

Do: l  Know your capacity l  Load test l  GA real-time l  Plan your campaigns l  Plan your growth

l  Give yourself headroom

Avoid: l  Too much load l  Mailing the world at

once l  Changes at peak

times l  Hope it will cope

Page 14: Have you cleared the cache?

Cache

Page 15: Have you cleared the cache?

Hot cache!

Page 16: Have you cleared the cache?

Magento Cache Management

Page 17: Have you cleared the cache?

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.)

Page 18: Have you cleared the cache?

Have you cleared the Cache?

l  No! You've 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!

Page 19: Have you cleared the cache?

There's a hole in my bucket

Page 20: Have you cleared the cache?

The Magento DB

Page 21: Have you cleared the cache?

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

Page 22: Have you cleared the cache?

Data structure

Page 23: Have you cleared the cache?

Indexed data

Page 24: Have you cleared the cache?

Index Management

Page 25: Have you cleared the cache?

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 results

You may also need to refresh page or block cache

Page 26: Have you cleared the cache?

“Have you updated the index?”

l  Up to date indexes are good l  ...but be not afraid of the out-of-date-index l  Indexing is an intensive process (URLs) l  Extenuated on multi-store l  Use auto-update carefully l  Indexing is change l  Change at peak is risky

Page 27: Have you cleared the cache?

Caching and Indexing

l  They make Magento perform better l  Keep them up-to-date l  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 refresh

l  Choose appropriate times to update cache and index or wait for auto-updates

Page 28: Have you cleared the cache?

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

Page 29: Have you cleared the cache?

Flat tables System>>Configuration>>Catalog>>Frontend

Page 30: Have you cleared the cache?

Flat tables

Benefits:

• Gives the front-end a single table for products

• Gives the front-end a single table for categories

•  Improves F/E performance • Can reduce DB locks • Can reduce /admin impact

on front end

Be aware:

•  >1000 products • Must be periodically rebuilt

for changes to appear • Run after other indexes

updated • Another index to maintain

Page 31: Have you cleared the cache?

Staging Websites

• Enterprise Edition only • Uses Magento multi-store

architecture • Requires minimal

development work • Highly recommended •  It works!

Page 32: Have you cleared the cache?

Staging Websites

Features

• New store view you access through admin

• Preview catalogue, content and config changes

• Simple control of merge, back up and roll-back

• Can schedule merges (e.g. sales)

Benefits

• More controlled work flow • Separates admin

maintenance from front end store

• Publish changes at best time for front end

• Reduce need for cache and indexing

Page 33: Have you cleared the cache?

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

Page 34: Have you cleared the cache?

Change Management New features and fixes •  4,500,000 lines of code in Magento • Bad code will lead to instability/poor performance Your decisions should be made based on protecting the quality of that code.

Page 35: Have you cleared the cache?

Release early, Release often

Agile

Page 36: Have you cleared the cache?

Do not release anything.

Ever.

The Fear

Page 37: Have you cleared the cache?

Easing the Fear…

Good Source control

l  Manage “Versions” of your code

l  Track changes l  Avoid the disappearing

feature! l  Collaborative l  Helps roll back l  Ask your dev team

l  GIT, SVN

Safe Deployment Process

• Have one! • Avoid hot fix! • Should be automated • No manually copying • Don’t deploy at peak • Ask your dev team

•  Capistrano

Page 38: Have you cleared the cache?

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?

Page 39: Have you cleared the cache?

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

Page 40: Have you cleared the cache?

Value Based Planning Long term

•  Invest based on business value

Medium term •  Priorities based on business value

Short term •  Release based on business value

•  Risk vs. Business Value •  Only hot-fix critical issues

Page 41: Have you cleared the cache?

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

Page 42: Have you cleared the cache?

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

Page 43: Have you cleared the cache?

Release early, Release often

Agile

Page 44: Have you cleared the cache?

Do not release anything… …on a Friday

A recommendation…

Page 45: Have you cleared the cache?

Example 1 You biggest selling product is incorrectly priced and you’re selling it for £16.99 (should be £18.99). You discover this a 4pm and you expect to sell 100 units in the next hour.

Page 46: Have you cleared the cache?

Example 2 Promotional campaign is scheduled to 500,000 users offering free delivery. A high response rate is expected. 2 days before launch it is suggested that the servers may not be able to cope with extra traffic levels…

(Forecast response x audience) + standard traffic level

Page 47: Have you cleared the cache?

Example 3 The CEO demands the “home” link in the navigation to be green. He has been asking for it for the last week and it must go live NOW! It is in a release with one other fix but the release has not been fully tested.

Page 48: Have you cleared the cache?

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

Page 49: Have you cleared the cache?

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!

Page 50: Have you cleared the cache?

Any questions?