You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Hemambara <ko...@gmail.com> on 2020/10/31 05:03:15 UTC

Ignite 2.9 one way client to server communication

I see that ignite 2.9 has added support for one-way thick-client to server
connections. Does it reduce the time taken to connect thick client to server
and provides all thick client functionalities? Does client still be in ring?
Right now we r facing issues with thick client where it is taking more time
to connect especially when we have 60 clients. Switched to thin clients for
now. But we need map listeners. Does upgrading to 2.9 helps reducing long
connection times? Also is there any plan to provide map listeners on thin
clients?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite 2.9 one way client to server communication

Posted by Hemambara <ko...@gmail.com>.
Can you please check above questions and help me out



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite 2.9 one way client to server communication

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

This is correct, as long as you do not start any new caches, adding a thick
client should be PME-less.

Do you have logs from joining client and server node (coordinator, crd=true
if possible)?

Regards,
-- 
Ilya Kasnacheev


пн, 2 нояб. 2020 г. в 20:25, Hemambara <ko...@gmail.com>:

> Thank you for response. If I understand correctly, so thick client
> connectivity time is not depending on # of server nodes, it all depends on
> PME length ? Can you please elaborate or point me to the resources where I
> can understand PME length ? I got few links on how PME works. But sorry I
> did not what is PME length. Also as per below reference, ignite thick
> client
> 2.8.0 does not trigger any PME. Is this right?
>
>
> https://cwiki.apache.org/confluence/display/IGNITE/%28Partition+Map%29+Exchange+-+under+the+hood
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite 2.9 one way client to server communication

Posted by Hemambara <ko...@gmail.com>.
Thank you for response. If I understand correctly, so thick client
connectivity time is not depending on # of server nodes, it all depends on
PME length ? Can you please elaborate or point me to the resources where I
can understand PME length ? I got few links on how PME works. But sorry I
did not what is PME length. Also as per below reference, ignite thick client
2.8.0 does not trigger any PME. Is this right?

https://cwiki.apache.org/confluence/display/IGNITE/%28Partition+Map%29+Exchange+-+under+the+hood




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite 2.9 one way client to server communication

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

I don't think this is the issue of configuration, rather than how many
nodes you are having and the length of your transactions/operations.

It's all about PME length.

Regards,
-- 
Ilya Kasnacheev


пн, 2 нояб. 2020 г. в 16:05, Hemambara <ko...@gmail.com>:

