elena review

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
Hannah Hunter 2024-06-12 11:12:10 -04:00
parent 4292af2454
commit 2d3b49194f
7 changed files with 8 additions and 14 deletions

View File

@ -5,7 +5,7 @@ linkTitle: "Placement"
description: "Overview of the Dapr placement service"
---
The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). Grouped by namespace, the hash tables map actor types to pods or processes so a Dapr application can communicate with the actor. Anytime a Dapr application activates a Dapr actor, the placement updates the hash tables with the latest actor locations.
The Dapr Placement service is used to calculate and distribute distributed hash tables for the location of [Dapr actors]({{< ref actors >}}) running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}). Grouped by namespace, the hash tables map actor types to pods or processes so a Dapr application can communicate with the actor. Anytime a Dapr application activates a Dapr actor, the placement service updates the hash tables with the latest actor locations.
## Self-hosted mode
@ -67,7 +67,7 @@ updatedAt | timestamp | Timestamp of the actor registered/updated.
{
"hostList": [{
"name": "198.18.0.1:49347",
"namespace": "ns1",
"namespace": "ns1",
"appId": "actor1",
"actorTypes": ["testActorType1", "testActorType3"],
"updatedAt": 1690274322325260000
@ -87,7 +87,8 @@ updatedAt | timestamp | Timestamp of the actor registered/updated.
"updatedAt": 1690274322325260000
}
],
"tableVersion": 1
"tableVersion": 1,
"apiLevel": 20
}
```

View File

@ -56,7 +56,7 @@ You would use Dapr Workflow when you need to define and orchestrate complex work
### Namespaced actors
Dapr supports namespaced actors. For example, with Dapr's multi-tenant placement service, sidecars belonging to a tenant named "Tenant A" won't receive placement information for "Tenant B". This means that multiple tenants can have actor types with the same name.
Dapr supports namespaced actors. For example, with Dapr's multi-tenant placement service, where each tenant has its own namespace, sidecars belonging to a tenant named "Tenant A" won't receive placement information for "Tenant B". This means that multiple tenants can have actor types with the same name.
[Learn more about namespaced actors and how they work.]({{< ref namespaced-actors.md >}})

View File

@ -24,15 +24,8 @@ If you're moving to a new namespace and starting to use a new state store, make
## Backwards compatibilty
Namespaced actors are backwards compatible, allowing you to block newer sidecar versions from seeing the actor types within older sidecar versions.
Depending on whether mTLS is enabled, the namespace is either:
- Verified through Spiffe ID (mTLS enabled), or
- Accepted as-is (mTLS not enabled)
### With mTLS enabled
Let's say you've enabled mTLS. As soon as the placement server is updated, the sidecars in namespace X (A, B, and C) can see each others actor types, and no others. The same is true for sidecars D, E, and F in namespace Y.
Namespaced actors are backwards compatible for deployments that use mTLS, because the sidecar's namespace is inferred from the Spiffe ID, allowing for multi-tenancy out-of-the-box.
When mTLS is not enabled we default to what is explained below.
<img src="/images/namespaced-actors-with-mtls.png" width=900>
@ -44,7 +37,7 @@ Sidecars C, E, and F, however, can see each others actor-types.
<img src="/images/namespaced-actors-without-mtls.png" width=900>
For older sidecars that don't use mTLS, the placement service uses a special “empty” namespace. When these sidecars connect to a new placement service, they only get the actor types hosted on other old sidecars in the empty namespace that are not on mTLS.
For pre-v1.14 sidecars that don't use mTLS, the placement service uses a special “empty” namespace. When these sidecars connect to a new placement service, they only get the actor types hosted on other pre-v1.14 sidecars in the empty namespace that are not on mTLS.
<img src="/images/empty-namespace.png" width=900>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 63 KiB