quantum-elixir/quantum-core

multiple apps in libcluster, quantum does not identifies which node to select

Open

#605 aberto em 5 de mar. de 2024

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Elixir (153 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (2.408 stars)
Métricas de merge de PR
 (Mesclagem média 1d 9h) (11 fundiu PRs em 30d)

Description

Hi there, I have few applications running in cluster which able to call each other Assume I have apps api-server, intergation-server I have quantum used in app intergation-server I have few nodes of api-server and few nodes intergation-server in intergation-server config, I have settings in config

config :intergation-server, IntergationServer.Scheduler,
timeout: :infinity,
  overlap: false,
  global: true,
  jobs: [
  {"1 * * * *", ... } <- Every hour 
  ...
 ]

Nodes visible in :intergation-server:

Node.self
:"app@**.**.**.**1"
iex(app@10.21.73.141)7> Node.list
[
:"app@**.**.**.**2"  # <- node of :intergation-server
:"app@**-**-**-***.api.pod.cluster.local", # <- node of :api-server
 :"app@**-**-**-***.api.pod.cluster.local", # <- node of :api-server
 :"app@**-**-**-***.api.pod.cluster.local" # <- node of :api-server
 ]

I can see job (for application intergation-server) is triggering once in few hours, I assume nodes of another application (api-server) included in when Quantum.RunStrategy.Random select node to run

Node list gets all nodes available: https://github.com/quantum-elixir/quantum-core/blob/main/lib/quantum/run_strategy/random.ex#L46

Guia do colaborador