开发者

Put in Hazelcast Multimap lasts > 5sec on 2 node cluster

开发者 https://www.devze.com 2023-03-31 19:51 出处:网络
i discovered a strange performance leak in one statement of our application, which runs on a two node cluster currently. It is this very method:

i discovered a strange performance leak in one statement of our application, which runs on a two node cluster currently. It is this very method:

private void开发者_JS百科 addIdToMember( final long id, final Member executedMember )
{
    this.entityIdToMemberHostname.put( id, executedMember.getInetSocketAddress( ).getHostName( ) );
}

The entityIdToMemberHostname map is initialized (once) as follows:

this.entityIdToMemberHostname = Hazelcast.getMultiMap( "entityIdToMemberHostname" );

Uncommenting the call to the addIdToMember method descreases the execution time of the surrounding method 5 seconds (it now takes only 20ms at all).

Is a put to a Hazelcast multimap that expensive in a cluster?


Solution was not to get the hostname but the IP to identify the member; hostname resolution was the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号