A good piece of Go vs PHP trivia has no PHP in it: in 2015, the Google team that indexes web pages for Google Search rewrote its indexing stack in Go, and most of its developers learned Go along the way. The code they replaced was one large C++ program.
Magento (Adobe Commerce) has an indexing job of its own. To keep pages fast, it works out each product’s price, category list, stock, and search entry ahead of time and writes them into tables the store reads, called index tables. Rebuilding them is a reindex, which can run for hours on a large catalog, and Magento does it in PHP like the rest of the store.
So a Magento team asks a narrower question than the usual language debate: which jobs would gain anything from Go, which belong in PHP, and who would have to learn a second language?
Go vs PHP: the short answer
PHP was built around the web request: a PHP worker process serves one request at a time and runs the page’s scripts for it, with OPcache keeping the compiled scripts in memory between requests. A Go program runs as one process that can spread many small tasks across every CPU core. So PHP fits building pages, the admin, and everything extensions hook into, and Go fits long jobs that split into many independent parts, such as rebuilding large index tables.
We make Expedio Indexers, which does Magento’s indexing in Go. Its internals aren’t published, so the language facts below come from go.dev, php.net, and the Magento source, and describe what each language offers a job of this shape.
| What matters | PHP | Go |
|---|---|---|
| How code runs | Compiled to bytecode, kept in shared memory by OPcache, optional JIT since PHP 8.0 | Compiled into one binary that carries its own runtime |
| Running work in parallel | One request per worker process. On the command line, pcntl_fork() copies the whole process | Goroutines with stacks of a few kilobytes, spread across every CPU core |
| Database connections | Each process opens its own | One database/sql pool shared by many goroutines |
| Memory | Reference counting plus a cycle collector, capped per script by memory_limit | A garbage collector that runs mostly alongside the program, with a memory limit since Go 1.19 |
| Place in Magento | All of it: core, themes, extensions, and plugins | None in core, only programs that run beside it |
What a Magento reindex asks of a language
A full reindex is a long batch job, run by indexers that each rebuild one group of tables. It reads the catalog, works out prices, attributes, category positions, and stock for every store, website, and customer group, and writes the results in batches. The work divides into independent parts, takes hours on a large catalog, and a lot of it runs as SQL inside MySQL.
Magento’s code shows how the work divides (the basics are in how Magento indexing works). Catalog search and category products split a full reindex by store view, and product prices split it by price dimension: a website, a customer group, or both. The price and product attribute reindexes write each batch into a replica table and swap it with the live table at the end, so shoppers aren’t slowed down meanwhile.
Catalog price rules write one row per matching product, per website, and per customer group a rule covers, so the work grows with every website and group a store adds. Product attributes, stored the EAV model way, were the slowest indexer on the retailer catalog in our benchmark: 5 hours 48 minutes with Magento’s own indexers.
A job of that shape asks three things of a language: running many parts at once on every core, holding steady memory for hours, and keeping database connections open from one part to the next. When a step waits for MySQL to run a query, it waits just as long whichever language sent the query.
How Magento runs indexers in parallel in PHP today
Magento’s answer is MAGE_INDEXER_THREADS_COUNT. During a full reindex from the command line, Magento forks copies of the PHP process with pcntl_fork(), one for each store view or price dimension, and runs as many at once as the variable allows. It works, and within PHP’s model it is a sensible design.
The logic is in ProcessManager, unchanged from 2.4.8 in Magento 2.4.9, the latest release. It forks only when the variable is above 1, the pcntl_fork() function exists, Magento isn’t in setup mode, and PHP runs from the command line. Before forking, it closes the database connection, so every child process opens its own. Each child runs one part and exits, and if any child fails, the run stops with “Fail in child process”.
Only three core indexers use it: catalog search, category products, and product prices. Product attributes, catalog price rules, and stock always run in one process. Our guide explains which indexers split and how to set it.
The pcntl extension, PHP’s process control module, has conditions of its own. PHP doesn’t enable it by default (it needs --enable-pcntl at compile time), it doesn’t work on Windows, and the PCNTL manual says process control “should not be enabled within a web server environment”.
PHP’s other options fit this job less well. Fibers, added in PHP 8.1, are “lightweight cooperative concurrency” that still needs an event loop. Real threads need the parallel extension, which requires a ZTS build of PHP, a thread-safe build that can’t be switched on later. In a language where each web request gets its own worker process, splitting a long job into more processes is the natural move.
๐ Quick takeaway
MAGE_INDEXER_THREADS_COUNT only forks when PHP has the pcntl extension, which PHP doesn’t enable by default, and the reindex runs from the command line. Without both, Magento runs every part of the reindex one after another.
What Go offers a job like a full reindex
Go (also called Golang) has concurrency built into the language. A job shaped like a full reindex can run as one Go process with many goroutines, lightweight functions that run at the same time, spread over every CPU core and sharing one pool of database connections. No process has to be copied, and no connection has to be reopened for each part. The facts behind that, from go.dev:
- Effective Go describes a goroutine as “a function executing concurrently with other goroutines in the same address space”. When one waits for I/O, the others keep running.
- A new goroutine gets a stack of “a few kilobytes”, which the runtime grows as needed (Go FAQ).
- The
GOMAXPROCSsetting decides how many threads run Go code at once, and by default it follows the machine’s logical CPUs and, on Linux, the container’s CPU quota. - Workers coordinate by passing values over channels, Effective Go’s “share memory by communicating”.
- A
database/sqlhandle is “a pool of zero or more underlying connections” that is “safe for concurrent use by multiple goroutines”. - The garbage collector “does most of its work concurrently with the application”, and since Go 1.19,
GOMEMLIMITcaps the memory a long job may use (GC guide). - Go builds statically linked binaries by default, and “all Go binaries therefore include the Go runtime” (same FAQ), so a server can run one beside PHP without installing Go.
Go has costs too. Every change means a new build. A Go program is outside Magento’s PHP plugin system, so an extension can’t change it the way it changes a PHP class. And it is one more program to run and monitor.

