# \#best-practices

**URL:** https://community.temporal.io/tag/best-practices/101.md

[Latest](https://community.temporal.io/latest.md) · [Categories](https://community.temporal.io/categories.md) · [Tags](https://community.temporal.io/tags.md)

---

## [Question on "Enterprise Temporal Microservices" example?](https://community.temporal.io/t/question-on-enterprise-temporal-microservices-example/12814)

<div class="topic-metadata">

**Author:** [@shawnFan](https://community.temporal.io/u/shawnFan)\
**Replies:** 1\
**Last updated:** [September 19, 2026, 5:56pm UTC](https://community.temporal.io/t/question-on-enterprise-temporal-microservices-example/12814 "2026-09-19T17:56:36Z")

</div>

I am new to Temporal and try to find some best-practices examples, Thanks in advance.

---

## [Design pattern for providing workflow-level customization in Temporal agents built using a code-first approach](https://community.temporal.io/t/design-pattern-for-providing-workflow-level-customization-in-temporal-agents-built-using-a-code-first-approach/19377)

<div class="topic-metadata">

**Author:** [@Mandar](https://community.temporal.io/u/Mandar)\
**Replies:** 0\
**Last updated:** [March 6, 2026, 6:31am UTC](https://community.temporal.io/t/design-pattern-for-providing-workflow-level-customization-in-temporal-agents-built-using-a-code-first-approach/19377 "2026-03-06T06:31:02Z")

</div>

I’m building an agent platform on Temporal (Python SDK) where agents and workflows are implemented using a code-first approach. These workflows orchestrate multiple activities and AI-driven steps to perform tasks such as…

---

## [Promise.get() vs Workflow.await() what are the major differences, and is there a performance benefit associated with one over the other](https://community.temporal.io/t/promise-get-vs-workflow-await-what-are-the-major-differences-and-is-there-a-performance-benefit-associated-with-one-over-the-other/7778)

<div class="topic-metadata">

**Author:** [@vikas\_kumar](https://community.temporal.io/u/vikas_kumar)\
**Replies:** 6\
**Last updated:** [August 5, 2025, 12:46pm UTC](https://community.temporal.io/t/promise-get-vs-workflow-await-what-are-the-major-differences-and-is-there-a-performance-benefit-associated-with-one-over-the-other/7778 "2025-08-05T12:46:16Z")

</div>

We have a use case where I have a parent Workflow and there is a child workflow that creates a task that requires human approval to get completed. Approval endpoints complete the task in which interns complete the child…

---

## [Observing issues with heartbeat in case of processing tasks](https://community.temporal.io/t/observing-issues-with-heartbeat-in-case-of-processing-tasks/16612)

<div class="topic-metadata">

**Author:** [@inishchith](https://community.temporal.io/u/inishchith)\
**Replies:** 1\
**Last updated:** [February 28, 2025, 7:23pm UTC](https://community.temporal.io/t/observing-issues-with-heartbeat-in-case-of-processing-tasks/16612 "2025-02-28T19:23:12Z")

</div>

Hi Team - I am also observing a pattern where I am using the auto\_heartbeater decorator to send activity heartbeats and my activities are failing with heartbeat timeouts.I have close to 10 activities running concurrentl…

---

## [Temporal throughput](https://community.temporal.io/t/temporal-throughput/2263)

<div class="topic-metadata">

**Author:** [@amlanroy1980](https://community.temporal.io/u/amlanroy1980)\
**Replies:** 16\
**Last updated:** [January 20, 2025, 7:22pm UTC](https://community.temporal.io/t/temporal-throughput/2263 "2025-01-20T19:22:10Z")

</div>

We are doing some testing with Temporal to understand how to tune all the available options to improve the throughput of the system. We are using three worker nodes to execute tasks, each with 4 cores and 8GB memory. Th…

---

## [Designing a Temporal Workflow for Intermittent Connectivity with Signal-Driven Activities](https://community.temporal.io/t/designing-a-temporal-workflow-for-intermittent-connectivity-with-signal-driven-activities/15504)

<div class="topic-metadata">

**Author:** [@Faheem](https://community.temporal.io/u/Faheem)\
**Replies:** 3\
**Last updated:** [December 4, 2024, 3:50pm UTC](https://community.temporal.io/t/designing-a-temporal-workflow-for-intermittent-connectivity-with-signal-driven-activities/15504 "2024-12-04T15:50:08Z")

</div>

Hello Temporal Community, We are working on temporalizing a worker management system integrated with a mobile application. Here’s the high-level workflow: Start Workflow: A signal from the mobile application triggers …

---

## [Running Temporal Worker and Workflow and activities inside a single .NET Web Api without seperate Worker](https://community.temporal.io/t/running-temporal-worker-and-workflow-and-activities-inside-a-single-net-web-api-without-seperate-worker/11258)

<div class="topic-metadata">

**Author:** [@George\_Kal](https://community.temporal.io/u/George_Kal)\
**Replies:** 5\
**Last updated:** [November 29, 2024, 4:07pm UTC](https://community.temporal.io/t/running-temporal-worker-and-workflow-and-activities-inside-a-single-net-web-api-without-seperate-worker/11258 "2024-11-29T16:07:06Z")

</div>

Hi all, I currently developing a dotnet 8 Web Api project with minimal api endpoints that trigger workflow execution and a seperate worker using Temporal hosting (AddHostedTemporalWorker) where all my activities and wo…

---

## [Separate Workers for Workflows and Activities](https://community.temporal.io/t/separate-workers-for-workflows-and-activities/4809)

<div class="topic-metadata">

**Author:** [@rifruf](https://community.temporal.io/u/rifruf)\
**Replies:** 2\
**Last updated:** [May 15, 2023, 3:15pm UTC](https://community.temporal.io/t/separate-workers-for-workflows-and-activities/4809 "2023-05-15T15:15:19Z")

</div>

Unsure if this is the right place to ask, but I’m working in a monorepo and have some questions about how temporal worker’s handle workflows and activities. Idea is that the directory structure looks something like this: …

---

## [Dependency Injection: Converting existing DI code to work with Temporal](https://community.temporal.io/t/dependency-injection-converting-existing-di-code-to-work-with-temporal/8302)

<div class="topic-metadata">

**Author:** [@Liad\_Davidson](https://community.temporal.io/u/Liad_Davidson)\
**Replies:** 4\
**Last updated:** [May 22, 2024, 12:12pm UTC](https://community.temporal.io/t/dependency-injection-converting-existing-di-code-to-work-with-temporal/8302 "2024-05-22T12:12:34Z")

</div>

Hi All, I was trying to convert some of our existing code to work with Temporal and run into a dead-end when needing to deal with Dependency Injection. Our code is a ASP.NET Core web API with various \[injected\] service…

---

## [C# - No DI - so how to pass IOptions into WF?](https://community.temporal.io/t/c-no-di-so-how-to-pass-ioptions-into-wf/12060)

<div class="topic-metadata">

**Author:** [@Travis](https://community.temporal.io/u/Travis)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 2:01pm UTC](https://community.temporal.io/t/c-no-di-so-how-to-pass-ioptions-into-wf/12060 "2024-05-10T14:01:48Z")

</div>

I have a workflow and I want to use IOptions from C# which a common practice to do in your services. However, it’s advised not to do that. How does one propose passing IOptions into Workflow? I could get them in progr…

---

## [Use cases for queries](https://community.temporal.io/t/use-cases-for-queries/3595)

<div class="topic-metadata">

**Author:** [@Aniket](https://community.temporal.io/u/Aniket)\
**Replies:** 5\
**Last updated:** [May 10, 2024, 12:12pm UTC](https://community.temporal.io/t/use-cases-for-queries/3595 "2024-05-10T12:12:38Z")

</div>

Hi, I am new to Temporal and trying to learn various concepts by doing a proof of concept. I was wondering about queries in workflows and where they would be useful. The only use case I could think of is to expose some i…

---

## [Best practices for long-running activities](https://community.temporal.io/t/best-practices-for-long-running-activities/934)

<div class="topic-metadata">

**Author:** [@Gordon\_Bean](https://community.temporal.io/u/Gordon_Bean)\
**Replies:** 9\
**Last updated:** [March 22, 2024, 4:51pm UTC](https://community.temporal.io/t/best-practices-for-long-running-activities/934 "2024-03-22T16:51:17Z")

</div>

I have an activity that can take up to 3 hours to complete. The activity is multi-threaded, so I cannot interleave calls to Activity.getExecutionContext.heartbeat() into the activity logic. What is the best way to impl…

---

## [Collecting results for bulk operations](https://community.temporal.io/t/collecting-results-for-bulk-operations/1541)

<div class="topic-metadata">

**Author:** [@Jeremy\_Convoy](https://community.temporal.io/u/Jeremy_Convoy)\
**Replies:** 22\
**Last updated:** [March 1, 2024, 5:10am UTC](https://community.temporal.io/t/collecting-results-for-bulk-operations/1541 "2024-03-01T05:10:41Z")

</div>

I have a case where I have several separate workflows that all need to do a similar activity (interacting with an external API). This API supports bulk requests, and I would like to collect up the requests for several wo…

---

## [How to get best Temporal Performance?](https://community.temporal.io/t/how-to-get-best-temporal-performance/10758)

<div class="topic-metadata">

**Author:** [@Parth\_Mangukiya](https://community.temporal.io/u/Parth_Mangukiya)\
**Replies:** 4\
**Last updated:** [January 24, 2024, 7:17am UTC](https://community.temporal.io/t/how-to-get-best-temporal-performance/10758 "2024-01-24T07:17:00Z")

</div>

We have deployed Temporal using Helm-chart and we are using PostgreSQL as persistence DB. Here is our services configuration: History: Replica: 5, CPU: 2000m, Memory: 8 Gi Worker: Replica: 3, CPU: 500m, Memory: 1 Gi F…

---

## [Handling race conditions of timestamped events](https://community.temporal.io/t/handling-race-conditions-of-timestamped-events/10765)

<div class="topic-metadata">

**Author:** [@Valentinas\_B](https://community.temporal.io/u/Valentinas_B)\
**Replies:** 3\
**Last updated:** [January 24, 2024, 7:10am UTC](https://community.temporal.io/t/handling-race-conditions-of-timestamped-events/10765 "2024-01-24T07:10:18Z")

</div>

Hello, I want to contemplate how Temporal handles (or not) race conditions with timestamped events. Let’s suppose we have a workflow that updates the product price. Imagine a scenario when two sequential events are pro…

---

## [Best-practices for structuring a workflow that involves many independent services](https://community.temporal.io/t/best-practices-for-structuring-a-workflow-that-involves-many-independent-services/3022)

<div class="topic-metadata">

**Author:** [@pattersp](https://community.temporal.io/u/pattersp)\
**Replies:** 2\
**Last updated:** [September 25, 2021, 2:53pm UTC](https://community.temporal.io/t/best-practices-for-structuring-a-workflow-that-involves-many-independent-services/3022 "2021-09-25T14:53:41Z")

</div>

Hi there, Brand new to Temporal and I’m still working my way through the documentation and videos, so I apologize in advance if this is a stupid question :slight\_smile: Here is an outline of my current data pipeline (l…

---

## [Help with Running Temporal Workers on ASP.NET (Core) Web Application](https://community.temporal.io/t/help-with-running-temporal-workers-on-asp-net-core-web-application/9756)

<div class="topic-metadata">

**Author:** [@npinti](https://community.temporal.io/u/npinti)\
**Replies:** 2\
**Last updated:** [October 11, 2023, 6:06pm UTC](https://community.temporal.io/t/help-with-running-temporal-workers-on-asp-net-core-web-application/9756 "2023-10-11T18:06:21Z")

</div>

Hi, I am currently building an AspNet (Core) website which aims to trigger long running workflows. I tried following the examples here, however, I am having a hard time in getting things to run, so any insight on what I…

---

## [Cassandra capacity and provision estimates](https://community.temporal.io/t/cassandra-capacity-and-provision-estimates/9252)

<div class="topic-metadata">

**Author:** [@Adi\_V](https://community.temporal.io/u/Adi_V)\
**Replies:** 0\
**Last updated:** [August 20, 2023, 6:11pm UTC](https://community.temporal.io/t/cassandra-capacity-and-provision-estimates/9252 "2023-08-20T18:11:41Z")

</div>

Hi All, I am new to Temporal and wanted to understand how to go about estimating the Cassandra capacity provisioning based on the number of workflows and activities. e.g. How do go translating the Temporal workflow esti…

---

## [Activity retries without exception](https://community.temporal.io/t/activity-retries-without-exception/2699)

<div class="topic-metadata">

**Author:** [@nkatre](https://community.temporal.io/u/nkatre)\
**Replies:** 12\
**Last updated:** [August 16, 2023, 4:23pm UTC](https://community.temporal.io/t/activity-retries-without-exception/2699 "2023-08-16T16:23:04Z")

</div>

Hi, I have a very open ended question here. I am trying to model a step in temporal which does the following: Poll external service and get response Persist the response in a database Retry the above steps in sequence…

---

## [Computation Graph Orchestration](https://community.temporal.io/t/computation-graph-orchestration/8177)

<div class="topic-metadata">

**Author:** [@cya](https://community.temporal.io/u/cya)\
**Replies:** 3\
**Last updated:** [May 8, 2023, 4:57pm UTC](https://community.temporal.io/t/computation-graph-orchestration/8177 "2023-05-08T16:57:06Z")

</div>

Hello, I have a computation graph as following Arrows represent input-output requirements between tasks. Nevermind the start and end nodes, they are dummy placeholders. Each task depends on some other task’s output …

---

## [Implementing actor supervision with temporal](https://community.temporal.io/t/implementing-actor-supervision-with-temporal/8061)

<div class="topic-metadata">

**Author:** [@peter\_royal](https://community.temporal.io/u/peter_royal)\
**Replies:** 6\
**Last updated:** [April 29, 2023, 7:59pm UTC](https://community.temporal.io/t/implementing-actor-supervision-with-temporal/8061 "2023-04-29T19:59:34Z")

</div>

i’m wondering if there are any best practices on using long-running workflows as actors. this simple case seems straightforward - signals and queries are inputs and outputs, the workflow method is the state machine loop…

---

## [Idempotent "apply" operation for Temporal Schedules](https://community.temporal.io/t/idempotent-apply-operation-for-temporal-schedules/8081)

<div class="topic-metadata">

**Author:** [@GreyTeardrop](https://community.temporal.io/u/GreyTeardrop)\
**Replies:** 0\
**Last updated:** [April 29, 2023, 3:54pm UTC](https://community.temporal.io/t/idempotent-apply-operation-for-temporal-schedules/8081 "2023-04-29T15:54:52Z")

</div>

Hi Temporal team! First of all - thank you for building Schedules, love how this new feature separates the concern of a “schedule” from the workflow. It looks both more powerful and easier to use than cron workflows. I…

---

## [Max number of jobs a worker can take from a queue](https://community.temporal.io/t/max-number-of-jobs-a-worker-can-take-from-a-queue/7984)

<div class="topic-metadata">

**Author:** [@sashker](https://community.temporal.io/u/sashker)\
**Replies:** 5\
**Last updated:** [April 26, 2023, 11:20pm UTC](https://community.temporal.io/t/max-number-of-jobs-a-worker-can-take-from-a-queue/7984 "2023-04-26T23:20:45Z")

</div>

Hello. I want to limit the number of jobs each worker can take from a queue, so it doesn’t get overloaded by parallel heavy activities. I’m planning horizontally scale the number of workers if I need, but each one shoul…

---

## [Lowest achievable latency](https://community.temporal.io/t/lowest-achievable-latency/7990)

<div class="topic-metadata">

**Author:** [@Simon\_Hege](https://community.temporal.io/u/Simon_Hege)\
**Replies:** 2\
**Last updated:** [April 21, 2023, 11:26pm UTC](https://community.temporal.io/t/lowest-achievable-latency/7990 "2023-04-21T23:26:34Z")

</div>

Hi I’m evaluating the usability of temporal for our application, and I’m interested in performance aspects especially added latency. From other posts, such as Low latency - Stateless Workflow, I understood that I should…

---

## [Capacity Planning for a Higher Throughput Temporal Cluster](https://community.temporal.io/t/capacity-planning-for-a-higher-throughput-temporal-cluster/7894)

<div class="topic-metadata">

**Author:** [@matthew.hou.paytm](https://community.temporal.io/u/matthew.hou.paytm)\
**Replies:** 0\
**Last updated:** [April 13, 2023, 12:56am UTC](https://community.temporal.io/t/capacity-planning-for-a-higher-throughput-temporal-cluster/7894 "2023-04-13T00:56:45Z")

</div>

Hi folks. We are investigating the feasibility and resource requirements of a somewhat high throughput, low latency Temporal cluster. Here are the high level requirements: Throughput: Short term: 100 wf completion / s…

---

## [Best way to handle status check using activity](https://community.temporal.io/t/best-way-to-handle-status-check-using-activity/7695)

<div class="topic-metadata">

**Author:** [@rahulkumar](https://community.temporal.io/u/rahulkumar)\
**Replies:** 4\
**Last updated:** [March 27, 2023, 12:32pm UTC](https://community.temporal.io/t/best-way-to-handle-status-check-using-activity/7695 "2023-03-27T12:32:58Z")

</div>

I am trying to orchestrate some k8s object using temporal. I want to implement status check on k8s resource, how can I do it ? A few approaches I thought of were: Let the activity to check status be short-lived, and…

---

## [Callback progress updates/intermediate results from activity/workflow to external API](https://community.temporal.io/t/callback-progress-updates-intermediate-results-from-activity-workflow-to-external-api/6920)

<div class="topic-metadata">

**Author:** [@cya](https://community.temporal.io/u/cya)\
**Replies:** 2\
**Last updated:** [January 13, 2023, 8:08pm UTC](https://community.temporal.io/t/callback-progress-updates-intermediate-results-from-activity-workflow-to-external-api/6920 "2023-01-13T20:08:47Z")

</div>

Hello, in my case I have the following: A web backend, in python flask A long running computation graph with multiple python executables. Some executables are running in parallel, some chained together. Computation gra…

---

## [What is the best practice to organize workflow with one to many relationship (each child is also flow of actions that could be organized as workflow)](https://community.temporal.io/t/what-is-the-best-practice-to-organize-workflow-with-one-to-many-relationship-each-child-is-also-flow-of-actions-that-could-be-organized-as-workflow/6782)

<div class="topic-metadata">

**Author:** [@Jaraxxusx](https://community.temporal.io/u/Jaraxxusx)\
**Replies:** 6\
**Last updated:** [January 12, 2023, 9:43pm UTC](https://community.temporal.io/t/what-is-the-best-practice-to-organize-workflow-with-one-to-many-relationship-each-child-is-also-flow-of-actions-that-could-be-organized-as-workflow/6782 "2023-01-12T21:43:58Z")

</div>

Hello team. We trying to implement order system with payments. Order could have multiple payments (like many credit cards), all service will be supported by us. We designed an order workflow for it and currently figuring…

---

## [Passing DB/Connection Objects to Activities](https://community.temporal.io/t/passing-db-connection-objects-to-activities/5925)

<div class="topic-metadata">

**Author:** [@mdross95](https://community.temporal.io/u/mdross95)\
**Replies:** 1\
**Last updated:** [September 8, 2022, 8:22pm UTC](https://community.temporal.io/t/passing-db-connection-objects-to-activities/5925 "2022-09-08T20:22:24Z")

</div>

Hello, I am developing an API server in Go that will be using Temporal. My setup so far is as follows: each API endpoint has a corresponding handler function that does some boilerplate and then calls a workflow specific…

---

## [Worker Setup for API With Parallel Execution Job](https://community.temporal.io/t/worker-setup-for-api-with-parallel-execution-job/5863)

<div class="topic-metadata">

**Author:** [@mdross95](https://community.temporal.io/u/mdross95)\
**Replies:** 2\
**Last updated:** [September 6, 2022, 1:43pm UTC](https://community.temporal.io/t/worker-setup-for-api-with-parallel-execution-job/5863 "2022-09-06T13:43:14Z")

</div>

Hello, I am developing an API service that will be using Temporal. My setup so far is having one workflow per endpoint, with each workflow containing one or more activities depending on the complexity of the business lo…

[Next page](https://community.temporal.io/tag/best-practices/101.md?match_all_tags=true&page=1&tags%5B%5D=best-practices)
