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

Changing Tires at 100mph

Changing Tires at 100mph

The massive growth of Lesara in the last three years lead to a high traffic level of the online shop.
With several million page views, API calls and events every day, it is hard to migrate to new, more modern systems. The migration can lead to bugs, a drop in SEO visibility and unavailability of the whole service, which is feared by marketers, engineers and executives.

The talk walks you through the reasons for a new stack, which technologies we selected and what the new architecture looks like.

Robin Müller

April 28, 2017
Tweet

More Decks by Robin Müller

Other Decks in Technology

Transcript

  1. @_RobM 2 Gaming Legal Tech E-Commerce Robin Müller CTO &

    Co-Founder at Lesara What I do at Lesara What I did before Scaling Tracking Tech Strategy BS Computer Science Security Product
  2. @_RobM We use caching to scale 7 • Different cache

    types • MySQL query cache • Opcode cache • Application cache • Frontend cache • Browser cache
  3. @_RobM The hard parts about varnish 8 • Cache invalidation

    • Hole punching using AJAX or ESI Cached Uncached
  4. @_RobM What are we looking for? 13 Product Loading times

    < 100ms A/B Testing in the core Live updates Completely personalizable Step-by-step migration Developers PHP 7 Modern framework No more FPC Community Tech Fast & light Easy to update Open Source New CDN Fully tested
  5. @_RobM 15 Based on PHP 7 Symfony 3 elasticsearch 5

    Redis 3 Bundles Elasticsearch bundle Filter manager bundle Settings bundle Router bundle Translation bundle … Built for Massive scale Step-by-step migration Frequent data updates Rendering in 100ms
  6. @_RobM The router can make your application smart 18 Requirements

    Response time(<5ms) Scalability Opportunities Save a second lookup via header Circuit-breaker-pattern A/B Testing Staged Feature Rollouts
  7. @_RobM Router implementations 19 PHP + fastcgi Silex > 2000

    tr/s > 25k – 30k tr/s (fastcgi) Stable implementation LUA-script w/ OpenResty ES 5 only hacked 10k – 15k tr/s Go Seg-faults under load > 30k tr/s
  8. @_RobM Circuit breaker pattern Like a real circuit breaker in

    a fuse box in your home Have a pause when a backend service fails MONITOR IT! 20
  9. @_RobM Indexing data 23 Documents (in all languages) Products Categories

    Settings / Configuration Translations Other content pages
  10. @_RobM How to prevent duplication 24 Header and footer are

    present in all pages. Use Server side includes
  11. @_RobM The migration plan 25 High traffic to low traffic

    Header & Footer via SSI Home Categories Search results Product Detail pages REST-API …