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

Scaling the service horizontally #15

Open
anuveyatsu opened this issue Oct 5, 2020 · 0 comments
Open

Scaling the service horizontally #15

anuveyatsu opened this issue Oct 5, 2020 · 0 comments

Comments

@anuveyatsu
Copy link
Member

From @pwalsh

Reading all the above, can you confirm if my understanding is correct:

1. We have multiple data subscription services running (horizontal scalability).
2. These services **pull** data from CKAN (at an interval), and create tasks (data subscription tasks, i.e.: sending emails for changes to activity).
3. Because there were multiple data subscription services running, we had a duplication of tasks (multiple emails sent for same event in CKAN).

At a guess, what is missing is, for each "activity" that data subscriptions creates a task for, it needs to create a unique identifier for that task, and thereby, even if the same activity is submitted multiple times, then, data subscriptions will gracefully handle this and still only manage one task per activity.

Basically, the data subscriptions app needs to ensure it processes any activity **exactly once**.

From @anuveyatsu

yes, that's correct, in other words:

* We have **pull activities** job running at a given interval which pulls activities from CKAN.
* We have **dispatch notifications** job also running at a given interval which sends out emails to subscribers.
* We had multiple data subscription services running **using the same database credentials** which caused duplicate data in the db and therefore duplicate notifications.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant