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
Copy file name to clipboardExpand all lines: daprdocs/content/en/concepts/dapr-services/placement.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,3 +14,72 @@ The placement service Docker container is started automatically as part of [`dap
14
14
## Kubernetes mode
15
15
16
16
The placement service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}).
17
+
18
+
## Placement tables
19
+
20
+
There is an HTTP API `/placement/state` for placement service that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm you just need to set `dapr_placement.metadataEnabled` to true.
21
+
22
+
### Usecase:
23
+
The placement table API can be used for retrieving the current placement table, which contains all the actors registered. This can be helpful for debugging and allows tools to extract and present information about actors.
24
+
25
+
### HTTP Request
26
+
27
+
```
28
+
GET http://localhost:<healthzPort>/placement/state
29
+
```
30
+
31
+
### HTTP Response Codes
32
+
33
+
Code | Description
34
+
---- | -----------
35
+
200 | Placement tables information returned
36
+
500 | Placement could not return the placement tables information
37
+
38
+
### HTTP Response Body
39
+
40
+
**Placement tables API Response Object**
41
+
42
+
Name | Type | Description
43
+
---- | ---- | -----------
44
+
tableVersion | int | The placement table version
45
+
hostList | [Actor Host Info](#actorhostinfo)[] | A json array of registered actors host info.
46
+
47
+
<aid="actorhostinfo"></a>**Actor Host Info**
48
+
49
+
Name | Type | Description
50
+
---- | ---- | -----------
51
+
name | string | The host:port address of the actor.
52
+
appId | string | app id.
53
+
actorTypes | json string array | List of actor types it hosts.
54
+
updatedAt | timestamp | Timestamp of the actor registered/updated.
0 commit comments