{"id":45366,"date":"2017-01-25T16:31:33","date_gmt":"2017-01-25T11:01:33","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=45366"},"modified":"2017-01-28T14:00:42","modified_gmt":"2017-01-28T08:30:42","slug":"sharing-the-load-cache-clustering-with-hazelcast","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/sharing-the-load-cache-clustering-with-hazelcast\/","title":{"rendered":"Sharing the Load: Cache Clustering with Hazelcast"},"content":{"rendered":"<p class=\"p1\">In my earlier blog on\u00a0<a href=\"http:\/\/www.tothenew.com\/blog\/caching-what-why-and-how-with-hazelcast\/\">Caching: What, Why and How with Hazelcast<\/a>\u00a0we have discussed about the importance of software caching and how to implement it with\u00a0<a href=\"http:\/\/docs.hazelcast.org\/\">Hazelcast<\/a>.<\/p>\n<p class=\"p1\">In this blog, we are going to discuss the importance of distributed caching and how to configure\u00a0<a href=\"http:\/\/docs.hazelcast.org\/\">Hazelcast<\/a>\u00a0to be a full TCP\/IP cluster.<\/p>\n<p><strong>What is Cache clustering?<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-45444\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Cache-cluster.png\" alt=\"Cache cluster\" width=\"450\" height=\"415\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Cache-cluster.png 833w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Cache-cluster-300x276.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Cache-cluster-624x576.png 624w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>A cache cluster is a network of cluster members to be a <a href=\"http:\/\/www.tothenew.com\/blog\/caching-what-why-and-how-with-hazelcast\/#replicated_cache\">Replicated<\/a> \/ <a href=\"http:\/\/www.tothenew.com\/blog\/caching-what-why-and-how-with-hazelcast\/#distributed_cache\">Distributed<\/a> cache server to achieve data high availability and fault tolerance. \u00a0Cluster members (also called nodes) can automatically join together to form a cluster. This automatic joining can take place with various discovery mechanisms that the cluster members use to find each other. After a cluster is formed, communication between cluster members is done always via TCP\/ IP regardless of the discovery mechanism used.<\/p>\n<p><strong>Why is cache clustering required?\u00a0<\/strong><\/p>\n<p>Recently at <a href=\"http:\/\/www.tothenew.com\/technologies\">TO THE NEW<\/a>, we came across a <a title=\"Product Engineering\" href=\"http:\/\/www.tothenew.com\/product-engineering\">product<\/a>, which as a platform allows its users to broadcast LIVE. It was a real-time application (RTA) where data was changing in very small time frames and it had to be reflected in the application in real time. Users can view personalized content based on their coordinates, geo-location etc. The application was highly performant and had\u00a0relation and NoSQL databases used in its core as the primary data storage with\u00a0<a href=\"http:\/\/docs.hazelcast.org\/\">Hazelcast<\/a>\u00a0as a cache server to caching data.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-45511 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-old-cache-design-1.png\" alt=\"cache design\" width=\"1160\" height=\"878\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-old-cache-design-1.png 1160w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-old-cache-design-1-300x227.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-old-cache-design-1-1024x775.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-old-cache-design-1-624x472.png 624w\" sizes=\"(max-width: 1160px) 100vw, 1160px\" \/><\/p>\n<p>As above diagram states back-end is distributed into several small applications, each application serving a specific purpose. All user interaction and authentication done through application named <span style=\"color: #bf616a;font-family: 'Courier New'\"><span style=\"font-size: 14.6667px\"><b>API<\/b><\/span><\/span> and a user can broadcast their content through application named\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Stream<\/span><\/strong>. The personalized content was\u00a0served through\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Homescreen<\/span><\/strong>\u00a0and\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Location<\/span><\/strong>\u00a0applications and accessed data from the cache server, also it was precomputed in real time by few worker modules like\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Job<\/span><\/strong>\u00a0,<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\"> Worker<\/span><\/strong>\u00a0. Users would\u00a0communicate to each other on any Live content through\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Chat<\/span><\/strong>\u00a0module, and\u00a0all chat messages were\u00a0checked for profanity before sending it to the user in real time.<\/p>\n<p>Since different applications like Homescreen, Job, API, admin, vod, stream, beam detail, monetization modules accessing different cache server, it leads to some major issues,<\/p>\n<ul>\n<li><strong>Infra cost: <\/strong>Since\u00a0there are multiple cache servers named\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Home Hazelcast<\/span><\/strong>, \u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Vod Hazelcast<\/span><\/strong>,\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Cache Hazelcast<\/span><\/strong>,\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Beam Hazelcast<\/span><\/strong>, to achieve data high availability i.e horizontal scaling a.k.a\u00a0<a href=\"http:\/\/microservices.io\/articles\/scalecube.html#x-axis-scaling\">x-axis scaling<\/a>\u00a0for each cache server, more RAM\u00a0and CPU power, etc. is\u00a0needed and that comes at a cost.<\/li>\n<li><strong>Accessing\u00a0multiple cache server instance:\u00a0<\/strong>As application like\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Homescreen<\/span><\/strong>\u00a0needs to serve Live content data (comes from\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Home\u00a0Hazelcast<\/span><\/strong>) and Vod data\u00a0(comes from\u00a0<strong><span class=\"kix-wordhtmlgenerator-word-node\" style=\"font-size: 14.6667px;font-family: 'Courier New';color: #bf616a;background-color: #f4f4f4;font-style: normal;text-decoration: none;vertical-align: baseline\">Vod Hazelcast<\/span><\/strong>) at the same time, the application needs access to both the cache servers, which increases application&#8217;s external dependencies.<\/li>\n<li><strong>Tightly coupled:<\/strong> On-demand data is being exchanged among the applications through either polling\/ webhook or API call, which tightly couple the applications to each other.<\/li>\n<li><strong>\u00a0Data out of synchronization: <\/strong>There is some part of data that is\u00a0shared amongst the cache servers and the data changes rapidly. So it is hard to maintain data synchronization, which can be easily done through <a href=\"https:\/\/hazelcast.org\/use-cases\/messaging\/\">Hazelcast Pub\/Sub model<\/a>\u00a0if all cache server is grouped into a cluster.<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-45368 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-common-cache-layer.png\" alt=\"common cache layer\" width=\"1608\" height=\"1022\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-common-cache-layer.png 1608w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-common-cache-layer-300x190.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-common-cache-layer-1024x650.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Fame-common-cache-layer-624x396.png 624w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" \/><strong>How to configure\u00a0cache cluster\u00a0with Hazelcast?\u00a0<\/strong><\/p>\n<div>\n<p>You can find all the information for configuring cluster in the <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-by-tcp\">official documentation of Hazelcast<\/a>.\u00a0Hazelcast cluster can be configured in with many discovery mechanisms like <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-by-multicast\">Multicast<\/a>, <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-by-tcp\">TCP<\/a>, <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-within-ec2-cloud\">EC2 Cloud<\/a>, <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-with-jclouds\">jclouds<\/a>\u00a0etc. The main configuration file is <a href=\"https:\/\/github.com\/hazelcast\/hazelcast\/blob\/master\/hazelcast\/src\/main\/resources\/hazelcast-default.xml\">hazelcast.xml<\/a>\u00a0and we can continue with the default values for most of the configuration attribute. For simplicity, I have created a tested and workable <a href=\"https:\/\/github.com\/bjpaul\/hazelcast-cluster-setup\/tree\/master\/server-config\">project<\/a> to provide configuration for Hazelcast to be a full TCP\/IP cluster with a minimum configuration which fulfills our most use cases.<\/p>\n<p><strong>Step 1: <\/strong>Clone the project <span style=\"color: #0000ff\">git@github.com:bjpaul\/hazelcast-cluster-setup.git<\/span> or download zip into one of your servers, extract it.\u00a0Download the latest version of Hazelcast\u00a0from <a href=\"https:\/\/hazelcast.org\/download\/\">https:\/\/hazelcast.org\/download\/<\/a>\u00a0and place the\u00a0hazelcast-all-3.*.jar \u00a0under <span style=\"color: #0000ff\">hazelcast-cluster-setup\/server-config\/lib<\/span>\u00a0directory.<\/p>\n<p><strong>Step 2: <\/strong>Move to H<span style=\"color: #0000ff\">azelcast-cluster-setup\/server-config\/bin<\/span>\u00a0directory location and run <span style=\"color: #0000ff\">sh start.sh<span style=\"color: #000000\">. As a result, a new Hazelcast instance will start on that server.<\/span><\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-45514\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.24.19-AM.png\" alt=\"Screen Shot 2017-01-25 at 2.24.19 AM\" width=\"1128\" height=\"414\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.24.19-AM.png 1128w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.24.19-AM-300x110.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.24.19-AM-1024x375.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.24.19-AM-624x229.png 624w\" sizes=\"(max-width: 1128px) 100vw, 1128px\" \/><\/p>\n<p>Now repeat the step 1-2 into another server, again\u00a0<span style=\"color: #0000ff\"><span style=\"color: #000000\">a new Hazelcast instance will start\u00a0and joins the cluster.<\/span><\/span><\/p>\n<\/div>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-45516\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.30.56-AM.png\" alt=\"Screen Shot 2017-01-25 at 2.30.56 AM\" width=\"1142\" height=\"460\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.30.56-AM.png 1142w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.30.56-AM-300x120.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.30.56-AM-1024x412.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-2.30.56-AM-624x251.png 624w\" sizes=\"(max-width: 1142px) 100vw, 1142px\" \/><span style=\"color: #0000ff\"><strong>this <\/strong><span style=\"color: #000000\">keyword<\/span>\u00a0<span style=\"color: #000000\">pointing to the current Hazelcast instance. <\/span><\/span><\/p>\n<p>One of the main features of Hazelcast is not having a master node. Each node in the cluster is configured to be the same in terms of functionality by sharing the metadata called <a href=\"http:\/\/docs.hazelcast.org\/docs\/3.5\/manual\/html\/datapartitioning.html\">partition table<\/a> of the cluster. It consists of information like members detail, cluster health, backup information, re-partitioning, etc. The first node created in the node cluster manages the cluster members, i.e. automatically performs the data assignment to nodes. If the oldest node dies, the second oldest node will manage the cluster members.<\/p>\n<p>To test the data accessibility by a client to the cluster I have written\u00a0a small <a href=\"https:\/\/github.com\/bjpaul\/hazelcast-cluster-setup\/tree\/master\/client-test\">java program<\/a>. By default all client applications are the smart clients, i.e they also share the same\u00a0<a href=\"http:\/\/docs.hazelcast.org\/docs\/3.5\/manual\/html\/datapartitioning.html\">partition table<\/a>\u00a0but with limited access, so the client application can connect directly to primary data holder member to reduce the network lag. To test this functionality we are passing only one server address (i.e <span style=\"color: #0000ff\">host1<\/span>) to connect the cluster.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-45518\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.39.22-AM.png\" alt=\"Screen Shot 2017-01-25 at 3.39.22 AM\" width=\"1460\" height=\"478\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.39.22-AM.png 1460w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.39.22-AM-300x98.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.39.22-AM-1024x335.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.39.22-AM-624x204.png 624w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><\/p>\n<p>Now stop the <span style=\"color: #0000ff\">host1\u00a0<span style=\"color: #000000\">and check the client application log.<\/span><\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-45519\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.50.34-AM.png\" alt=\"Screen Shot 2017-01-25 at 3.50.34 AM\" width=\"1254\" height=\"246\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.50.34-AM.png 1254w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.50.34-AM-300x58.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.50.34-AM-1024x200.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/01\/Screen-Shot-2017-01-25-at-3.50.34-AM-624x122.png 624w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/p>\n<p>The client application still manages to access the cluster by discovering other available members, though initially, it has only the address <span style=\"color: #0000ff\">host1\u00a0<span style=\"color: #000000\">to connect the cluster.<\/span><\/span><\/p>\n<p>But it is recommended that to\u00a0access the cluster\u00a0we should\u00a0pass all server addresses of a cluster to the client, so it can connect to either of any available member.<\/p>\n<p>Let&#8217;s look closely at the configuration attributes for\u00a0<a href=\"https:\/\/github.com\/hazelcast\/hazelcast\/blob\/master\/hazelcast\/src\/main\/resources\/hazelcast-default.xml\">hazelcast.xml<\/a>.<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\n&lt;hazelcast xsi:schemaLocation=&quot;http:\/\/www.hazelcast.com\/schema\/config hazelcast-config-3.*.xsd&quot;<br \/>\n           xmlns=&quot;http:\/\/www.hazelcast.com\/schema\/config&quot;<br \/>\n           xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;&gt;<br \/>\n    &lt;group&gt;<br \/>\n        &lt;name&gt;your-cluster-group&lt;\/name&gt;<br \/>\n        &lt;password&gt;password&lt;\/password&gt;<br \/>\n    &lt;\/group&gt;<br \/>\n    &lt;properties&gt;<br \/>\n        &lt;property name=&quot;hazelcast.tcp.join.port.try.count&quot;&gt;5&lt;\/property&gt;<br \/>\n    &lt;\/properties&gt;<br \/>\n    &lt;network&gt;<br \/>\n        &lt;port auto-increment=&quot;true&quot; port-count=&quot;100&quot;&gt;5707&lt;\/port&gt;<br \/>\n        &lt;join&gt;<br \/>\n            &lt;multicast enabled=&quot;false&quot;\/&gt;<br \/>\n            &lt;tcp-ip enabled=&quot;true&quot;&gt;<br \/>\n                &lt;member-list&gt;<br \/>\n\t\t\t\t\t&lt;member&gt;machine1&lt;\/member&gt;<br \/>\n        \t\t\t&lt;member&gt;machine2&lt;\/member&gt;<br \/>\n       \t\t\t\t&lt;member&gt;machine3:5799&lt;\/member&gt;<br \/>\n        \t\t\t&lt;member&gt;192.168.1.0-7&lt;\/member&gt;<br \/>\n       \t\t\t\t&lt;member&gt;192.168.1.21&lt;\/member&gt;<br \/>\n                &lt;\/member-list&gt;<br \/>\n            &lt;\/tcp-ip&gt;<br \/>\n            &lt;aws enabled=&quot;false&quot;\/&gt;<br \/>\n        &lt;\/join&gt;<br \/>\n        &lt;interfaces enabled=&quot;true&quot;&gt;<br \/>\n           &lt;interface&gt;10.3.16.*&lt;\/interface&gt;<br \/>\n           &lt;interface&gt;10.3.10.4-18&lt;\/interface&gt;<br \/>\n           &lt;interface&gt;192.168.1.3&lt;\/interface&gt;<br \/>\n        &lt;\/interfaces&gt;<br \/>\n    &lt;\/network&gt;<br \/>\n&lt;\/hazelcast&gt;<br \/>\n[\/sourcecode]<\/p>\n<p><span style=\"color: #000080\"><strong>&lt;group&gt; | Creating cluster groups:\u00a0<\/strong><\/span>By specifying a group name and group password, we\u00a0can separate our\u00a0clusters in a simple way. Example groupings can be by development, production, sandbox, stage, etc. Also using this functionality we can implement one a level of authentication on our cluster.<\/p>\n<p><span style=\"color: #000080\"><strong>&lt;network&gt;:\u00a0<\/strong><\/span>All network related configuration is performed via the element.<code>network<\/code><\/p>\n<p><span style=\"color: #000080\"><strong>&lt;port&gt;:<\/strong><span style=\"color: #000000\"> We\u00a0can specify the ports that Hazelcast will use to communicate between cluster members. Its default value is <code>5701.<\/code><\/span><\/span><\/p>\n<p><span style=\"color: #000080\"><strong>&lt;join&gt;:\u00a0<\/strong><span style=\"color: #000000\">The &#8220;<strong><code>join\"<\/code><\/strong> configuration element is used to discover Hazelcast members and enable them to form a cluster. Here we used the TCP\/IP mechanism and disabled all other options.<\/span><\/span><\/p>\n<p><strong><span style=\"color: #000080\">&lt;properties&gt; | &lt;property&gt; :<\/span> \u00a0<\/strong>We can set hazelcast system property using these tags.\u00a0<span style=\"color: #0000ff\">hazelcast.tcp.join.port.try.count<\/span> is the number of incremental ports (default is 3), starting with the port number defined in the network configuration (default is 5701), that will be used to connect to a host (which is defined without a port in TCP\/IP member list while a node is searching for a cluster).<\/p>\n<p><span style=\"color: #000080\"><strong><strong>&lt;member-list&gt; |\u00a0<\/strong>&lt;member&gt;: <\/strong><span style=\"color: #000000\">These configuration elements are used to set all member list addresses.<\/span><\/span><\/p>\n<p><span style=\"color: #000080\"><strong>&lt;interfaces&gt; |\u00a0&lt;interface&gt; : <\/strong><span style=\"color: #000000\">We\u00a0can specify which network interfaces that Hazelcast should use. Servers mostly have more than one network interface, so we\u00a0may want to list the valid IPs. range characters (&#8216;*&#8217; and &#8216;-&#8216;) that can be used for simplicity.<\/span><\/span><\/p>\n<p><strong><span style=\"font-weight: 400\">Hope this will help to understand the importance of cache clustering\u00a0and how to configure Cache clustering with Hazelcast. Download the complete project from <a href=\"https:\/\/github.com\/bjpaul\/hazelcast-cluster-setup\/tree\/master\/server-config\">Github<\/a>.<\/span><\/strong><\/p>\n<p>If you are keen to know How to\u00a0Integrate Hazelcast with Grails, read through this blog &#8211;\u00a0<a title=\"Getting started with Hazelcast using Grails in 10 minutes\" href=\"http:\/\/www.tothenew.com\/blog\/hazelcast-integration-with-grails\/\">Getting started with Hazelcast using Grails in 10 minutes<\/a><\/p>\n<p><span style=\"font-size: 1rem\">Stay tuned for more on:-<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Hazelcast as secondary level cache<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Hazelcast as Spring Data cache<\/span><\/li>\n<\/ul>\n<p>I hope you enjoyed this blog and it was helpful. Here is another interesting blog on <a title=\"Enhancing throughput using Hazelcast\" href=\"http:\/\/www.tothenew.com\/blog\/hazelcast-object-deserialization-with-distributed-query\/#sthash.WeKvuXpv.dpuf\">Enhancing throughput of Java apps performance by optimization of object deserialization and distributed query<\/a>.<\/p>\n<p>Thanks for reading, see you next time.<\/p>\n<p><span style=\"font-weight: 400\">Here\u2019s a quick reference to &#8211;<\/span><\/p>\n<p><a title=\"Distributed Caching with Hazelcast\" href=\"https:\/\/drive.google.com\/file\/d\/0B4LHpTbNYCypanE5MlJUOTIwaTQ\/view?usp=sharing\">Distributed Caching with Hazelcast<br \/>\n<\/a><\/p>\n<p><strong>For more reference:<\/strong><\/p>\n<p><a href=\"http:\/\/docs.hazelcast.org\/docs\/3.7\/manual\/html-single\/index.html#discovering-members-by-tcp\">Hazelcast cluster |\u00a0Discovering Members by TCP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my earlier blog on\u00a0Caching: What, Why and How with Hazelcast\u00a0we have discussed about the importance of software caching and how to implement it with\u00a0Hazelcast. In this blog, we are going to discuss the importance of distributed caching and how to configure\u00a0Hazelcast\u00a0to be a full TCP\/IP cluster. What is Cache clustering? A cache cluster is [&hellip;]<\/p>\n","protected":false},"author":349,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":52},"categories":[2348,446,1],"tags":[4238,118,1137,4235,4154,4242,2659,4237,4236,4243,4241,4239,4240],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/45366"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/349"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=45366"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/45366\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=45366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=45366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=45366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}