You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Managing Actions per Second (APS) limits in Temporal Cloud](/best-practices/managing-aps-limits)
38
+
30
39
## Naming Conventions
31
40
32
41
### Use lowercase and hyphens
@@ -66,30 +75,72 @@ If you need to include region, use short codes (e.g., `aps1`, `use1`).
66
75
67
76
## Organizational Patterns
68
77
78
+
### Choose your Namespace boundary intentionally
79
+
80
+
Start with the smallest number of Namespaces that gives you clear ownership and safe isolation.
81
+
In Temporal Cloud, a Namespace boundary affects:
82
+
83
+
-[APS limits](/cloud/limits#actions-per-second) and rate limiting
84
+
- access control and credential scope
85
+
- blast radius for misconfigured or overloaded Workers
86
+
- observability boundaries for dashboards and alerts
87
+
- operational overhead for provisioning, tagging, and lifecycle management
88
+
89
+
Use the following decision table as a starting point:
90
+
91
+
| If you need... | Prefer... | Why |
92
+
|---|---|---|
93
+
| Basic environment isolation for a single application or use case | Namespace per use case and environment | This is the simplest pattern and works well for most initial deployments |
94
+
| Separate operational ownership for services within the same use case | Namespace per use case, service, and environment | This isolates credentials, limits, and operational changes per service |
95
+
| Stronger boundaries across teams, domains, or business capabilities | Namespace per use case, domain, and environment | This reduces blast radius and lets teams own their own Namespace contracts |
96
+
| Tenant-specific credentials, rate limits, or compliance boundaries | Namespace per tenant | Use this only for a small number of high-value tenants because of the operational overhead |
97
+
98
+
As a default, start with one Namespace per use case and environment. Split later when APS pressure, security
99
+
requirements, ownership boundaries, or troubleshooting needs justify the extra operational cost.
100
+
69
101
### Pattern 1: Namespace per use case and environment
70
102
71
103
For simple configurations without multiple services or team boundaries.
72
104
73
-
**Naming convention**: `<use-case>_<environment>`
105
+
**Naming convention**: `<use-case>-<environment>`
106
+
107
+
**Example**: `payments-prd`, `orders-dev`
74
108
75
-
**Example**: `payments_prod`, `orders_dev`
109
+
Choose this pattern when:
110
+
111
+
- one team owns the use case
112
+
- environments need clean separation
113
+
- workload volume and criticality do not yet require further isolation
76
114
77
115
### Pattern 2: Namespace per use case, service, and environment
78
116
79
117
When multiple services that are part of the same use case communicate externally to Temporal via API (HTTP/gRPC).
- multiple teams or domains need independent release cadence and ownership
141
+
- failures in one domain should not affect the others
142
+
- you want a stronger permission boundary between capabilities
143
+
- you plan to expose cross-Namespace contracts through Nexus
93
144
94
145
For systems without Nexus, services can communicate via [Signals](/sending-messages#sending-signals) or [Child Workflows](/child-workflows) within the same Namespace.
95
146
@@ -98,6 +149,33 @@ When multiple teams share a Namespace, prefix each Workflow ID with a service-sp
98
149
Task Queue names must also be unique within the Namespace.
99
150
:::
100
151
152
+
### Pattern 4: Namespace per tenant
153
+
154
+
Use a separate [Namespace](/namespaces) per tenant only when each tenant needs a true isolation boundary.
155
+
156
+
This is usually appropriate only for a small number of high-value tenants that require:
157
+
158
+
- dedicated credentials and access control
159
+
- tenant-specific rate limits or capacity decisions
160
+
- strict compliance or data-isolation boundaries
161
+
- independent debugging, alerting, and operational ownership
162
+
163
+
For most SaaS use cases, a shared Namespace with per-tenant [Task Queues](/task-queue) is simpler and more scalable.
164
+
See [Multi-tenant application patterns](/production-deployment/multi-tenant-patterns) for those designs.
165
+
166
+
### What should cause you to split a Namespace later?
167
+
168
+
Revisit your topology when one or more of the following becomes true:
169
+
170
+
- one workload is consuming enough APS that it regularly threatens others in the same Namespace
171
+
- one team needs tighter access controls or dedicated credentials
172
+
- production troubleshooting requires clearer dashboards, alerts, or ownership boundaries
173
+
- one application or domain is business-critical enough that its blast radius must be reduced
174
+
- a tenant or regulated workload needs stronger separation than Task Queue isolation can provide
175
+
176
+
Splitting a Namespace increases safety, but it also adds overhead for provisioning, tagging, credentials, and cross-Namespace coordination.
177
+
Use [Nexus](/nexus) where possible instead of sharing Temporal primitives across team or domain boundaries.
178
+
101
179
## Production Safeguards
102
180
103
181
### Use an Authorizer (open source only) {#authorizer}
Copy file name to clipboardExpand all lines: docs/cloud/get-started/namespaces.mdx
+4-70Lines changed: 4 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,77 +235,11 @@ See the [`tcld` namespace create](/cloud/tcld/namespace/#create) command referen
235
235
236
236
## What are some Namespace best practices? {#best-practices}
237
237
238
-
This section provides general guidance for organizing [Namespaces](/namespaces) across use cases, services,
239
-
applications, or domains. Temporal Cloud provides Namespace–as-a-service, so the Namespace is the endpoint. Customers
240
-
should consider not only a Namespace naming convention but also how to group or isolate workloads using the Namespace as
241
-
a boundary.
238
+
For guidance on how many Namespaces to create, how to split workloads across services or domains, and when to isolate
239
+
tenants or teams, see [Namespace best practices](/best-practices/managing-namespace).
242
240
243
-
Each team can have their own Namespace for improved modularity, security, debugging, and fault isolation. Namespaces
244
-
contain the blast radius of misbehaving Workers that may exhaust rate limits. Sensitive Workflow state (PCI data) can be
245
-
secured with per-Namespace permissions and encrypted with a separate encryption key.
246
-
247
-
Temporal Applications in different Namespaces may be connected with [Nexus](/cloud/nexus) by exposing a clean service
248
-
contract for others to use with built-in [Nexus access controls](/cloud/nexus/security). Nexus supports cross-team,
249
-
cross-domain, multi-region, and multi-cloud use cases.
250
-
251
-
### Constraints and limitations
252
-
253
-
Before considering an appropriate Namespace configuration, you should be aware of the constraints
254
-
listed on the [Temporal Cloud Limits](/cloud/limits) page.
255
-
256
-
For advice on managing Namespaces within limits, see the [Namespace Best Practices](/best-practices/managing-namespace) page.
257
-
258
-
### General guidance
259
-
260
-
Namespace configuration requires some consideration. Following are some general guidelines to consider.
261
-
262
-
- Namespaces are usually defined per use case. A use case can encompass a broad range of Workflow types and a nearly
263
-
unlimited scale of concurrent [Workflow Executions](/workflow-execution).
264
-
- Namespaces can be split along additional boundaries such as service, application, domain or even sub-domain.
265
-
- Namespaces should be used to reduce the "blast radius" for mission-critical applications.
266
-
- Environments such as production and development usually have requirements for isolation. We recommend that each
267
-
environment has its own Namespace.
268
-
- Namespaces should be used to reduce the "blast radius" for mission-critical applications.
269
-
- Use [Nexus](/nexus) to communicate across team, domain, and Namespace boundaries with a clean service contract instead of sharing Temporal primitives directly.
270
-
Nexus enables each team to have their own Namespace for improved security, troubleshooting, and fault isolation while sharing capabilities through Nexus Endpoints.
271
-
272
-
### Examples
273
-
274
-
Following are some ideas about how to organize Namespaces.
275
-
276
-
#### Example 1: Namespace per use case and environment
277
-
278
-
We recommend using one Namespace for each use case and environment combination for simple configurations in which
279
-
multiple services and team or domain boundaries don't exist.
280
-
281
-
Sample naming convention:
282
-
283
-
<pre><use-case>_<environment></pre>
284
-
285
-
#### Example 2: Namespace per use case, service, and environment
286
-
287
-
We recommend using one Namespace for each use case, service, and environment combination when multiple services that are
288
-
part of same use case communicate externally to Temporal via API (HTTP/gRPC).
0 commit comments