开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