hazelcast

after upgrade to Spring Boot 2, how to expose cache metrics to prometheus?

…衆ロ難τιáo~ 提交于 2019-12-05 11:31:08
I recently upgraded a spring boot application from 1.5 to 2.0.1. I also migrated the prometheus integration to the new actuator approach using micrometer. Most things work now - including some custom counters and gauges. I noted the new prometheus endpoint /actuator/prometheus does no longer publish the spring cache metrics (size and hit ratio). The only thing I could find was this issue and its related commit . Still I can't get cache metrics on the prometheus export. I tried settings some properties: management.metrics.cache.instrument-cache=true spring.cache.cache-names=cache1Name

Hazelcast single node fast startup for debugging

人走茶凉 提交于 2019-12-05 08:19:31
I'm writing an app that uses Hazelcast. My app is really slow to start because Hazelcast tries to talk to other nodes on the network on startup. This is fine for production, but when I'm doing single-node debugging it really slows down my edit-compile-run-debug cycle. Is there a Hazelcast setting that tells it that there's only one node so please start quickly and don't bother pinging the rest of the network? You can disable join methods: <join> <multicast enabled="false"> </multicast> <tcp-ip enabled="false"> </tcp-ip> <aws enabled="false"> </aws> </join> this will save you at least 3 sec

Hazelcast server as a linux service

这一生的挚爱 提交于 2019-12-05 04:56:20
How to run hazelcast server as a linux service in production environments ? java -server -cp hazelcast.jar com.hazelcast.examples.StartServer StartServer runs the server with outputs to std terminal, what's the easiest way to run it as a linux service and write logs to a file & how do I specify min and max memory allocation for Hazelcast. I have to set it up as a service in an EC2 instance and bundle it. When EC2 autoscaling starts an instance, hazelcast server will start and join the cluster. Thanks To use Hazelcast as a service you just need to write a shell/bash script that starts and stops

HazelcastInstance vs HazelcastClient

半世苍凉 提交于 2019-12-05 03:37:28
I am novice in hazelcast and I have a few questions. As I understand hazelcast comes with two entities HazelcastInstance (as I understand it is server) and HazelcastClient . These entities even packed into different jars. I have noticed that in our project we use only HazelcastInstance . I have asked collegues why don't we use HazelcastClient . As I understand their explanation HazelcastInstance has more possibilities than HazelcastClient . Thus HazelcastInstance = HazelcastClient + AnotherFeatures But for me it strange that these entities packed to different packages if it is truth. Please

Hazelcast: connecting to remote cluster

穿精又带淫゛_ 提交于 2019-12-04 21:23:33
问题 We have a cluster of Hazelcast nodes all running on one remote system (single physical system with many nodes). We would like to connect to this cluster from an external client - a Java application which uses code as below to connect to Hazelcast: ClientConfig clientConfig = new ClientConfig(); clientConfig.addAddress(config.getHost() + ":" + config.getPort()); client = HazelcastClient.newHazelcastClient(clientConfig); where, host is the IP of remote and port is 5701. This still connects to

com.hazelcast.spi.exception.RetryableHazelcastException:HazelcastInstance is not active!

六月ゝ 毕业季﹏ 提交于 2019-12-04 08:47:24
使用 hazelcast 坑爹事情,错误日志如下 com.hazelcast.spi.exception.RetryableHazelcastException: HazelcastInstance is not active! at com.hazelcast.spi.impl.NodeEngineImpl.getService(NodeEngineImpl.java:369) ~[hazelcast-3.11.4.jar:3.11.4] at com.hazelcast.spi.impl.eventservice.impl.EventServiceImpl.getSegment(EventServiceImpl.java:540) ~[hazelcast-3.11.4.jar:3.11.4] at com.hazelcast.spi.impl.eventservice.impl.EventServiceImpl.registerListenerInternal(EventServiceImpl.java:282) ~[hazelcast-3.11.4.jar:3.11.4] at com.hazelcast.spi.impl.eventservice.impl.EventServiceImpl.registerLocalListener(EventServiceImpl

Hazelcast: programmatic configuration for logging in debug mode

血红的双手。 提交于 2019-12-04 03:49:02
问题 Trying to configure slf4j to log in DEBUG mode, but get only INFO logs. What am I doing wrong? Config hazelcastConfig = new Config("HazelcastConfig"); hazelcastConfig.getProperties().put("hazelcast.logging.type", "sl4j"); hazelcastConfig.getProperties().put("slf4j.logger.com.hazelcast", "debug"); Hazelcast.newHazelcastInstance(hazelcastConfig); 回答1: You should try Config hazelcastConfig = new Config(); hazelcastConfig.setProperty("hazelcast.logging.type", "slf4j"); Hazelcast

Hazelcast vs. Ignite benchmark

不羁岁月 提交于 2019-12-03 23:47:26
I am using data grids as my primary "database". I noticed a drastic difference between Hazelcast and Ignite query performance. I optimized my data grid usage by the proper custom serialization and indexes, but the difference is still noticeable IMO. Since no one asked it here, I am going to answer my own question for all future references. This is not an abstract (learning) exercise, but a real-world benchmark, that models my data grid usage in large SaaS systems - primarily to display sorted and filtered paginated lists. I primarily wanted to know how much overhead my universal JDBC-ish data

hazelcast高可用性详解

烂漫一生 提交于 2019-12-03 15:36:47
1. Elastic Memory(弹性内存) Hazelcast 默认存储分布式数据( map entries, queue items )在可以进行GC的java heep中。由于你的heep越来越大,进行GC时可能导致你的应用暂停服务10秒,因此影响了你的应用的体验性和响应时间。弹性内存是 hazelcast使用off-heap进行存储以避免GC时造成的暂停服务。即使你有 频繁更新 TB级别的内存数据,GC时几乎不会造成影响; 从而使你的应用有可预见的延时和吞吐量。 每个map可以配置为off-heap或者on-heap这两种存储类型。如果map的存储类型是off-heap,那么primary,backup和可用的near-cacheed entries 被存储在离线堆里面,并且off-heap的存储空间会随着你节点数的增加而动态扩展。 弹性内存的实现不需要任何碎片整理。它的工作原理是这样:用户分配每个JVM几GB的离线储存堆,假设是40GB。 Hazelcast 将创建40个 DirectBuffers ,每个有1GB的容量。假设有50个节点,并且要存储2TB的数据。每个buffer被分成可配置的 chunck (blocks)(一个chunck大小默认是1KB)。 Hazelcast 使用可写的blocks。例如3KB将被存储为3个 blocks。当存储的值被移除

Hazelcast: connecting to remote cluster

ぐ巨炮叔叔 提交于 2019-12-03 13:34:51
We have a cluster of Hazelcast nodes all running on one remote system (single physical system with many nodes). We would like to connect to this cluster from an external client - a Java application which uses code as below to connect to Hazelcast: ClientConfig clientConfig = new ClientConfig(); clientConfig.addAddress(config.getHost() + ":" + config.getPort()); client = HazelcastClient.newHazelcastClient(clientConfig); where, host is the IP of remote and port is 5701. This still connects to the local host (127.0.0.1). What am I missing? Edit: If the java client is the only hazelcast app