Magento Software as a Service Architecture

Yegor Shytikov
2 min readJun 25, 2021

I want to write an article about how a serverless Magento Magneto SaaS () commerce works.

Magneto SaaS

The Magneto SaaS invocation flow is a set of services working together.

These services are:

  • Container — A secure environment for customers to execute Magento code in. This Container downloading the Magento 2 Custom Fork code package and executing it in an environment.
  • SaaS Manager — It tracks the usage of resources and execution environments and handles the assignments of requests.
  • SaaS Worker — This receives function invocation requests, validates them, and dispatches the requests to the proper Container
  • Load Balancer — Distributes invocation requests to multiple frontend invokers in different availability zones. When AZ failures are detected, requests are routed to alternate AZ’s automatically.

To put the above services into some flow to understand how they’d interact with one another, it would look a bit like this:

  1. A Load Balancer passes incoming invocation requests to a selected Container.
  2. The SaaS Worker (Ingres) validates the quests and asks the SaaS Manager for a sandboxed function to handle the function invocation.
  3. The SaaS Manager either finds a pre-existing Container or creates one in advance. All Scaling happened only in advance Magneto SaaS always has a pool of free EC2 to scale the load. The speed of the container up and running is 5 seconds per container.
  4. A Container executes Magento code.

The Container is typically EC2 instances that have multiple Magento containers being executed on them. To keep this method of execution secure, each function is isolated from other containers without any conflict between the installations.

The Container can be re-used for another invocation of the same store, but a container will never be shared between different Stores. These containers have a lifespan of the execution of the request and are then destroyed after 10 minutes delay.

The powerful technology that provides this functionality is Containered. It manages the complete SaaS Magneto container lifecycle of its host Linux system(EC2).

Magento SaaS orcehstration

I hope this has been useful, and you’re now a little more aware of just exactly how it can provide us with this incredibly powerful SaaS technology.

Feel free to drop a question on the email as always : (yegorshytikov@gmail.com)

--

--

Yegor Shytikov

True Stories about Magento 2. Melting down metal server infrastructure into cloud solutions.