Skip to Content
author's profile photo Former Member
Former Member

Sync Cache between two Hybris Nodes

Hello,

Our environment consist of a loadbalancer and two Hybris servers (App1 and App2) configured in clustered mode connecting to common database server.

Is there any alternative way to sync cache between both the nodes other than default cluster mode?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2015 at 08:56 AM

    Hi Mandar, is there anything particular you do not like about the oob implementation? I'm trying to understand why you want to use alternatives.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 16, 2015 at 10:06 AM

    It has to be in cluster for the replication to work. You can evaluate options of Cache Distribution mechanism i guess with Ehcache it is possible.BTW hybris also uses Ehcache for caching so it will be easier if we understand the way they are doing it.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2015 at 07:39 AM

    Hi Thomas,

    In current cluster mode 50% of our CPU is utilize at any given time by 2 threads.

    Kindly refer following top command output in thread mode.

    top - 11:59:50 up 62 days, 18:27, 1 user, load average: 1.29, 1.31, 1.27 Tasks: 510 total, 3 running, 507 sleeping, 0 stopped, 0 zombie Cpu(s): 27.6%us, 14.3%sy, 0.0%ni, 50.0%id, 0.0%wa, 0.4%hi, 7.6%si, 0.0%st Mem: 32879416k total, 28008416k used, 4871000k free, 1742212k buffers Swap: 69206008k total, 109188k used, 69096820k free, 11398012k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 21097 ihpadm 20 0 28.3g 12g 30m R 25.0 39.6 929:03.21 java 21098 ihpadm 20 0 28.3g 12g 30m R 24.7 39.6 937:46.80 java

    Following are the two threads consuming 25% of CPU each.

    "UnicastSyncNodesThread" daemon prio=10 tid=0x0000000001285800 nid=0x526a runnable [0x00007fc5f658e000] java.lang.Thread.State: RUNNABLE at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:676) - locked (a java.net.DatagramPacket) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod.sendPacket(UnicastBroadcastMethod.java:538) - locked (a de.hybris.platform.cluster.udp.UnicastBroadcastMethod) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod.send(UnicastBroadcastMethod.java:349) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod.send(UnicastBroadcastMethod.java:288) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod.sendMyNodesSyncMessagesIfEnabled(UnicastBroadcastMethod.java:320) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod.access$1(UnicastBroadcastMethod.java:303) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod$SyncNodesThread.run(UnicastBroadcastMethod.java:497)

    "Unicast Distributed Cache Server" daemon prio=10 tid=0x0000000001282800 nid=0x5269 runnable [0x00007fc5f668f000] java.lang.Thread.State: RUNNABLE at java.net.PlainDatagramSocketImpl.receive0(Native Method) - locked (a java.net.PlainDatagramSocketImpl) at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145) - locked (a java.net.PlainDatagramSocketImpl) at java.net.DatagramSocket.receive(DatagramSocket.java:786) - locked (a java.net.DatagramPacket) - locked (a java.net.DatagramSocket) at de.hybris.platform.cluster.udp.UnicastBroadcastMethod$UnicastServerThread.run(UnicastBroadcastMethod.java:693)

    CPU configuration is 4 cores Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz. Cluster mode is configured in jgroups.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.