Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

Mage Titans USA 2016 - Ivan Chepurnyi - Creating Micro-Services for Magento 2.0 Performance

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Cargando en…3
×

Eche un vistazo a continuación

1 de 28 Anuncio

Mage Titans USA 2016 - Ivan Chepurnyi - Creating Micro-Services for Magento 2.0 Performance

Descargar para leer sin conexión

Micro-services it is not something that comes to your mind when you think about a development of Magento based solution for your merchant. Come to my talk and together we are going to experiment with Magento, learn what are the microservices, how can we use it, and what benefits it will give us.

Micro-services it is not something that comes to your mind when you think about a development of Magento based solution for your merchant. Come to my talk and together we are going to experiment with Magento, learn what are the microservices, how can we use it, and what benefits it will give us.

Anuncio
Anuncio

Más Contenido Relacionado

Anuncio

Similares a Mage Titans USA 2016 - Ivan Chepurnyi - Creating Micro-Services for Magento 2.0 Performance (20)

Más de Stacey Whitney (10)

Anuncio

Más reciente (20)

Mage Titans USA 2016 - Ivan Chepurnyi - Creating Micro-Services for Magento 2.0 Performance

  1. 1. MICRO-SERVICES MAGENTO 2.0 PERFORMANCE by Ivan Chepurnyi            
  2. 2. ABOUT ME One of lucky former members of Magento 1.x Core Team I love to optimize performance I give trainings and independent consultancy
  3. 3. Let's talk about PHP APP evolution
  4. 4. All started from the good old Apache's mod_php
  5. 5. mod_php Spawns   new PHP process Server  Thread Executes  PHP script PHP  Initialization Executes  Business Logic Application  Bootstrap Rendering the Page
  6. 6. DRAWBACKS Dynamic server processes was not limited PHP process is alive unless all bytes transfered to a remote connection Every new PHP process takes time to start
  7. 7. Who is still running mod_php on production?
  8. 8. Then started an era of PHP-FPM
  9. 9. PHP-FPM Waits  for Response Server  Thread Executes  PHP File Takes running process FPM FastCGI Process Manager Process Pool 1..n Executes  Business Logic Application  Bootstrap Rendering the Page
  10. 10. DRAWBACK Not controlling your memory usage, might results in memory over-usage by one of the processes
  11. 11. Now the era of async I/O PHP apps is emerging...
  12. 12. Application Process Manager Waits  for Response Server  Thread Fork/Re-use Process  with Business Logic Application Master Process Rendering the Page
  13. 13. DRAWBACKS You have to control used memory You have to ensure async IO on any operation If single line of code fails, all app crashes
  14. 14. Is it possible with Magento 2?
  15. 15. The answer is micro-services...
  16. 16. What is a micro-service?
  17. 17. Micro-service is a component that runs as a separate application
  18. 18. MICRO-SERVICE CANDIDATES IN MAGENTO 2.0
  19. 19. SESSIONS Every page load requires I/O operation to cache storage Dynamic requests in Varnish bootstrap full application
  20. 20. SESSION APPLICATION Start Server GC Inactive Sessions every 5 minutes Stop Server IO to Redis IO to Redis Lazy Load a Session  IO to Redis
  21. 21. STOCK PROCESSING Every order place request requires database lock on stock table You usually sacrifice stock integrity for performance reasons
  22. 22. STOCK APPLICATION Live proof of concept demo
  23. 23. QUOTE (SHOPPING CARTS) Every change shopping cart is a write DB operation
  24. 24. QUOTE APPLICATION Store quotes in memory Delayed DB syncronization Endless BI possibilities
  25. 25. IMAGE RESIZE Images has to be resized sequentially Cold image cache perfromance hit
  26. 26. IMAGE MICROSERVICE Image can be resized in parallel Main Application can utilize Async I/O
  27. 27. LEARN MORE ReactPHP: PHPFastCGI: Sample counter server: http://reactphp.org/ http://phpfastcgi.github.io/ http://bit.ly/counter-sample
  28. 28. Q&A @IvanChepurnyi ivan@ecomdev.org

×