SlideShare a Scribd company logo
1 of 32
Download to read offline
Performance, High Availability, and
Scalability of Magento using Zend
Server
by Enrico Zimuel
Senior Consultant & Architect
Zend Technologies

enrico@zend.com




                                © All rights reserved. Zend Technologies, Inc.
About me
           ●   Senior Consultant and Architect at Zend
                 Technologies since 2008
           ●   Software Engineer since 1996: C/C++, Java,
                 PHP, Perl, VB/C#/ASP.NET, JavaScript
           ●   More than 10 years of experience in PHP
           ●   International speaker at web conferences:
                  PHPCon, PHP Barcelona Conference,
                  PHPDay, ZendCon, etc
           ●   B.Sc. (Hons) in Economics and Computer
                 Science
           ●   Blog on web dev't: http://www.zimuel.it/blog




                   © All rights reserved. Zend Technologies, Inc.
Summary

●   What is Magento?
●   What is Zend Server?
●   How to optimize the performance of
     Magento using Zend Server
●   Zend Server Cluster Manager
●   High availability and scalability of
      Magento using Zend Server
      Cluster Manager



                    © All rights reserved. Zend Technologies, Inc.
Magento




 © All rights reserved. Zend Technologies, Inc.
What is Magento?
●   An open source feature-rich eCommerce platform
●   Developed in PHP with Zend Framework
●   First stable release March 2008
●   Main features:
       ▶   Flexible
       ▶   Extendable
       ▶   Modular
       ▶   Upgradable
       ▶   Scalable
                                                          http://www.magentocommerce.com


                        © All rights reserved. Zend Technologies, Inc.
Magento flavors
●   Magento Community
       ▶   Free to download and use
●   Magento Professional
       ▶   Annual subscription version
       ▶   Supported by Magento Solution Partners
       ▶   Warranty included
●   Magento Enterprise
       ▶   Annual subscription version
       ▶   World class support (SLA)
       ▶   Additional feature set
       ▶   Warranty included

                         © All rights reserved. Zend Technologies, Inc.
Zend Server




  © All rights reserved. Zend Technologies, Inc.
What is Zend Server?
●   Production ready, complete
      PHP application stack
●   Application monitoring and
     problem diagnostics
●   Multi-level performance
     enhancement capabilities
●   Cluster management, High
      Availability, Scalable
●   Technical support, software
      updates and security hot
      fixes                                                         http://www.zend.com/server/

                   © All rights reserved. Zend Technologies, Inc.
Zend Server flavors
●   Zend Server Community Edition
      ▶   Free to download and use
      ▶   Zend Optimizer+ (PHP accelerator)
      ▶   Zend Data Cache
      ▶   Java Bridge
●   Zend Server
      ▶   Annual subscription version
      ▶   World class support (SLA)
      ▶   Additional feature set: Monitoring, Code Tracing, Job
            Queue, Page Caching, etc
      ▶   Software updates and security hot fixes


                        © All rights reserved. Zend Technologies, Inc.
Zend Server flavors (2)

●   Zend Server Cluster Manager
       ▶   Annual subscription version
       ▶   World class support (SLA)
       ▶   Additional feature set: Monitoring, Code Tracing, Job
             Queue, Page Caching, etc
       ▶   Cluster Manager
       ▶   Session Clustering
       ▶   High availability
       ▶   Scalable architecture
       ▶   Software updates and security hot fixes



                          © All rights reserved. Zend Technologies, Inc.
Performance improvement
    of Magento using
       Zend Server




        © All rights reserved. Zend Technologies, Inc.
Getting better performance from Magento

●   Magento optimization
       ▶   Magento Native Cache
       ▶   Magento Compilation Module
●   Running Magento on Zend Server
       ▶   PHP opcode accelerator (Zend Optimizer+)
       ▶   Zend Server Data Cache
       ▶   Zend Server Page Caching
       ▶   Diagnosing performance problems




                        © All rights reserved. Zend Technologies, Inc.
Magento native cache

●   Magento uses Zend_Cache (Zend Framework
    class) for data caching
●   Supported backends modules:
                   ●



        ▶   File                  ▶     memcached
        ▶   APC                   ▶     Zend Server
        ▶   eAccelerator          ▶     etc
●   File system backend (default)
●   Cache backend model specified in
    app/etc/local.xml
●   Cache configuration examples can be found in
    app/etc/local.xml.additional


                           © All rights reserved. Zend Technologies, Inc.
