magda-io / magda

A federated, open-source data catalog for all your big data and small data
https://magda.io
Apache License 2.0
505 stars 92 forks source link

Registry WebHook processing Performance Issue #3406

Closed t83714 closed 1 year ago

t83714 commented 2 years ago

Registry WebHook processing Performance Issue

Registry is responsible for notify webhooks for any interested new events.

Currently, registry will generate complex event fetching SQL based on the webhook's interested, let DB to pick all relevant events and sent to the web hook.

Depends on the web hook's config, the generated SQL might be complicated enough (as it might involved sub queries & multiple table joins) to cause performance issue to the DB.

To avoid that, we probably should try the alternative solution:

This might look like inefficient. But once the web hook is up to date, there won't be too many events generated per seconds and max no. of events to be filtered is always up to 1000 events. Compared with the current solution, the DB might (depends on query plan & optimisation) always have to go through the whole event logs to pick up the events.

t83714 commented 1 year ago

closed via https://github.com/magda-io/magda/pull/3409