Worker service dependency on workflows

Hi: I am trying to understand better way to start new worker service independently from the actual workflow code. In example here https://docs.temporal.io/docs/go-workers I see below code block to start a new worker.


worker := worker.New(serviceClient, TaskQueue, worker.Options{})
worker.RegisterWorkflow(MyWorkflow)
worker.RegisterActivity(MyActivity)
err = worker.Start()

So for each new workflow, is it recommended to have at least one dedicated worker?
Or can I start the worker separately and keep it running/ listening for new tasks from multiple workflows?

Can I register new activities, workflows AFTER starting the worker?
Example flow: I have worker service deployed next to temporal service and register a workflow and one ore more activities. The worker service keeps polling temporal service for new tasks.

Separately I keep updating my workflow code to add more tasks/activities and register those activities to an existing worker service. Is this supported?
If a worker is executing an activity which basically is waiting for next signal (wait for say 24 hours before triggering next activity); during this 24 hour wait period, can worker service pick up a new workflow if triggered (assuming temporal supports registering multiple workflows with same worker service?

So for each new workflow, is it recommended to have at least one dedicated worker?
Or can I start the worker separately and keep it running/ listening for new tasks from multiple workflows?

You can register as many workflows as necessary with a single worker.

Separately I keep updating my workflow code to add more tasks/activities and register those activities to an existing worker service. Is this supported?

You have to restart the worker to change the list of registered activities and workflows. If you need to add them dynamically you can register DynamicWorkflow and DynamicActivity to support any number of types.

If a worker is executing an activity which basically is waiting for next signal (wait for say 24 hours before triggering next activity); during this 24 hour wait period, can worker service pick up a new workflow if triggered (assuming temporal supports registering multiple workflows with same worker service?

Worker caches workflows as a performance optimization. But as soon as a workflow is pushed out of the worker cache it is not going to use any worker resources until it is woken up by the signal or timer. So a single worker can process an unlimited number of parallel workflows if it can keep up with the update rate.