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

toom + Magento - a journey to zero downtime (Mu...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

toom + Magento - a journey to zero downtime (Munich Meetup)

Avatar for James Halsall

James Halsall

May 22, 2019

Other Decks in Technology

Transcript

  1. Some of our challenges • Market specific pricing and stock

    • Huge volumes of stock changes • Huge catalog provided by a middleware • Zero-downtime deployments
  2. “Queries are using the buffered mode by default. This means

    that query results are immediately transferred from the MySQL Server to PHP and then are kept in the memory of the PHP process 
 http://php.net/manual/en/mysqlinfo.concepts.buffering.php
  3. “Unbuffered MySQL queries execute the query and then return a

    resource while the data is still waiting on the MySQL server for being fetched. This uses less memory on the PHP-side, but can increase the load on the server.”
 
 http://php.net/manual/en/mysqlinfo.concepts.buffering.php
  4. stockSales Kafka Microservice stock-service Microservice stock-change- import Shop stock-change-consumer MySQL

    Stock DB MySQL Magento DB RabbitMQ stock-changes Shop stock-change-consumer
  5. Magento queue processor RabbitMQ catalog-requests Magento queue processor Magento queue

    processor Magento REST API Middleware S4T Connect POST /rest/V1/products HTTP 202 Accepted MySQL Magento DB
  6. 1. Run bin/magento setup:db:status 2. If exit code is 2,

    run bin/magento setup:upgrade 3. Run bin/phinx migrate 4. Continue as normal New database migration process for deploys
  7. Request HTTP Magento New Code Magento Old Code Magento New

    Code Magento Old Code Redis Cache DB
  8. Request HTTP Magento New Code Magento Old Code Magento New

    Code Magento Old Code Redis New DB Old DB