Here is something about the events and remote events in Sitecore.
What is an Event?
Events in Sitecore are similar to events in other systems: something triggers an event and there are handlers that are configured to handle the event.
Event handlers are similar to pipelines in how they are configured. An event handler is a .NET class that implements a method. When an event is triggered, the event handlers are run in order.
Event handlers are defined in Sitecore patch files.
The following is an example of the event handler that handles the item:deleted event.
<event name="item:deleted">
<handler type="Sitecore.Links.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeleted" />
<handler type="Sitecore.Tasks.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeleted" />
<handler type="Sitecore.Globalization.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeleted" />
<handler type="Sitecore.Data.Fields.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeleted" />
<handler type="Sitecore.Rules.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeleted" />
</event>
What is a Remote Event?
When an event is triggered, the event handlers on that server run. For example, when an item is saved, the item:saved event is fired on that server. That causes the database to be updated and for the cache to be updated.
But what happens if you are using a multi-server environment? The database has already been updated, so that doesn’t need to happen again. But the item may be cached on the other servers, so the cache needs to be updated. This is what remote events do. They ensure the appropriate handlers are run on remote servers.
The following is an example of the remote event handler for the item:deleted event. Another way of describing the following is it is an example of the event handlers for the remote:item:deleted event.
<event name="item:deleted:remote">
<handler type="Sitecore.Globalization.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeletedRemote" />
<handler type="Sitecore.Data.Fields.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeletedRemote" />
<handler type="Sitecore.Rules.ItemEventHandler, Sitecore.Kernel"
method="OnItemDeletedRemote" />
</event>
If your event requires a remote event be triggered on remote servers, you need to be sure that you raise the remote event.
In a multi-server Sitecore environment, the term “remote” describes each of the other servers in the environment. It is a relative designation. Remote servers are all of the servers in the environment except for the server that the code is currently running on.
And here are some code snippets that you can use for this:
https://sitecore-community.github.io/docs/pipelines-and-events/events/#event_basics