Instance of IgniteClient in Multi threaded application

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Instance of IgniteClient in Multi threaded application

midulaj
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/
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

dmagda
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 <[hidden email]> 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/
>
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

midulaj
Thanks Denis,

Its a REST web service written in JAVA



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

midulaj
In reply to this post by dmagda

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/
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

Pavel Tupitsyn
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 <[hidden email]> 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/
>
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

midulaj
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/
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

Pavel Tupitsyn
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 <[hidden email]> 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/
>
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

dmagda
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 <[hidden email]> 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 <[hidden email]> 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/
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

midulaj
In reply to this post by Pavel Tupitsyn
Thanks Pavel,

We will try that option.



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Instance of IgniteClient in Multi threaded application

midulaj
In reply to this post by dmagda
Ok.Thanks Denis for your replay



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