Akka Management Cluster HTTP exposes HTTP endpoints for inspecting and changing Akka Cluster node state. It builds on Akka Management and is useful when operators need to manage nodes without interacting directly with cluster internals. section 8.1 section 8.3
The HTTP API provides these cluster operations:
- GET /cluster/members/ returns cluster membership, including leaders, roles, statuses, and unreachable nodes. section 8.3
- POST /cluster/members/ requests that the cluster join a supplied address. section 8.3
- DELETE or PUT /cluster/members/{address} performs leave or down operations, when mutations are enabled. section 8.3
- GET /cluster/shards/{name} returns information for a named shard region. section 8.3
Start management and inspect a local cluster
Add the Akka Management, Cluster HTTP, cluster sharding, and discovery dependencies. Start the server on every node with AkkaManagement(system).start(). Assign each local node a distinct management HTTP port, then query curl localhost:8558/cluster/members. To remove a node, enable akka.management.http.route-providers-read-only = false and issue curl -XDELETE localhost:8558/cluster/members/akka://words@127.0.0.1:2552. section 8.3
val AkkaManagementVersion = "1.1.4" val AkkaVersion = "2.6.20" libraryDependencies ++= Seq( .akka.management" %% "akka-management" % AkkaManagementVersion, "com.lightbend.akka.management" %% "akka-management-cluster-http" % AkkaManagementVersion, "com.typesafe.akka" %% "akka-cluster-sharding" % AkkaVersion, "com.typesafe.akka" %% "akka-discovery" % AkkaVersion)
Use the dependency listing to align Akka Management 1.1.4 with Akka 2.6.20 when adding the extension. section 8.3