Major cached entities

●   Configuration
●   Page Layouts
●   HTML Blocks (top navigation, footer, etc)
●   Translations
●   Data collections (website collection, store collection,
    store view collection, etc)




                       © All rights reserved. Zend Technologies, Inc.
Magento compilation module

●   Goal: decrease number of file system operations (I/O)
●   By default Magento uses 4 additional directories in
    include_path in the following order:
        ▶   app/code/local
        ▶   app/code/community
        ▶   app/code/core
        ▶   lib
●   This schema provides extensibility and flexibility and
    allows to fully rewrite code of some classes but yet
    keeps upgradability


                        © All rights reserved. Zend Technologies, Inc.
Magento compilation module: process

●   Copy all the php files to the 4 dirs into one folder
    (include/src) and declare one directory for include_path.
    This step give 10-25% improvemente in performance.
●   Aggregate code of most used php classes to “scope
    include” files.
        ▶   For instance Varien_Object, Mage_Core_Model_Abstract,
               Zend_Cache are included in every request. The classes
               are aggregated to the “default scope include” file.

●   Note: compilation needs to be disabled when
    upgrading or developing and should be enabled in
    production


                           © All rights reserved. Zend Technologies, Inc.
Zend Optimizer+: PHP opcode accelerator

●   Caching compiled PHP opcode in
    shared memory
●   Automatically enabled when you run
    PHP applications using Zend Server
●   Usually provide a very significant
    performance boost




                       © All rights reserved. Zend Technologies, Inc.
Zend Server Page Caching

 ●   Caches entire HTTP response
 ●   The rule caching is based on different parameters:
       URL, $_SESSION, $_SERVER, $_GET, $_COOKIE
 ●   Performance gains are usually very high
 ●   Typically doesn't require code changes




                       © All rights reserved. Zend Technologies, Inc.
Example: cache /js/index.php




               © All rights reserved. Zend Technologies, Inc.
Real use case: Zend's online store




                © All rights reserved. Zend Technologies, Inc.
Diagnosing performance problems

●   Bult-in application monitoring alerts
    on script execution slowdowns
●   Problem diagnostics enables quick
    problem isolation
●   Code-level profiling and analysis
    performed with:
        ▶   Code Tracing
        ▶   Integration with Zend Studio




                        © All rights reserved. Zend Technologies, Inc.
Zend Server Cluster Manager




         © All rights reserved. Zend Technologies, Inc.
Zend Server Cluster Manager

 ●   Zend Server Cluster Manager extends
       the benefits of Zend Server across
       large-scale PHP deployments
 ●   With Zend Server Cluster Manager you
      can implement solutions of:
        ▶   High Availability
        ▶   Scalability
        ▶   Central management




                          © All rights reserved. Zend Technologies, Inc.
Zend Server Cluster Manager architecture




           Load Balancer                                                Firewall




                                                                                   MySQL




                       © All rights reserved. Zend Technologies, Inc.
High availability: session cluster




                 © All rights reserved. Zend Technologies, Inc.
High availability: session cluster (2)




                 © All rights reserved. Zend Technologies, Inc.
High availability and
         Scalability
     of Magento using
Zend Server Cluster Manager




         © All rights reserved. Zend Technologies, Inc.
Magento session handlers
 ●   Magento supports different PHP session handlers:
          ▶   file
          ▶   eaccelerator
          ▶   memcached
          ▶   db
●    Right now, the version 1.4 of Magento doesn't support
     the session clustering of Zend Server but there is a
     patch to enable the session cluster:
     http://arr.gr/magento/magento-1.4-trunk-r69862-issue-23361-01.patch


●    This patch will be included in the future version of
     Magento

                             © All rights reserved. Zend Technologies, Inc.