๐ Quick takeaway
Go’s concurrency speeds up the work a program does between database calls. It doesn’t make MySQL answer a query any sooner, so a step that mostly waits on the database gains little from a change of language.
Why the rest of Magento stays PHP
Magento is a PHP application, from the storefront and checkout to the admin, and every extension changes it through PHP. That part of the store does request-shaped work, which is what PHP’s model was built for, and moving it to another language would cut off the extensions stores depend on.
The latest release, Magento 2.4.9, requires PHP 8.3, 8.4, or 8.5 in its composer.json. Page requests go to PHP-FPM, where a parent process hands each request to a child “that is not already serving another client” (php.net). OPcache keeps compiled bytecode in shared memory, so scripts aren’t parsed again on each request. Our guide to PHP-FPM and OPcache sizing covers the server side.
The PHP 8.0 announcement shows where PHP’s JIT pays off: “1.5โ2 times improvement on some specific long-running applications”, while “typical application performance is on par with PHP 7.4”. PHP’s own numbers put the big wins for compiled code in long-running jobs, which is the kind of job a reindex is.
Extensions are the bigger reason. A Magento plugin is a class that runs code “before, after, or around” a public method, according to Adobe’s plugin documentation. Extensions you install hook into Magento’s PHP classes this way, and a storefront or checkout moved to another language would leave those hooks with nothing to attach to.
The line between the two languages is the index tables. The storefront, checkout, admin, and extensions read them and don’t depend on which program wrote them, so the program that writes them can change while everything above it stays PHP.

