Syncing two different Keycloaks

Is there a way to implement a bi-directional sync (in real time if possible) between two keycloak clusters.
For example syncing the users and groups from one keycloak to the other and vice versa.

Is there any idea?

For know I came up to use an directory service