Skip to content

1.1. Infrastructure

Jimmy Bourque edited this page Nov 30, 2026 · 1 revision

Français

Low-Cost Topology

The infrastructure is designed as a low-cost model. First, it does not require a database, which helps avoid the additional costs associated with that resource. The website does not require many resources because it only provides the Single-Page App (SPA) and computes API calls that generate messages, pull state from the transaction blob storage, manage the user cache, etc. These operations are very lightweight.

Generator instances can also run outside the cloud provider. If high availability is not required, an on-premises Docker installation may be sufficient. For workload redundancy, a second Docker instance can be deployed. Deploying to production will be more efficient using a Kubernetes cluster.

The number of containers listening to each queue should be adjusted based on demand. As a general recommendation, instantiate three times as many containers for moderated and fast-processing instances.

Workload Distribution Architecture

  1. The WebApi (user portal) is a public-facing instance.
    1.1. It is recommended to place this instance behind an Azure Application Proxy.

  2. The Generator Workload can be hosted either on a cloud containerization service or on an on-premises infrastructure.
    2.1. The Generator instances do not need to be publicly exposed.
    2.2. There is no direct communication between the WebApi and the Generator Instances.

Resiliency

This architecture ensures a high availability by using PaaS resources such as Azure App Service.

Running multiple Generator containers that listen to the same queue across more than one Docker instance helps improve workload availability in the event of a failure.

For a production environment requiring high availability, you should use managed resources for both WebApi and Generator instances.

Security

1. WebApi

The WebApi implements the OpenID Connect protocol. Because the user interface is a Single Page Application (SPA), authentication is handled using the Implicit Flow.

image

The project is configured to use Azure Entra ID via an App Registration that supports OpenID Connect. Since there is no direct communication between the WebApi and the Generator, OpenID Connect was not required for any Generator instance.

Performance

If users experience unusual latency, investigate which operation is causing the lag. Once all event-driven operations have been identified, add additional Generator containers to listen to the queue involved in the message processing delay.

Refer to the Transactions and processors documentation to identify the queue configured for each operation. The WebApi includes configuration settings that define which queue messages are sent to for each event-driven message type.

Finance

For cost optimization, we recommend using a minimal Always On App Service configuration. Overall costs will mainly depend on the number of WebApi instances you enable.

The Storage Account typically represents a low monthly cost, usually only a few dollars.

If you run the generator containers on-premises using Docker, allocate at least the following resources per container:

Container type RAM CPU
Web API utilisateur 512 MB 1 CPU
Admin API 512 MB 1 CPU
Generator fast 512 MB 0.25 CPU
Generator moderated 512 MB 0.25 CPU
Generator slow 1 GB 1 CPU
Indexer 512 MB 0.5 CPU
Catalog 512 MB 0.5 CPU

Running your workload on a managed containerized service can have a significant impact on costs.

If Application Insights is enabled, make sure to configure the appropriate data retention period according to your monitoring and compliance requirements.

Clone this wiki locally