Magento is based on PHP and contains some elements of the Zend Framework, Symfony, and Laminas. It uses a MySQL-based database management system and relies on various open-source technologies, including Apache, Nginx, JavaScript, and HTML.
Other technologies used by Magento
Web server
Magento supports using Nginx and Apache as the web server application. Apache uses Multi-Processing Modules that create processes to handle requests. However, this can be inefficient and memory-intensive when dealing with a large number of concurrent requests.
Nginx uses an asynchronous and event-driven architecture giving it a slight edge over Apache when it comes to handling heavy loads which makes it ideal for use with high-traffic Magento stores.
Code
For its codebase, Magento uses a custom framework called the Magento Framework that controls the interactions of the application’s components. It is primarily PHP code organized into logical groups called libraries that its modules can call.
Often confused with the Zend Framework, the Magento Framework is a separate framework that contains components of the Zend Framework 1 & 2, Symfony, and Laminas. Since version 2.3.5, Adobe has begun porting all unsupported components of the Zend Framework 1 to Laminas as the former reached its end of life on the 28th of September, 2016.
Database
Magento uses MySQL for its database management system with an Entity-Attribute-Value data model that supports encoding large amounts of data efficiently and allows databases to grow vertically instead of horizontally. The EAV model supports Magento’s core principle of modularity by enabling merchants to introduce custom attributes into the database without risking its integrity.
Recently, Adobe has introduced support for MySQL 8, which is touted to be twice as fast as the previously supported MySQL 5.7. Using MySQL helps reduce the overall costs of ownership of a Magento store by providing a reliable and scalable database management system capable of supporting enterprise-level merchants.
Frontend
Magento’s frontend appearance relies on numerous open-source technologies, including HTML, CSS, JavaScript, and PHP. Adobe provides multiple ways to customize a Magento store appearance, starting with simple CSS changes to adjust the look and feel of the store.
For more advanced styling, developers can use LESS and XML to alter the design of a website without making any structural changes. Next, the HTML generated by the site can be adjusted by altering the PHTML files using basic PHP skills. This involves copying PHP code from existing templates to new ones and modifying them with custom HTML.
They also allow other ways to customize the frontend by moving functionality between pages using the Magento layout engine and developing custom extensions to extend existing functionality.
Search engine
For Magento versions up to 2.3.x, merchants can use the in-built MySQL-based search engine on their stores. However, since version 2.4, all Magento stores must use Elasticsearch as the default catalog search engine. Although Adobe allows using other third-party search engines in place of Elasticsearch, they recommend merchants to ensure compatibility before using them on production stores.
Elasticsearch is a robust and scalable search engine that brings advanced search functionality to Magento stores without compromising performance. It processes and indexes vast amounts of store data and displays real-time results to customer search queries and offers additional search suggestions and recommendations.
HTTP accelerator
Although optional, Adobe recommends using Varnish, a powerful HTTP accelerator, in production environments. Varnish sits between the server and end user and caches all static requests by storing them in memory and serving them in real-time when requested.
Varnish reduces the response time to requests by serving cached files before the requests cross the web server and reach the database. In doing so, it minimizes network bandwidth consumption for high-traffic stores. This is why Varnish is used by global corporations such as Pinterest, Twitch, Accenture, and Trivago.
Cache
Currently, Magento supports using the in-built full-page caching that caches to the file system and database. However, Adobe recommends using Varnish and Redis for caching as they are significantly faster. Varnish is ideal for use in place of the default page caching, and Redis works best for caching session data in memory which is notorious for creating large files that quickly occupy server storage space.
Redis can deliver sub-millisecond responses to requests as it stores data in-memory eliminating the need to access the server disk storage. It reduces data access latency, increases throughput, and takes the load off the website database enabling Magento stores to achieve lightning-fast response times.
Magento 2 — a blend of open-source technologies
Magento relies on several open-source technologies to deliver the high-performance and feature-rich websites it is reputed for. It combines leading global software such as MySQL, PHP, Varnish, and Redis to create a reliable and flexible ecommerce platform.