Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve keycloak sync #697

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

improve keycloak sync #697

wants to merge 1 commit into from

Conversation

Isak-Kallini
Copy link
Member

Adds a last_synced field to the mandates table and checks if a mandate has started or ended since the last time it synced and adds/deletes the user from the keycloak group.

@Isak-Kallini Isak-Kallini force-pushed the improve-keycloak-sync branch 2 times, most recently from bcfcec3 to 1758400 Compare January 31, 2025 18:33
@danieladugyan
Copy link
Member

danieladugyan commented Jan 31, 2025

Is it worth keeping track of when things were last synced, as opposed to just syncing everything?

On the one hand, I think we had some performance issues when we tried to just sync everything in one large batch, since it effectively caused a denial-of-service attack on our Keycloak instance.

On the other hand, attempting to sync smartly makes it very easy for the systems to drift out of sync.

@Isak-Kallini
Copy link
Member Author

There are currently 6432 entries in the mandates table, and it will just keep increasing so I think it's not sustainable to sync everything.
Considering we already have a lot of problems with them drifting out of sync I don't see how my changes would make it worse (hopefully it makes it better). But it's definitely something that should be discussed more

@Isak-Kallini Isak-Kallini force-pushed the improve-keycloak-sync branch from 1758400 to f7a7cbb Compare February 3, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants