Role and scale up/down information about each services in Temporal

Team, I have below doubts

Q1). May I know the role of worker service and history service?
because, Minimalistic information provided in the doc.
Says, matching service manages Workflow state transition.
what does state transition mean ?
And mentioned, worker service is doing some background processing.
What exactly the background process??

Q2). Also, if we wanted to scale Temporal, can we scale up/down either of the service as per our product required ?

Q3). Is that possible to scale up/down database alone if it is required in future??
Right now we don’t know about the load that is why asking now.

Q1). May I know the role of worker service and history service?
because, Minimalistic information provided in the doc.
Says, matching service manages Workflow state transition.
what does state transition mean ?

Every time the workflow state is updated we call it a state transition. It roughly corresponds to a single DB update. The workflow state is always updated by the history service. A workflow start or an activity completion are example of state transitions.

And mentioned, worker service is doing some background processing.
What exactly the background process??

The worker service hosts system workflows. For example batch operations are implemented as a system workflow.

MySQL/PostreSQL don’t support TTLs for records out of the box. So a system workflow runs in the background scanning data periodically to enforce TTLs for MySQL/PostreSQL.

Q2). Also, if we wanted to scale Temporal, can we scale up/down either of the service as per our product required ?

Yes, any of the Temporal roles can be scaled up and down independently. Note that a correctly provisioned and scaled Temporal cluster can always saturate its DB to 100% capacity.

Q3). Is that possible to scale up/down database alone if it is required in future??
Right now we don’t know about the load that is why asking now.

It depends on the DB. I believe Cassandra can be scaled up and down. Amazon RDS and Aurora support changing the DB capacity as well.

2 Likes