> Thank you Stephen and Ilya for your response.
>
> Please find my server and client config and let me know if I a missing
> anything which is causing these delays. We have 8 jvm server nodes running
> on Ignite 2.8.0 with 4gig each and each node is on separate host. We have
> 60
> client nodes (Ignite 2.8.0) using this same client configuration. We are
> not
> using persistence, it is purely in-memory. Both server and clients are in
> same data center. Initially first few clients are able to connect in 1-2
> minutes, but as it grows, last clients are taking 5-6 minutes. We really
> want to reduce the connectivity time so that we can use map listener. Right
> now, it became a road blocker to use any other thick client
> functionalities.
>
> Can you please clarify below queries:
>         1) If client is not part of ring, any reason why it has to trigger
> PME ?
>         2) If it just connecting to one server node like thin client, does
> it
> transfer/wait for any additional events before it successfully establish
> connection, which is causing delays ?
>         3) Does a client node wait until all the other server and client
> nodes get notified that it joined ?
>         4) I am defining cache on client config as well? I think it is not
> required. Will it cause any delays during connectivity ?
>         5) Any plan / any other way to get map listener functionality in
> thin
> client (other than continuous query) ?
>
>
> Server config:
> ---------------
>
>
> <bean id="MyGrid"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>         <property name="clientConnectorConfiguration">
>         <bean
> class="org.apache.ignite.configuration.ClientConnectorConfiguration">
>                 <property name=&quot;port&quot; value=&quot;&lt;port #>"/>
>         </bean>
>         </property>
>         <property name="igniteInstanceName" value="MyInstance"/>
>         <property name="peerClassLoadingEnabled" value="false"/>
>         <property name="systemWorkerBlockedTimeout" value="60000"/>
>         <property name="clientFailureDetectionTimeout" value="60000"/>
>         <property name="failureDetectionTimeout" value="60000"/>
>         <property name="includeProperties">
>         <array/>
>         </property>
>         <property name="cacheConfiguration">
>                 <list>
>                         <ref bean="Cache1"/>
>                 </list>
>         </property>
>         <property name="binaryConfiguration">
>         <bean class="org.apache.ignite.configuration.BinaryConfiguration">
>                 <property name="compactFooter" value="false"/>
>                 <property name="typeConfigurations">
>                 <list>
>                 <bean
> class="org.apache.ignite.binary.BinaryTypeConfiguration">
>                         <property name="typeName" value="a.b.c.MyClass"/>
>                 </bean>
>                 </list>
>                 </property>
>                 </bean>
>                 </property>
>         <property name="communicationSpi">
>                 <bean
> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>
>                 <property name=&quot;localPort&quot;
> value=&quot;&lt;#Myport>"/>
>                 <property name="localPortRange" value="50"/>
>                 </bean>
>         </property>
>         <property name="discoverySpi">
>         <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>         <property name=&quot;localPort&quot; value=&quot;&lt;port#>"/>
>         <property name="ipFinder">
>         <bean
>
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>         <property name="addresses">
>         <list>
>         <value>localhost</value>
>         <value>host1:port#</value>
>         <value>host2:port#</value>
>         <value>host3:port#</value>
>         <value>host4:port#</value>
>         <value>host5:port#</value>
>         <value>host6:port#</value>
>         <value>host7:port#</value>
>         <value>host8:port#</value>
>         </list>
>         </property>
> </bean>
> </property>
> </bean>
> </property>
> </bean>
> <bean id="Cache1"
> class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="Cache1"/>
> <property name="storeKeepBinary" value="false"/>
> <property name="statisticsEnabled" value="false"/>
> <property name="sqlSchema" value="MySchema"/>
> <property name="cacheMode" value="PARTITIONED"/>
> <property name="backups" value="7"/>
> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
> <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
> <property name="affinity">
> <bean
>
> class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
> <property name="excludeNeighbors" value="true"/>
> </bean>
> </property>
>
> </bean>
>
>
>
> Client config
> ---------------------
> <bean id="MyGridClient"
> class="org.apache.ignite.configuration.IgniteConfiguration">
>         <property name="clientMode" value="true"/>
>         <property name="igniteInstanceName" value="MyGridClient"/>
>         <property name="userAttributes" ref="userAttributes"/>
>         <property name="peerClassLoadingEnabled" value="false"/>
>         <property name="systemWorkerBlockedTimeout" value="60000"/>
>         <property name="clientFailureDetectionTimeout" value="60000"/>
>         <property name="failureDetectionTimeout" value="60000"/>
>         <property name="includeProperties">
>         <array/>
>         </property>
>                 <list>
>                 <ref bean="Cache1"/>
>                 </list>
>         </property>
>                 <property name="binaryConfiguration">
>                         <bean
> class="org.apache.ignite.configuration.BinaryConfiguration">
>                         <property name="compactFooter" value="false"/>
>                         <property name="typeConfigurations">
>                                 <list>
>                                 <bean
> class="org.apache.ignite.binary.BinaryTypeConfiguration">
>                                 <property name="typeName"
> value="a.b.c.MyClass"/>
>                                 </bean>
>                                 </list>
>                 </property>
>         </bean>
> </property>
>         <property name="communicationSpi">
>                 <bean
> class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>                         <property name=&quot;localPort&quot;
> value=&quot;&lt;MyPort#>"/>
>                         <property name="localPortRange" value="50"/>
>                 </bean>
>         </property>
>         <property name="discoverySpi">
>         <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>         <property name=&quot;localPort&quot; value=&quot;&lt;MyPort#>"/>
>         <property name="ipFinder">
>         <bean
>
> class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>         <property name="addresses">
>         <list>
>         <value>localhost</value>
>         <value>host1:port#</value>
>         <value>host2:port#</value>
>         <value>host3:port#</value>
>         <value>host4:port#</value>
>         <value>host5:port#</value>
>         <value>host6:port#</value>
>         <value>host7:port#</value>
>         <value>host8:port#</value>
>         </list>
>         </property>
> </bean>
> </property>
> </bean>
> </property>
> </bean>
>
>
>
>
> <bean id="Cache1"
> class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="Cache1"/>
> <property name="storeKeepBinary" value="false"/>
> <property name="statisticsEnabled" value="false"/>
> <property name="sqlSchema" value="MySchema"/>
> <property name="cacheMode" value="PARTITIONED"/>
> <property name="backups" value="7"/>
> <property name="writeSynchronizationMode" value="FULL_SYNC"/>
> <property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
> <property name="affinity">
> <bean
>
> class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
> <property name="excludeNeighbors" value="true"/>
> </bean>
> </property>
>
> </bean>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite 2.9 one way client to server communication