The patch

 ●   Edit the file app/code/core/Mage/Core/Model/Session/
       Abstract/Varien.php
 ●   Add the following lines (with +):
        ▶   @@ -59,6 +59,11 @@

                     case 'eaccelerator':
                       ini_set('session.save_handler', 'eaccelerator');
                       break;
               +
               +      case 'cluster':
               +        ini_set('session.save_handler', 'cluster');
               +        break;
               +
                     default:
                       session_module_name('files');
                       if (is_writable(Mage::getBaseDir('session'))) {




                            © All rights reserved. Zend Technologies, Inc.
High Availability and Scalability for Magento

 ●   Using Zend Server Cluster Manager you can implement
       an high availability and scalability architecture for
       Magento
 ●   For a Magento ecommerce web sites the advantages
       using Zend Server Cluster Manager are:
        ▶   High availability = Never loose customers
        ▶   Scalability = Increment the number of customers
        ▶   Central management = Better support to the customers




                          © All rights reserved. Zend Technologies, Inc.
Questions?




             © All rights reserved. Zend Technologies, Inc.
Thank you!


More info:
http://www.zend.com
http://www.magentocommerce.com




             © All rights reserved. Zend Technologies, Inc.

More Related Content

Similar to Costruire un sito e-commerce in alta affidabilità con Magento e Zend Server Cluster Manager

Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
varien
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applications
Etisbew Technology Group
 

Similar to Costruire un sito e-commerce in alta affidabilità con Magento e Zend Server Cluster Manager (20)

How to scale PHP applications
How to scale PHP applicationsHow to scale PHP applications
How to scale PHP applications
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
 
Quick start on Zend Framework 2
Quick start on Zend Framework 2Quick start on Zend Framework 2
Quick start on Zend Framework 2
 
Jan Burkl - Zend & Magento
Jan Burkl - Zend & MagentoJan Burkl - Zend & Magento
Jan Burkl - Zend & Magento
 
How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend Framework
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Turbocharging php applications with zend server
Turbocharging php applications with zend serverTurbocharging php applications with zend server
Turbocharging php applications with zend server
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
 
A quick start on Zend Framework 2
A quick start on Zend Framework 2A quick start on Zend Framework 2
A quick start on Zend Framework 2
 
green
greengreen
green
 
Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)Turbocharging php applications with zend server (workshop)
Turbocharging php applications with zend server (workshop)
 
Meet Magento Spain 2019 - Our Experience with Magento Cloud
Meet Magento Spain 2019 - Our Experience with Magento CloudMeet Magento Spain 2019 - Our Experience with Magento Cloud
Meet Magento Spain 2019 - Our Experience with Magento Cloud
 
Scalable High-Availability Session Storage with ZSCM
Scalable High-Availability Session Storage with ZSCMScalable High-Availability Session Storage with ZSCM
Scalable High-Availability Session Storage with ZSCM
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHP
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applications
 
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
 
Zend Framework 2 quick start
Zend Framework 2 quick startZend Framework 2 quick start
Zend Framework 2 quick start
 

More from Zend by Rogue Wave Software

More from Zend by Rogue Wave Software (20)

Develop microservices in php
Develop microservices in phpDevelop microservices in php
Develop microservices in php
 
Speed and security for your PHP application
Speed and security for your PHP applicationSpeed and security for your PHP application
Speed and security for your PHP application
 
Building web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend ExpressiveBuilding web APIs in PHP with Zend Expressive
Building web APIs in PHP with Zend Expressive
 
To PHP 7 and beyond
To PHP 7 and beyondTo PHP 7 and beyond
To PHP 7 and beyond
 
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018) Speed up web APIs with Expressive and Swoole (PHP Day 2018)
Speed up web APIs with Expressive and Swoole (PHP Day 2018)
 
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)The Sodium crypto library of PHP 7.2 (PHP Day 2018)
The Sodium crypto library of PHP 7.2 (PHP Day 2018)
 
Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)Develop web APIs in PHP using middleware with Expressive (Code Europe)
Develop web APIs in PHP using middleware with Expressive (Code Europe)
 
Middleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.xMiddleware web APIs in PHP 7.x
Middleware web APIs in PHP 7.x
 
Ongoing management of your PHP 7 application
Ongoing management of your PHP 7 applicationOngoing management of your PHP 7 application
Ongoing management of your PHP 7 application
 
Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7Developing web APIs using middleware in PHP 7
Developing web APIs using middleware in PHP 7
 
The Docker development template for PHP
The Docker development template for PHPThe Docker development template for PHP
The Docker development template for PHP
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Deploying PHP apps on the cloud
Deploying PHP apps on the cloudDeploying PHP apps on the cloud
Deploying PHP apps on the cloud
 
Data is dead. Long live data!
Data is dead. Long live data! Data is dead. Long live data!
Data is dead. Long live data!
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Resolving problems & high availability
Resolving problems & high availabilityResolving problems & high availability
Resolving problems & high availability
 
Developing apps faster
Developing apps fasterDeveloping apps faster
Developing apps faster
 
