Overview
This template provides production‑ready Hazelcast instances as Monk runnables. You can:- Run it directly to get a managed Hazelcast container with sensible defaults
- Inherit it in your own runnable to seamlessly add distributed in-memory data grid capabilities to your stack
- Deploy as a single instance or multi-node cluster with optional management center
What this template manages
- Hazelcast container (
hazelcast/hazelcastimage, configurable tag) - Network service on port 5701 (cluster communication)
- Cluster coordination and automatic member discovery
- Optional Management Center UI on port 8080
- Custom configuration via YAML file mounting
Available templates
- hazelcast/hazelcast - Single Hazelcast instance
- hazelcast/hazelcast-management - Management Center dashboard
- hazelcast/stack - Single instance + Management Center
- hazelcast-cluster/hazelcast-1/2/3 - Individual cluster nodes
- hazelcast-cluster/hazelcast-management - Cluster management dashboard
- hazelcast-cluster/stack - 3-node cluster + Management Center
Quick start (run directly)
- Load templates
- Run Hazelcast
- Access Management Center
http://localhost:8080 to monitor your cluster, view statistics, and manage data structures.
Configuration
Key variables you can customize in this template:/opt/hazelcast/config/hazelcast-config.yml. You can modify files/hazelcast-config.yml in the template directory to customize cluster settings, networking, data structures, and more.
Use by inheritance (recommended for apps)
Inherit the Hazelcast runnable in your application and declare a connection. Example:Using the cluster template
For production environments requiring high availability and better performance, inherit from the cluster template:Ports and connectivity
- Service:
hazelcaston TCP port5701(cluster member communication) - Management Center:
hazelcast-managementon TCP port8080(HTTP UI) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the Hazelcast host.
Configuration customization
The template includes a pre-configuredhazelcast-config.yml file that you can customize for your needs. The configuration file supports:
- Network settings and member discovery
- Data structure configurations (maps, queues, topics, etc.)
- Serialization settings
- Security configurations
- Persistence options
- WAN replication settings
files/hazelcast-config.yml in the template directory before loading.
Features
- Distributed caching: Store data across multiple nodes with automatic partitioning
- In-memory computing: Execute distributed tasks and aggregations
- Event-driven architecture: Pub/sub messaging with topics and reliable queues
- CP and AP modes: Choose between consistency or availability based on your needs
- Client-server topology: Connect multiple applications to the same cluster
- Automatic data partitioning: Data is automatically distributed across cluster members
- Fault tolerance: Data replication ensures availability during node failures
- Dynamic scaling: Add or remove nodes without downtime
Management Center features
The included Management Center provides:- Real-time cluster monitoring and health checks
- Performance metrics and statistics
- Data structure browser and management
- Query console for map entries
- Member management and monitoring
- WAN replication monitoring
- Configuration management
Related templates
- Combine with
redis/for complementary caching strategies - Use with
prometheus-grafana/for advanced metrics and observability - Integrate with
kafka/for event streaming pipelines
Troubleshooting
- If cluster members aren’t discovering each other, verify the
cluster-nameis identical across all nodes and check network connectivity. - For connection issues from client applications, ensure the service port 5701 is accessible and the Hazelcast client library version is compatible with the server version.
- Management Center connection issues: verify the cluster name matches and member hostnames are resolvable.
- Check logs for detailed error messages:
- For performance tuning, adjust JVM options via the
JAVA_OPTSenvironment variable in the template configuration.