You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Gregory Sylvain <gr...@ieee.org> on 2022/09/05 23:09:29 UTC

Why does Thin client connect to all servers in connection string???

Hi,



I am running an Ignite 2.12.0 Service Grid with 5 Server Nodes and 32 Thin
Client nodes in a private cloud of RHEL 7.9 VMs.  (no docker images).



Doing a sqlline CLI query for connected clients, I get the expected 32
connected clients.  However, if I execute netstat (or ss) on all
ServerNodes, I see an ESTABLISHed connection from each client to each
ServerNode on port 10800?  These connections seem to be maintained (e.g.
they do not timeout after 2 hours).



I am using Spring XML to configure both client and server nodes.  The
server nodes are also utilizing systemd for reliability.



Any idea what is going on?



Thanks in advance.

Greg

Re: Why does Thin client connect to all servers in connection string???

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi, this is called "partition awareness" [1] - thin client establishes
connections to all known nodes to be able to send requests directly to the
primary node for the given entry.
Multiple connections are also useful for load balancing and improved
reliability.

You can disable this behavior with
ClientConfiguration#setPartitionAwareness(false) [2]

[1]
https://ignite.apache.org/docs/latest/thin-clients/java-thin-client#partition-awareness
[2]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/ClientConfiguration.html#setPartitionAwarenessEnabled-boolean-

On Tue, Sep 6, 2022 at 2:09 AM Gregory Sylvain <gr...@ieee.org>
wrote:

>
>
> Hi,
>
>
>
> I am running an Ignite 2.12.0 Service Grid with 5 Server Nodes and 32 Thin
> Client nodes in a private cloud of RHEL 7.9 VMs.  (no docker images).
>
>
>
> Doing a sqlline CLI query for connected clients, I get the expected 32
> connected clients.  However, if I execute netstat (or ss) on all
> ServerNodes, I see an ESTABLISHed connection from each client to each
> ServerNode on port 10800?  These connections seem to be maintained (e.g.
> they do not timeout after 2 hours).
>
>
>
> I am using Spring XML to configure both client and server nodes.  The
> server nodes are also utilizing systemd for reliability.
>
>
>
> Any idea what is going on?
>
>
>
> Thanks in advance.
>
> Greg
>
>
>

Re: Why does Thin client connect to all servers in connection string???

Posted by Alex Plehanov <pl...@gmail.com>.
Hello,

When "partition awareness" is enabled, the client tries to connect to all
server nodes from the connection string. If "partition awareness" is
disabled, only one connection is maintained. Since Ignite 2.11 "partition
awareness" is enabled by default. See [1] for more information.

[1]:
https://ignite.apache.org/docs/latest/thin-clients/getting-started-with-thin-clients#partition-awareness


вт, 6 сент. 2022 г. в 02:09, Gregory Sylvain <gr...@ieee.org>:

>
>
> Hi,
>
>
>
> I am running an Ignite 2.12.0 Service Grid with 5 Server Nodes and 32 Thin
> Client nodes in a private cloud of RHEL 7.9 VMs.  (no docker images).
>
>
>
> Doing a sqlline CLI query for connected clients, I get the expected 32
> connected clients.  However, if I execute netstat (or ss) on all
> ServerNodes, I see an ESTABLISHed connection from each client to each
> ServerNode on port 10800?  These connections seem to be maintained (e.g.
> they do not timeout after 2 hours).
>
>
>
> I am using Spring XML to configure both client and server nodes.  The
> server nodes are also utilizing systemd for reliability.
>
>
>
> Any idea what is going on?
>
>
>
> Thanks in advance.
>
> Greg
>
>
>