Keeping up with PHP
Keeping up with PHPKeeping up with PHP
Keeping up with PHP
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Costruire un sito e-commerce in alta affidabilità con Magento e Zend Server Cluster Manager

  • 1. Performance, High Availability, and Scalability of Magento using Zend Server by Enrico Zimuel Senior Consultant & Architect Zend Technologies enrico@zend.com © All rights reserved. Zend Technologies, Inc.
  • 2. About me ● Senior Consultant and Architect at Zend Technologies since 2008 ● Software Engineer since 1996: C/C++, Java, PHP, Perl, VB/C#/ASP.NET, JavaScript ● More than 10 years of experience in PHP ● International speaker at web conferences: PHPCon, PHP Barcelona Conference, PHPDay, ZendCon, etc ● B.Sc. (Hons) in Economics and Computer Science ● Blog on web dev't: http://www.zimuel.it/blog © All rights reserved. Zend Technologies, Inc.
  • 3. Summary ● What is Magento? ● What is Zend Server? ● How to optimize the performance of Magento using Zend Server ● Zend Server Cluster Manager ● High availability and scalability of Magento using Zend Server Cluster Manager © All rights reserved. Zend Technologies, Inc.
  • 4. Magento © All rights reserved. Zend Technologies, Inc.
  • 5. What is Magento? ● An open source feature-rich eCommerce platform ● Developed in PHP with Zend Framework ● First stable release March 2008 ● Main features: ▶ Flexible ▶ Extendable ▶ Modular ▶ Upgradable ▶ Scalable http://www.magentocommerce.com © All rights reserved. Zend Technologies, Inc.
  • 6. Magento flavors ● Magento Community ▶ Free to download and use ● Magento Professional ▶ Annual subscription version ▶ Supported by Magento Solution Partners ▶ Warranty included ● Magento Enterprise ▶ Annual subscription version ▶ World class support (SLA) ▶ Additional feature set ▶ Warranty included © All rights reserved. Zend Technologies, Inc.
  • 7. Zend Server © All rights reserved. Zend Technologies, Inc.
  • 8. What is Zend Server? ● Production ready, complete PHP application stack ● Application monitoring and problem diagnostics ● Multi-level performance enhancement capabilities ● Cluster management, High Availability, Scalable ● Technical support, software updates and security hot fixes http://www.zend.com/server/ © All rights reserved. Zend Technologies, Inc.
  • 9. Zend Server flavors ● Zend Server Community Edition ▶ Free to download and use ▶ Zend Optimizer+ (PHP accelerator) ▶ Zend Data Cache ▶ Java Bridge ● Zend Server ▶ Annual subscription version ▶ World class support (SLA) ▶ Additional feature set: Monitoring, Code Tracing, Job Queue, Page Caching, etc ▶ Software updates and security hot fixes © All rights reserved. Zend Technologies, Inc.
  • 10. Zend Server flavors (2) ● Zend Server Cluster Manager ▶ Annual subscription version ▶ World class support (SLA) ▶ Additional feature set: Monitoring, Code Tracing, Job Queue, Page Caching, etc ▶ Cluster Manager ▶ Session Clustering ▶ High availability ▶ Scalable architecture ▶ Software updates and security hot fixes © All rights reserved. Zend Technologies, Inc.
  • 11. Performance improvement of Magento using Zend Server © All rights reserved. Zend Technologies, Inc.
  • 12. Getting better performance from Magento ● Magento optimization ▶ Magento Native Cache ▶ Magento Compilation Module ● Running Magento on Zend Server ▶ PHP opcode accelerator (Zend Optimizer+) ▶ Zend Server Data Cache ▶ Zend Server Page Caching ▶ Diagnosing performance problems © All rights reserved. Zend Technologies, Inc.
  • 13. Magento native cache ● Magento uses Zend_Cache (Zend Framework class) for data caching ● Supported backends modules: ● ▶ File ▶ memcached ▶ APC ▶ Zend Server ▶ eAccelerator ▶ etc ● File system backend (default) ● Cache backend model specified in app/etc/local.xml ● Cache configuration examples can be found in app/etc/local.xml.additional © All rights reserved. Zend Technologies, Inc.
  • 14. Major cached entities ● Configuration ● Page Layouts ● HTML Blocks (top navigation, footer, etc) ● Translations ● Data collections (website collection, store collection, store view collection, etc) © All rights reserved. Zend Technologies, Inc.
  • 15. Magento compilation module ● Goal: decrease number of file system operations (I/O) ● By default Magento uses 4 additional directories in include_path in the following order: ▶ app/code/local ▶ app/code/community ▶ app/code/core ▶ lib ● This schema provides extensibility and flexibility and allows to fully rewrite code of some classes but yet keeps upgradability © All rights reserved. Zend Technologies, Inc.
  • 16. Magento compilation module: process ● Copy all the php files to the 4 dirs into one folder (include/src) and declare one directory for include_path. This step give 10-25% improvemente in performance. ● Aggregate code of most used php classes to “scope include” files. ▶ For instance Varien_Object, Mage_Core_Model_Abstract, Zend_Cache are included in every request. The classes are aggregated to the “default scope include” file. ● Note: compilation needs to be disabled when upgrading or developing and should be enabled in production © All rights reserved. Zend Technologies, Inc.
  • 17. Zend Optimizer+: PHP opcode accelerator ● Caching compiled PHP opcode in shared memory ● Automatically enabled when you run PHP applications using Zend Server ● Usually provide a very significant performance boost © All rights reserved. Zend Technologies, Inc.
  • 18. Zend Server Page Caching ● Caches entire HTTP response ● The rule caching is based on different parameters: URL, $_SESSION, $_SERVER, $_GET, $_COOKIE ● Performance gains are usually very high ● Typically doesn't require code changes © All rights reserved. Zend Technologies, Inc.
  • 19. Example: cache /js/index.php © All rights reserved. Zend Technologies, Inc.
  • 20. Real use case: Zend's online store © All rights reserved. Zend Technologies, Inc.
  • 21. Diagnosing performance problems ● Bult-in application monitoring alerts on script execution slowdowns ● Problem diagnostics enables quick problem isolation ● Code-level profiling and analysis performed with: ▶ Code Tracing ▶ Integration with Zend Studio © All rights reserved. Zend Technologies, Inc.
  • 22. Zend Server Cluster Manager © All rights reserved. Zend Technologies, Inc.
  • 23. Zend Server Cluster Manager ● Zend Server Cluster Manager extends the benefits of Zend Server across large-scale PHP deployments ● With Zend Server Cluster Manager you can implement solutions of: ▶ High Availability ▶ Scalability ▶ Central management © All rights reserved. Zend Technologies, Inc.
  • 24. Zend Server Cluster Manager architecture Load Balancer Firewall MySQL © All rights reserved. Zend Technologies, Inc.
  • 25. High availability: session cluster © All rights reserved. Zend Technologies, Inc.
  • 26. High availability: session cluster (2) © All rights reserved. Zend Technologies, Inc.
  • 27. High availability and Scalability of Magento using Zend Server Cluster Manager © All rights reserved. Zend Technologies, Inc.
  • 28. Magento session handlers ● Magento supports different PHP session handlers: ▶ file ▶ eaccelerator ▶ memcached ▶ db ● Right now, the version 1.4 of Magento doesn't support the session clustering of Zend Server but there is a patch to enable the session cluster: http://arr.gr/magento/magento-1.4-trunk-r69862-issue-23361-01.patch ● This patch will be included in the future version of Magento © All rights reserved. Zend Technologies, Inc.
  • 29. The patch ● Edit the file app/code/core/Mage/Core/Model/Session/ Abstract/Varien.php ● Add the following lines (with +): ▶ @@ -59,6 +59,11 @@ case 'eaccelerator': ini_set('session.save_handler', 'eaccelerator'); break; + + case 'cluster': + ini_set('session.save_handler', 'cluster'); + break; + default: session_module_name('files'); if (is_writable(Mage::getBaseDir('session'))) { © All rights reserved. Zend Technologies, Inc.
  • 30. High Availability and Scalability for Magento ● Using Zend Server Cluster Manager you can implement an high availability and scalability architecture for Magento ● For a Magento ecommerce web sites the advantages using Zend Server Cluster Manager are: ▶ High availability = Never loose customers ▶ Scalability = Increment the number of customers ▶ Central management = Better support to the customers © All rights reserved. Zend Technologies, Inc.
  • 31. Questions? © All rights reserved. Zend Technologies, Inc.
  • 32. Thank you! More info: http://www.zend.com http://www.magentocommerce.com © All rights reserved. Zend Technologies, Inc.