server-clustering.adoc 1.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

[[clustering-support]]
=== Clustering ===
Spring Boot Admin Server supports cluster replication via Hazelcast. It is automatically enabled when a `HazelcastConfig`- or `HazelcastInstance`-Bean is present. You can also configure the Hazelcast instance to be persistent, to keep the status over restarts.
Also have a look at the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-hazelcast/[Spring Boot support for Hazelcast].

. Add Hazelcast to your dependencies:
+
[source,xml]
.pom.xml
----
include::{samples-dir}/spring-boot-admin-sample-hazelcast/pom.xml[tags=dependency-hazelcast,indent=0]
----

. Instantiate a HazelcastConfig:
+
[source,java]
----
include::{samples-dir}/spring-boot-admin-sample-hazelcast/src/main/java/de/codecentric/boot/admin/SpringBootAdminApplication.java[tags=application-hazelcast]
----

.Hazelcast configuration options
|===
| Property name |Description |Default value

| spring.boot.admin.hazelcast.enabled
| Enables the Hazelcast support
| `true`

| spring.boot.admin.hazelcast.event-store
31
| Name of the Hazelcast-map to store the events
32
| `"spring-boot-admin-event-store"`
33
|===