VMware GemFire

 View Only

 Write behind in multisite deployment

Gourab Pattanayak's profile image
Gourab Pattanayak posted Jul 03, 2019 11:47 PM

Is it possible to disable the write behind events for the replicated cache regions of a Data center in a multi-site deployment ? if yes what configuration will disable it ?

All Data centers should be replicated but one Data center should not generate write behind events.

Example : I have two Data centers DC1 and DC2.

Data loaded to cache from DC1.

Data replicated in all nodes in DC1

Data sent to DC2 via Gateway Sender

Data received in DC2 by Gateway Receiver

Data replicated in cache regions of DC2

Is DC2 going to generate write behind events ?

Juan Cassella's profile image
Juan Cassella

Hello Gourab,

 

Thanks for contacting the Pivotal Support Community!.

By write behind you mean AsyncEventListener for Write-Behind Cache Event Handling [1]?. If that's the case, you can just configure your regions on the DC2 cluster to not have an async-event-queue associated with them.

Hope this helps.

Best regards.

 

[1]: https://gemfire.docs.pivotal.io/97/geode/developing/events/implementing_write_behind_event_handler.html

Gourab Pattanayak's profile image
Gourab Pattanayak

yes write behind using  ​AsyncEventListener for Write-Behind Cache Event Handling .

Thanks for your answer.

Gourab Pattanayak's profile image
Gourab Pattanayak

@Juan José Ramos Cassella (Support)​  I am able to setup the multi site  cluster in two Data centers and I have verified the DCs are in Sync.  however when I removed  data from one  cache region from a Data center  it is  not  reflected in other data center.

 

Here is the scenario :

Step - 1

DC1

  replicated  Region1 -> data loaded with 10 objects

DC2

  replicated Region1 -> Data sync up by gateway sender/receiver

 

Step-2

 DC1

      All data removed using gfsh from replicated Region1

 DC2

     Still have 10 objects

 

 

    

 

 

Juan Cassella's profile image
Juan Cassella

Hello Gourab,

 

>> All data removed using gfsh from replicated Region1

Are you executing individual remove commands for every single entry?, or just a plain remove --all?. Keep in mind that only entry events are replicated over the wan, not region events (like the Region.clear() internally used when remove --all is executed).

Best regards.

Gourab Pattanayak's profile image
Gourab Pattanayak

Just removing all  by following command  

   remove --region=/region1 --all=true

Gourab Pattanayak's profile image
Gourab Pattanayak

​What is the difference between Entry event and Region event ? Are they not same ? 

Juan Cassella's profile image
Juan Cassella

Hello Gourab,

 

Please read my previous answer: the gfsh remove -all=true command ends up invoking Region.clear() under the hood, and the "clear" operation is a region event, so it doesn't get replicated over the WAN, it works like this by design.

An Entry Event is basically something that modifies an entry (put, update, remove), a Region Event is basically something modifies the entire region (clear, invalidate, destroy).

Best regards.

Gourab Pattanayak's profile image
Gourab Pattanayak

​Thank you for the information ! I will add this to the testing plan and get back to you in case of any further clarifications.

Juan Cassella's profile image
Juan Cassella

Hello Gourab,

 

No worries at all.

Best regards.