Jgroups-Raft

22 views
Skip to first unread message

ki...@instor.in

unread,
Feb 18, 2019, 7:11:24 AM2/18/19
to jgroups-raft
How to use NIO in the Jgroup raft, Please Explain Briefly

Bela Ban

unread,
Feb 18, 2019, 9:33:32 AM2/18/19
to jgroup...@googlegroups.com
Sorry, but you have to be a bit more detailed in your questions to get
an answer!

On 18.02.19 13:11, ki...@instor.in wrote:
> How to use NIO in the Jgroup raft, Please Explain Briefly
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com
> <mailto:jgroups-raft...@googlegroups.com>.
> To post to this group, send email to jgroup...@googlegroups.com
> <mailto:jgroup...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Bela Ban | http://www.jgroups.org

ki...@instor.in

unread,
Feb 19, 2019, 12:52:11 AM2/19/19
to jgroups-raft
Sending Message from one node to another node it's taking more time. I'm thinking to use NIO for this problem. so how to use NIO for non-blocking the messages


On Monday, February 18, 2019, at 8:03:32 PM UTC+5:30, Bela Ban wrote:
Sorry, but you have to be a bit more detailed in your questions to get
an answer!

On 18.02.19 13:11, ki...@instor.in wrote:
> How to use NIO in the Jgroup raft, Please Explain Briefly
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com

Bela Ban

unread,
Feb 19, 2019, 2:15:39 AM2/19/19
to jgroup...@googlegroups.com


On 19.02.19 06:52, ki...@instor.in wrote:
> Sending Message from one node to another node it's taking more time.
> I'm thinking to use NIO for this problem.

I don't think the cause is TCP versus TCP_NIO2

> so how to use NIO for non-blocking the messages

Use TCP_NIO2 instead of TCP

> On Monday, February 18, 2019, at 8:03:32 PM UTC+5:30, Bela Ban wrote:
>
> Sorry, but you have to be a bit more detailed in your questions to get
> an answer!
>
> On 18.02.19 13:11, ki...@instor.in <javascript:> wrote:
> > How to use NIO in the Jgroup raft, Please Explain Briefly
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "jgroups-raft" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to jgroups-raft...@googlegroups.com <javascript:>
> > <mailto:jgroups-raft...@googlegroups.com <javascript:>>.
> > To post to this group, send email to jgroup...@googlegroups.com
> <javascript:>
> > <mailto:jgroup...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
> --
> Bela Ban | http://www.jgroups.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com
> <mailto:jgroups-raft...@googlegroups.com>.
> To post to this group, send email to jgroup...@googlegroups.com
> <mailto:jgroup...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com?utm_medium=email&utm_source=footer>.

ki...@instor.in

unread,
Feb 19, 2019, 2:20:26 AM2/19/19
to jgroups-raft
actually i'm using UDP in jgroup-raft  raft.xml.
what can i change

<!--
  Default stack using IP multicasting. It is similar to the "udp"
  stack in stacks.xml, but doesn't use streaming state transfer and flushing
  author: Bela Ban
-->

<config xmlns="urn:org:jgroups"
        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
    <UDP
            mcast_addr="232.7.7.7"
            mcast_port="${jgroups.udp.mcast_port:46699}"
            ip_ttl="8"
            tos="8"
            ucast_recv_buf_size="5M"
            ucast_send_buf_size="5M"
            mcast_recv_buf_size="5M"
            mcast_send_buf_size="5M"
            max_bundle_size="64K"
            enable_diagnostics="true"

            thread_pool.min_threads="2"
            thread_pool.max_threads="100"
            thread_pool.keep_alive_time="5000"
    />

    <PING />
    <MERGE3 max_interval="30000"
            min_interval="10000"/>
    <FD_SOCK/>
    <FD_ALL/>
    <VERIFY_SUSPECT timeout="1500"  />
    <BARRIER />
    <pbcast.NAKACK2 xmit_interval="500"
                    xmit_table_num_rows="100"
                    xmit_table_msgs_per_row="2000"
                    xmit_table_max_compaction_time="30000"
                    use_mcast_xmit="false"
                    discard_delivered_msgs="true"/>
    <UNICAST3 xmit_interval="500"
              xmit_table_num_rows="100"
              xmit_table_msgs_per_row="2000"
              xmit_table_max_compaction_time="60000"
              conn_expiry_timeout="0"/>
    <RSVP />
    <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
                   max_bytes="4M"/>
    <raft.NO_DUPES/>
    <pbcast.GMS print_local_addr="true" join_timeout="2000"/>
    <UFC max_credits="2M"
         min_threshold="0.4"/>
    <MFC max_credits="2M"
         min_threshold="0.4"/>
    <FRAG2 frag_size="60K"  />
    <pbcast.STATE_TRANSFER />
    <raft.ELECTION election_min_interval="100" election_max_interval="500"/>
    <raft.RAFT members="A" raft_id="${raft_id:undefined}" resend_interval="1000"/>
    <raft.REDIRECT />
    <raft.CLIENT bind_addr="0.0.0.0" />
