ReadFromBackup, Primary_SYNC, Backups

classic Classic list List threaded Threaded
4 messages Options
Mahesh Renduchintala Mahesh Renduchintala
Reply | Threaded
Open this post in threaded view
|

ReadFromBackup, Primary_SYNC, Backups

Hi

I have a large SQL table (12 million records) in cacheMode partitioned.
This table is distributed over two server nodes


-1-

When running a large SELECT from a thick client node,  could data be fetched from the backup instead of primary partitions?
Below is the configuration. 

<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="2"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
<property name="rebalanceMode" value="ASYNC"/>
<property name="statisticsEnabled" value="true"/>
<property name="readFromBackup" value="true"/>
<property name="queryParallelism" value="2"/>
/>

We are seeing some performance improvement, since we made regardFromBackup= False and a few other things. 

-2-
in a two server system, if readFromBackup = False for a cache, and if one server fails, 

would 2nd server stop serving client requests since some partition data is in the backup?


-3-
is it possible that readFromBackup=True and Primary_Sync mode for a cache could give inconsistent data for cacheMode Replicated in a 2 server node?


-4-
if I increase backup= 10, in a 2 server system, would it mean that there are 10 backups.

I am guessing, ignite would keep a single back up on each server, not 5 and 5 on each server. 
a new backup is created for that cache for any new node joining the cluster.
is this right understanding?




Strong

regards
mahesh

Mahesh Renduchintala Mahesh Renduchintala
Reply | Threaded
Open this post in threaded view
|

Re: ReadFromBackup, Primary_SYNC, Backups

Hi, 
Can you please give some feedback on the below?



From: Mahesh Renduchintala <[hidden email]>
Sent: Tuesday, November 3, 2020 8:20 AM
To: [hidden email] <[hidden email]>
Subject: ReadFromBackup, Primary_SYNC, Backups
 
Hi

I have a large SQL table (12 million records) in cacheMode partitioned.
This table is distributed over two server nodes


-1-

When running a large SELECT from a thick client node,  could data be fetched from the backup instead of primary partitions?
Below is the configuration. 

<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="2"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
<property name="rebalanceMode" value="ASYNC"/>
<property name="statisticsEnabled" value="true"/>
<property name="readFromBackup" value="true"/>
<property name="queryParallelism" value="2"/>
/>

We are seeing some performance improvement, since we made regardFromBackup= False and a few other things. 

-2-
in a two server system, if readFromBackup = False for a cache, and if one server fails, 

would 2nd server stop serving client requests since some partition data is in the backup?


-3-
is it possible that readFromBackup=True and Primary_Sync mode for a cache could give inconsistent data for cacheMode Replicated in a 2 server node?


-4-
if I increase backup= 10, in a 2 server system, would it mean that there are 10 backups.

I am guessing, ignite would keep a single back up on each server, not 5 and 5 on each server. 
a new backup is created for that cache for any new node joining the cluster.
is this right understanding?




Strong

regards
mahesh

stephendarlington stephendarlington
Reply | Threaded
Open this post in threaded view
|

Re: ReadFromBackup, Primary_SYNC, Backups

In reply to this post by Mahesh Renduchintala
1. Reads mostly go to the primary but yes, in some circumstances it’ll read from the backup with that configuration set to true

2. No. It’ll “rebalance,” which means backup partitions would be promoted to primaries. Your client would still get a response

3. Yes — though in practice the window is very small. Use FULL_SYNC and/or readFromBackup=false if you need to avoid that

4. You’d get one copy per node. Think of it as a target rather than a guarantee

On 3 Nov 2020, at 02:50, Mahesh Renduchintala <[hidden email]> wrote:

Hi

I have a large SQL table (12 million records) in cacheMode partitioned.
This table is distributed over two server nodes


-1-

When running a large SELECT from a thick client node,  could data be fetched from the backup instead of primary partitions?
Below is the configuration. 

<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="2"/>
<property name="atomicityMode" value="TRANSACTIONAL"/>
<property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
<property name="rebalanceMode" value="ASYNC"/>
<property name="statisticsEnabled" value="true"/>
<property name="readFromBackup" value="true"/>
<property name="queryParallelism" value="2"/>
/>

We are seeing some performance improvement, since we made regardFromBackup= False and a few other things. 

-2-
in a two server system, if readFromBackup = False for a cache, and if one server fails, 

would 2nd server stop serving client requests since some partition data is in the backup?


-3-
is it possible that readFromBackup=True and Primary_Sync mode for a cache could give inconsistent data for cacheMode Replicated in a 2 server node?


-4-
if I increase backup= 10, in a 2 server system, would it mean that there are 10 backups.

I am guessing, ignite would keep a single back up on each server, not 5 and 5 on each server. 
a new backup is created for that cache for any new node joining the cluster.
is this right understanding?




Strong

regards
mahesh


Vladimir Pligin Vladimir Pligin
Reply | Threaded
Open this post in threaded view
|

Re: ReadFromBackup, Primary_SYNC, Backups

In reply to this post by Mahesh Renduchintala
Manesh,

>> When running a large SELECT from a thick client node,  could data be
>> fetched from the backup instead of primary partitions?

readFromBackup=true affects only cache operations, it doesn't work with SQL
queries.

>> in a two server system, if readFromBackup = False for a cache, and if one
>> server fails,
would 2nd server stop serving client requests since some partition data is
in the backup?

no, it will go on serving requests, former backup partitions will turn into
primary

>> is it possible that readFromBackup=True and Primary_Sync mode for a cache
>> could give inconsistent data for cacheMode Replicated in a 2 server node?

there's no need to explicitly use readFromBackup with replicated caches.
What do you exactly mean by "inconsistent data"? Could you please describe
your scenario?

>> if I increase backup= 10, in a 2 server system, would it mean that there
>> are 10 backups.
I am guessing, ignite would keep a single back up on each server, not 5 and
5 on each server.
a new backup is created for that cache for any new node joining the cluster.
is this right understanding?

Yes, that's correct.



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