Posted by Hemambara <ko...@gmail.com>.
Thank you Stephen and Ilya for your response.

Please find my server and client config and let me know if I a missing
anything which is causing these delays. We have 8 jvm server nodes running
on Ignite 2.8.0 with 4gig each and each node is on separate host. We have 60
client nodes (Ignite 2.8.0) using this same client configuration. We are not
using persistence, it is purely in-memory. Both server and clients are in
same data center. Initially first few clients are able to connect in 1-2
minutes, but as it grows, last clients are taking 5-6 minutes. We really
want to reduce the connectivity time so that we can use map listener. Right
now, it became a road blocker to use any other thick client functionalities. 

Can you please clarify below queries:
	1) If client is not part of ring, any reason why it has to trigger PME ?
	2) If it just connecting to one server node like thin client, does it
transfer/wait for any additional events before it successfully establish
connection, which is causing delays ?
        3) Does a client node wait until all the other server and client
nodes get notified that it joined ? 
	4) I am defining cache on client config as well? I think it is not
required. Will it cause any delays during connectivity ?
	5) Any plan / any other way to get map listener functionality in thin
client (other than continuous query) ? 


Server config:
---------------


<bean id="MyGrid"
class="org.apache.ignite.configuration.IgniteConfiguration">
	<property name="clientConnectorConfiguration">
	<bean class="org.apache.ignite.configuration.ClientConnectorConfiguration">
		<property name=&quot;port&quot; value=&quot;&lt;port #>"/>
	</bean>
	</property>
	<property name="igniteInstanceName" value="MyInstance"/>
	<property name="peerClassLoadingEnabled" value="false"/>
	<property name="systemWorkerBlockedTimeout" value="60000"/>
	<property name="clientFailureDetectionTimeout" value="60000"/>
	<property name="failureDetectionTimeout" value="60000"/>
	<property name="includeProperties">
	<array/>
	</property>
	<property name="cacheConfiguration">
		<list>
			<ref bean="Cache1"/>
		</list>
	</property>
	<property name="binaryConfiguration">
	<bean class="org.apache.ignite.configuration.BinaryConfiguration">
		<property name="compactFooter" value="false"/>
		<property name="typeConfigurations">
		<list>
		<bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
			<property name="typeName" value="a.b.c.MyClass"/>
		</bean>
		</list>
		</property>
		</bean>
		</property>
	<property name="communicationSpi">
		<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
		
		<property name=&quot;localPort&quot; value=&quot;&lt;#Myport>"/>
		<property name="localPortRange" value="50"/>
		</bean>
	</property>
	<property name="discoverySpi">
	<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
	<property name=&quot;localPort&quot; value=&quot;&lt;port#>"/>
	<property name="ipFinder">
	<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
	<property name="addresses">
	<list>
	<value>localhost</value>
	<value>host1:port#</value> 
	<value>host2:port#</value>
	<value>host3:port#</value>
	<value>host4:port#</value>
	<value>host5:port#</value>
	<value>host6:port#</value>
	<value>host7:port#</value>
	<value>host8:port#</value>
	</list>
	</property>
</bean>
</property>
</bean>
</property>
</bean>
<bean id="Cache1"
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="Cache1"/>
<property name="storeKeepBinary" value="false"/>
<property name="statisticsEnabled" value="false"/>
<property name="sqlSchema" value="MySchema"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="7"/>
<property name="writeSynchronizationMode" value="FULL_SYNC"/>
<property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
<property name="affinity">
<bean
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
<property name="excludeNeighbors" value="true"/>
</bean>
</property>

</bean>



