Temporal Architecture Flashcards
(6 cards)
Temporal platform architecture
You can think of the Temporal Platform as having two parts
On one side, you have the server. The Temporal Server consists of a frontend service, plus several backend services that work together to manage the execution of your application code. All of those services are horizontally scalable and a production environment will typically run multiple instances of each, deployed across multiple machines, to increase performance and availability.
On the other side, you have clients that communicate with the Temporal Server. You’ll work with three types of clients in this course:
Temporal’s command-line interface (CLI)
Temporal’s web-based user interface (Web UI)
A Temporal Client embedded into the applications you run
Front End Service
Note that the frontend service that is part of the Temporal Server acts as an API gateway. In other words, it is a frontend for clients, not end users (end users will interact with the CLI or Web UI). Clients communicate with the Temporal Server by issuing requests to this Frontend Service. The Frontend Service then communicates with backend services, as necessary to fulfill the request, and then returns a response to the client.
Temporal Cluster
Temporal Cluster, which is a deployment of the Temporal Server software on some number of machines, plus the additional components used with it. The only required component is a database, such as Apache Cassandra, PostgreSQL, or MySQL. The Temporal Cluster tracks the current state of every execution of your Workflows. It also maintains a history of all Events that occur during their executions, which it uses to reconstruct the current state in case of failure. It persists this and other information, such as details related to durable timers and queues, to the database.
Elasticsearch is an optional component. It’s not necessary for basic operation, but adding it will give you advanced searching, sorting, and filtering capabilities for information about current and recent Workflow Executions. This is helpful when you run Workflows millions of times and need to locate a specific one; for example, based on when it started, how long it took to run, or its final status.
Two other tools are often used with Temporal. Prometheus is used to collect metrics from Temporal, while Grafana is used to create dashboards based on those metrics. Together, these tools help operations teams monitor cluster and application health.
Workers
Temporal Cluster does not execute your code. The execution of your application code is external to the cluster, and in typical deployments, takes place on a separate set of servers. Worker is part of the application. Each machine running a Worker will require connectivity to the Cluster’s Frontend Service, which listens on TCP port 7233 by default.
Application
The application will contain the code used to initialize the Worker, the Workflow and other functions that comprise your business logic, and possibly also code used to start or check the status of the Workflow.
Temporal Deployment Options
Self-Hosted, Temporal Cloud