MagoCloud Architecture

Since Mago Cloud is a software based on distributed architecture on microservices, we designed and named the components inspired by a sort of logical topography.

We have organized the topographic space into two different entities: Domains (pure metadata) and Instances (concrete installation of software services).

The Domain is a metadata that has the purpose of grouping different Instances of the product. This grouping can take place on the basis of the commercial or technical characteristics of the various Instances that are part of it. For example, we may have a Domain to which all instances similar by configuration, such as all enterprise instances or all instances intended for small business, belong.

The instance is a set of microservices that make up the MagoCloud product. The instance is seen by the user as a single product, but inside it’s made up of a family of isolated and communicating services.

The key concept we want to focus on is the instance, which represents a delocalized installation of MagoCloud on a cloud platform, this can be managed by Zucchetti or inserted in a private cloud.

The instance is made up of multiple microservices, a suite of services each running in its own process and in communication with the other microservices. These can be deployed independently and in an automated way, don’t require a specific programming language and allow a series of different Storage technologies.

Microservices are contained in Containers, special spaces that approximate a virtual machine, but which limit the level of abstraction to the operating system only and are managed by Container engines such as Docker.

The MagoCloud instance consists of a frontend and a backend consisting of several microservices, which are deployed with Docker technology.


SPA (Single Page Application) Angular, communicates with the backend via REST API and websocket.


It consists of the following microservices:

  • Traefik: Api gateway and instance load balancer. A proxy like this is activated as an additional security component to protect web servers, to accept requests from the Internet in their place and forward them to the backend. It allows you to control incoming data traffic, to make several servers available with the same URL, to distribute requests equally across multiple servers and to speed up the opening of data through the caching process.
  • TbGate: Load balancer, monitor and life cycle manager of TbServer instances. It instantiates a TbServer for each MagoCloud user (including headless), managing the handshake for the creation of a websocket channel between client and TbServer. It is also aggregator of TbServer metrics and logs, exposing them to Prometheus and LOKI respectively.
  • TbServer: management backend, heart of MagoCloud.
  • AccountManager: It is the instance authentication and authorization service. It interfaces with the Cloud Console provisioning service during login, and then shares information with other instance microservices via Redis.
  • MenuService: Dynamically provide the menu structure to the frontend.
  • ReportService: It deals with reporting.
  • DataService: Provides API for accessing management data.
  • ErpWebApi: Provides management APIs.
  • Scheduler: Manages the scheduling and execution of jobs.
  • MicroDms: Document management system.
  • LogService:Aggregate frontend logs to redirect them to LOKI.
  • My Mago Studio: Allows you to make changes to the interface and MagoCloud documents.
  • ESP: Data integration between systems.
  • MicroMessaging: Gateway for messaging (eg mail). It receives messages via RabbitMQ and interfaces directly with an SMTP server.

Interaction between services

The services communicate with each other using a logical name / url map.

The interaction takes place through REST API and RabbitMQ, a middleware Message Broker that has the purpose of mediating / managing asynchronous communication between microservices. This asynchronous system gives microservices the ability to continue operating even if there is no immediate response. ​​​​​​

Scalability and High Reliability

The services are scalable horizontally (even on multiple machines) using docker swarm.

In the event of problems detected through monitoring, the frontend is redirected to a clone instance.

User Gateway

User Gateway is the single access point to MagoCloud. It’s a web application that allows you to authenticate with credentials, choose a subscription and access the product.

User Gateway is a global endpoint. It is a single URL available on the Internet and is valid for all users, in any geographic area. Thanks to the User Gateway you have a unique URL to access your subscription and instance of MagoCloud.

Let’s consider this component from the point of view of the user experience. User Gateway is the first frontend you encounter when you log into MagoCloud. The first thing you need to do is enter your credentials (username and password). If the authentication is successful, you can access your subscription (or select the one of interest from the available ones) and start working with MagoCloud.

Now let’s look at the process from a technical perspective to understand what goes on behind the scenes, and which microservices are involved in this process.

We are at your disposal. Tell us about your management project