Client config
---------------------
<bean id="MyGridClient"
class="org.apache.ignite.configuration.IgniteConfiguration">
	<property name="clientMode" value="true"/>
	<property name="igniteInstanceName" value="MyGridClient"/>
	<property name="userAttributes" ref="userAttributes"/>
	<property name="peerClassLoadingEnabled" value="false"/>
	<property name="systemWorkerBlockedTimeout" value="60000"/>
	<property name="clientFailureDetectionTimeout" value="60000"/>
	<property name="failureDetectionTimeout" value="60000"/>
	<property name="includeProperties">
	<array/>
	</property>
		<list>
		<ref bean="Cache1"/>
		</list>
	</property>
		<property name="binaryConfiguration">
			<bean class="org.apache.ignite.configuration.BinaryConfiguration">
			<property name="compactFooter" value="false"/>
			<property name="typeConfigurations">
				<list>
				<bean class="org.apache.ignite.binary.BinaryTypeConfiguration">
				<property name="typeName" value="a.b.c.MyClass"/>
				</bean>
				</list>
		</property>
	</bean>
</property>
	<property name="communicationSpi">
		<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
			<property name=&quot;localPort&quot; value=&quot;&lt;MyPort#>"/>
			<property name="localPortRange" value="50"/>
		</bean>
	</property>
	<property name="discoverySpi">
	<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
	<property name=&quot;localPort&quot; value=&quot;&lt;MyPort#>"/>
	<property name="ipFinder">
	<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
	<property name="addresses">
	<list>
	<value>localhost</value>
	<value>host1:port#</value> 
	<value>host2:port#</value>
	<value>host3:port#</value>
	<value>host4:port#</value>
	<value>host5:port#</value>
	<value>host6:port#</value>
	<value>host7:port#</value>
	<value>host8:port#</value>
	</list>
	</property>
</bean>
</property>
</bean>
</property>
</bean>




<bean id="Cache1"
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="Cache1"/>
<property name="storeKeepBinary" value="false"/>
<property name="statisticsEnabled" value="false"/>
<property name="sqlSchema" value="MySchema"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="7"/>
<property name="writeSynchronizationMode" value="FULL_SYNC"/>
<property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
<property name="affinity">
<bean
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
<property name="excludeNeighbors" value="true"/>
</bean>
</property>

</bean>



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite 2.9 one way client to server communication

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

No, it is not supposed to reduce the time taken. Instead, it is solving the
problem that client may be behind NAT and not reachable from outside. Or
server nodes may be inside K8S with similar results.

Thick client will still take time to connect since it triggers PME. Clients
were never a part of ring (unless forceServerMode is set) - they only talk
via discovery to one server node and only switch if it becomes unavailable

Regards,
-- 
Ilya Kasnacheev


сб, 31 окт. 2020 г. в 08:03, Hemambara <ko...@gmail.com>:

> I see that ignite 2.9 has added support for one-way thick-client to server
> connections. Does it reduce the time taken to connect thick client to
> server
> and provides all thick client functionalities? Does client still be in
> ring?
> Right now we r facing issues with thick client where it is taking more time
> to connect especially when we have 60 clients. Switched to thin clients for
> now. But we need map listeners. Does upgrading to 2.9 helps reducing long
> connection times? Also is there any plan to provide map listeners on thin
> clients?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite 2.9 one way client to server communication

Posted by Stephen Darlington <st...@gridgain.com>.
The one-way-thick-client is designed to solve network topology issues (where host resolution works one way but not the other). There are a lot of improvements in 2.9 so it’s certainly worth trying.

We’d need to know more about your topology — number of nodes, sizes, etc — to get to the bottom of your performance problem. Connections should get a little slower as it grows in size, but sixty nodes should not be a problem.

> On 31 Oct 2020, at 05:03, Hemambara <ko...@gmail.com> wrote:
> 
> I see that ignite 2.9 has added support for one-way thick-client to server
> connections. Does it reduce the time taken to connect thick client to server
> and provides all thick client functionalities? Does client still be in ring?
> Right now we r facing issues with thick client where it is taking more time
> to connect especially when we have 60 clients. Switched to thin clients for
> now. But we need map listeners. Does upgrading to 2.9 helps reducing long
> connection times? Also is there any plan to provide map listeners on thin
> clients?
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/