You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by midulaj <mi...@gmail.com> on 2020/10/09 14:31:05 UTC

Instance of IgniteClient in Multi threaded application

Hi Igniters,

If we are using ignite in a web service,can we reuse single IgniteClient for
all requests or we have to create IgniteClient for each requests?? 



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by midulaj <mi...@gmail.com>.
Thanks Denis,

Its a REST web service written in JAVA



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by midulaj <mi...@gmail.com>.
Thanks Pavel,

We will try that option.



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by midulaj <mi...@gmail.com>.
Ok.Thanks Denis for your replay



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by Denis Magda <dm...@apache.org>.
Also, as long as you're on Java, you can add the Ignite thick client to the
comparison list. It can behave faster for your workload.

-
Denis


On Mon, Oct 12, 2020 at 6:14 AM Pavel Tupitsyn <pt...@apache.org> wrote:

> It depends. The only way to tell is to measure and profile your specific
> use case.
>
> What I'm trying to say is:
> 1. Start with one instance - low complexity, low overhead.
> 2. If performance needs improvement, and Ignite is determined to be a
> bottleneck,
>     consider trying multiple instances, this may help in some cases.
>
>
> On Mon, Oct 12, 2020 at 3:59 PM midulaj <mi...@gmail.com> wrote:
>
> > Thanks Pavel,
> >
> > How can we categorize the high load scenarios in the case of Ignite..If
> my
> > requests to Ingnite are more than 1000 per second then can i take it as a
> > high-load or i can consider more figures for high load
> >
> >
> >
> > --
> > Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
> >
>

Re: Instance of IgniteClient in Multi threaded application

Posted by Pavel Tupitsyn <pt...@apache.org>.
It depends. The only way to tell is to measure and profile your specific
use case.

What I'm trying to say is:
1. Start with one instance - low complexity, low overhead.
2. If performance needs improvement, and Ignite is determined to be a
bottleneck,
    consider trying multiple instances, this may help in some cases.


On Mon, Oct 12, 2020 at 3:59 PM midulaj <mi...@gmail.com> wrote:

> Thanks Pavel,
>
> How can we categorize the high load scenarios in the case of Ignite..If my
> requests to Ingnite are more than 1000 per second then can i take it as a
> high-load or i can consider more figures for high load
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>

Re: Instance of IgniteClient in Multi threaded application

Posted by midulaj <mi...@gmail.com>.
Thanks Pavel,

How can we categorize the high load scenarios in the case of Ignite..If my
requests to Ingnite are more than 1000 per second then can i take it as a
high-load or i can consider more figures for high load



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by Pavel Tupitsyn <pt...@apache.org>.
Java and .NET Thin Clients are thread-safe.
You can use one client instance for all requests.

However, in high-load scenarios, one client can become a bottleneck.
In this case you can try creating multiple client instances (say, one
client per processor)
and using them in a round-robin way.

On Sat, Oct 10, 2020 at 8:07 PM midulaj <mi...@gmail.com> wrote:

>
> As per Ignite documentation "*only one thread reads/writes to the channel
> while other threads are waiting for the operation to complete."*.If we are
> using single client connection,then it may affect the performance
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>

Re: Instance of IgniteClient in Multi threaded application

Posted by midulaj <mi...@gmail.com>.
As per Ignite documentation "*only one thread reads/writes to the channel
while other threads are waiting for the operation to complete."*.If we are
using single client connection,then it may affect the performance



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Re: Instance of IgniteClient in Multi threaded application

Posted by Denis Magda <dm...@apache.org>.
It's preferable to use a single client connection. The clients are
multi-threaded, if I'm not mistaken. Btw, what type of the client you use
(.NET, Java, ...)?

-
Denis


On Fri, Oct 9, 2020 at 7:53 AM midulaj <mi...@gmail.com> wrote:

> Hi Igniters,
>
> If we are using ignite in a web service,can we reuse single IgniteClient
> for
> all requests or we have to create IgniteClient for each requests??
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>