PHP vs Go is not much of a rivalry inside the PHP project either. In May 2025, the PHP Foundation took FrankenPHP under its wing, a PHP application server that “integrates PHP directly into Go and Caddy”, and moved its code into the PHP project’s GitHub organization.
What changes for your team when the indexers are in Go
Nothing in the code your team writes. Expedio Indexers replaces Magento’s own indexers with ones written in Go and writes the same index data, so the theme, extensions, and admin stay as they are. Your developers keep working in Magento, the Expedio team supplies and maintains the indexers, and nobody on your team learns Go.
It runs beside Magento, setup takes a few environment settings and a port the store can reach, and updates for each new Magento version come with every license. Extension and custom indexers are added per project.
Aleksandrs Mokans, Solutions Architect and Team Lead at scandiweb, measured it on November 5, 2026, on a copy of a multi-store retailer’s catalog with 421,000 products on Adobe Commerce 2.4.5. A full reindex of five indexers took 9 hours 37 minutes with Magento’s own indexers and 61 minutes with Expedio Indexers, on the same machine and the same data. Both produced the same index data: 7.3 million rows were compared, and none differed (the benchmark).
Since November 16, it has also been running in production on the nightly indexing job of an Adobe Commerce catalog with about 421,000 products and 16 stores. The job takes about 43 minutes, down from 3 hours 26 minutes, and has logged zero errors.

The gains are uneven, which matters for any Go vs PHP reading of them. Product attributes, one of the indexers MAGE_INDEXER_THREADS_COUNT never splits, ran 13.6x faster, inventory 3.9x, and product prices on our test store only 1.5x. A language name doesn’t predict numbers that far apart, so we claim only the published figures.
Expedio Indexers doesn’t make pages faster for shoppers. It doesn’t fix an indexer stuck on bad data, a cron job that doesn’t run, or a broken extension, because those need a diagnosis. A store with one store view, a small catalog, and a five-minute reindex doesn’t need it. It is licensed, not open source, and tuning Magento is still the fair first step.
๐ Quick takeaway
Before switching any indexer, ask for the index data check on your own catalog. With the Done for you package, the Expedio team checks the data on your catalog and shows you the proof before it is switched on.
FAQ about Go vs PHP
Is Go faster than PHP?
It depends on the job, so measure the one you care about. Go compiles to a binary and runs work on every core in one process. PHP runs cached bytecode, with a JIT that php.net says brings a 1.5โ2 times gain on some long-running applications and leaves typical applications on par with PHP 7.4. A page that mostly waits on the database and cache gains little from either language’s speed.
Can Magento run on Go instead of PHP?
No. Magento is a PHP application: version 2.4.9 requires PHP 8.3, 8.4, or 8.5, and its extensions change it through PHP plugins. A program in another language can run beside Magento and take over one job, as long as it writes the data Magento expects. That is how indexers written in Go fit into a Magento store.
Does Magento run indexers in parallel without Go?
Partly. MAGE_INDEXER_THREADS_COUNT forks PHP processes during a full reindex run from the command line, if PHP has the pcntl extension. Only category products, catalog search, and product prices split, and product prices only after their dimensions mode is changed. Product attributes, catalog price rules, and stock run in one process, and scheduled updates of the core indexers don’t fork.
Do Magento developers need to learn Go to use Expedio Indexers?
No. Their Magento work stays the same. The Expedio team supplies and maintains the indexers, which write the same index data as Magento’s own, and setup takes a few environment settings and a port the store can reach. Extensions that bring their own indexers, and custom indexers, are added per project.
Pick the language for the job
The useful Go vs PHP question names a job first. PHP keeps building pages, running checkout and the admin, and carrying everything extensions hook into, and none of that needs to move. A long job that splits into many parts and runs for hours is where Go’s model fits, and on Magento, the full reindex is that job.
Before you change anything, tune what Magento already offers. Then time each indexer and find the one your store waits on. If it is one of the indexers that forking can’t split, and the full reindex still runs into the working day, the settings have done what they can and the next step is the indexer itself. That is the one place on a Magento store where we think Go belongs, and everything your team touches stays in PHP.
If your nightly reindex is still running when the team logs in, send us your reindex times and we'll tell you whether tuning or a different indexer comes next.






























Share on: