Hello! I need help setting up Oban Web with separate Web and Worker nodes.
My scenario is:
- The
Worker
app runs theObanRunner
instance with all our queues. - The
Web
app has a separateObanWatcher
instance that I’m passing as the:oban_name
option toOban.Web.Router.oban_dashboard/2
; This instance is configured withqueues: false
since it’s not a worker node. - Both the
ObanWatcher
andObanRunner
instances haveOban.Met
in the plugins list and auto-start is disabled globally. - The
Worker
andWeb
apps are released/deployed separately.
The problem is that:
- If the
Worker
andWeb
nodes are clustered together, the job counts in the ‘States’ sidebar component are shown doubled (i.e. if there are 10k completed jobs in the database, it will show 20k in the dashboard). - If the
Worker
andWeb
nodes are not clustered together, the counts are accurate but the ‘Nodes’ and ‘Queues’ sidebar components won’t show (I presume because of thequeues: false
option).
This seems to be an issue in the Oban.Met
package, as a similar scenario using the previous Oban.Web.Plugins.Stats
plugin would work.
Is there anything I’m doing wrong? I’m aware that turning Worker
into a Phoenix app so the dashboard can talk directly to the ObanRunner
instance should work, but I would like to avoid that since each app serves a different purpose.
PS: I already tried switching to the PG notifier (with the two nodes in the same cluster) and I also confirmed it’s not related to the estimate function; I didn’t find any other possible reasons in the documentation for oban_web or oban_met.