</config>

On Tuesday, February 19, 2019 at 12:45:39 PM UTC+5:30, Bela Ban wrote:


On 19.02.19 06:52, ki...@instor.in wrote:
> Sending Message from one node to another node it's taking more time.
> I'm thinking to use NIO for this problem.

I don't think the cause is TCP versus TCP_NIO2

> so how to use NIO for non-blocking the messages

Use TCP_NIO2 instead of TCP

> On Monday, February 18, 2019, at 8:03:32 PM UTC+5:30, Bela Ban wrote:
>
>     Sorry, but you have to be a bit more detailed in your questions to get
>     an answer!
>
>     On 18.02.19 13:11, ki...@instor.in <javascript:> wrote:
>      > How to use NIO in the Jgroup raft, Please Explain Briefly
>      >
>      > --
>      > You received this message because you are subscribed to the Google
>      > Groups "jgroups-raft" group.
>      > To unsubscribe from this group and stop receiving emails from it,
>     send
>      > an email to jgroups-raft...@googlegroups.com <javascript:>
>      > <mailto:jgroups-raft+unsub...@googlegroups.com <javascript:>>.
>      > To post to this group, send email to jgroup...@googlegroups.com
>     <javascript:>
>      > <mailto:jgroup...@googlegroups.com <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com
>     <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com>
>
>      >
>     <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>     Bela Ban | http://www.jgroups.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com

Bela Ban

unread,
Feb 19, 2019, 3:22:06 AM2/19/19
to jgroup...@googlegroups.com
http://www.jgroups.org/manual4/index.html#_tcp_nio2
> >      > <mailto:jgroups-raft...@googlegroups.com
> <javascript:> <javascript:>>.
> >      > To post to this group, send email to
> jgroup...@googlegroups.com
> >     <javascript:>
> >      > <mailto:jgroup...@googlegroups.com <javascript:>>.
> >      > To view this discussion on the web visit
> >      >
> >
> https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com>>
>
> >
> >      >
> >
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer>
>
> >
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-raft/2e8551e9-5720-4fdf-a13a-088eacf97271%40googlegroups.com?utm_medium=email&utm_source=footer>>>.
>
> >
> >      > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>
> >     <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> >     --
> >     Bela Ban | http://www.jgroups.org
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "jgroups-raft" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to jgroups-raft...@googlegroups.com <javascript:>
> > <mailto:jgroups-raft...@googlegroups.com <javascript:>>.
> > To post to this group, send email to jgroup...@googlegroups.com
> <javascript:>
> > <mailto:jgroup...@googlegroups.com <javascript:>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com>
>
> >
> <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> > For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> Bela Ban | http://www.jgroups.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com
> <mailto:jgroups-raft...@googlegroups.com>.
> To post to this group, send email to jgroup...@googlegroups.com
> <mailto:jgroup...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jgroups-raft/5236ccff-a19e-422a-b005-723943604148%40googlegroups.com
> <https://groups.google.com/d/msgid/jgroups-raft/5236ccff-a19e-422a-b005-723943604148%40googlegroups.com?utm_medium=email&utm_source=footer>.

ki...@instor.in

unread,
Feb 19, 2019, 3:25:38 AM2/19/19
to jgroups-raft
thanks for replay,
can I use TUNNEL gossip_router? but leader election is not happening
this is my code 

<!--
  Default stack using IP multicasting. It is similar to the "udp"
  stack in stacks.xml, but doesn't use streaming state transfer and flushing
  author: Bela Ban
-->

<config xmlns="urn:org:jgroups"
        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
       <TUNNEL gossip_router_hosts="x.x.x.x[12001]"/>
>      >      > <mailto:jgroups-raft+unsub...@googlegroups.com
>      > <mailto:jgroups-raft+unsub...@googlegroups.com <javascript:>>.
>      > To post to this group, send email to jgroup...@googlegroups.com
>     <javascript:>
>      > <mailto:jgroup...@googlegroups.com <javascript:>>.
>      > To view this discussion on the web visit
>      >
>     https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com
>     <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com>
>
>      >
>     <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com?utm_medium=email&utm_source=footer
>     <https://groups.google.com/d/msgid/jgroups-raft/37c111ad-4578-4be4-b57a-603054bcee67%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>      > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>.
>
>     --
>     Bela Ban | http://www.jgroups.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "jgroups-raft" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jgroups-raft...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages