Connectors mailing list archives

connectors@odoo-community.org

Avatar

Re: Configuration with multiple Odoo nodes

by
Guewen Baconnier
- 11/07/2019 08:13:02
With this configuration, the jobrunner will execute the jobs on the workers used by end users, which is what you should ideally avoid (when 5 jobs are running, only 5 workers remain for the users). The best setup IMO is:

load-balancer-1, exposes [Odoo HTTP Workers node 1, Odoo HTTP Workers node 2] to users.

Odoo HTTP Workers node 1:
max_cron_threads = 0
server_wide_modules = web
workers = 5

Odoo HTTP Workers node 2:
max_cron_threads = 0
server_wide_modules = web
workers = 5

Odoo JOB Runner and Workers:
max_cron_threads = 1
server_wide_modules = web,queue_job
workers = 5
[queue_job]
channels = root:5

In this setup, where you put the "cron threads" (max_cron_threads) doesn't matter a lot I guess, it could be in any node or a new one.
All the jobs will the processed by the 5 workers of the "Odoo JOB" node. Users have 10 dedicated workers.
BTW, a nice side-effect of this setup is that you can restart the "Odoo JOB" node (e.g. for a configuration change) without impact on users.

Now, if you were to reach the limits of the host where you run "Odoo JOB Runner", you could use this load balancer pattern:

load-balancer-1, exposes [Odoo HTTP Workers node 1, Odoo HTTP Workers node 2] to users.

Odoo HTTP Workers node 1:
max_cron_threads = 0
server_wide_modules = web
workers = 5

Odoo HTTP Workers node 2:
max_cron_threads = 0
server_wide_modules = web
workers = 5

load-balancer-2, exposes [Odoo Job Workers node 1, Odoo Job Workers node 2] to users.

Odoo Job Workers node 1:
max_cron_threads = 0
server_wide_modules = web
workers = 10

Odoo Job Workers node 2:
max_cron_threads = 0
server_wide_modules = web
workers = 10

Odoo JOB Runner:
max_cron_threads = 1
server_wide_modules = web,queue_job
workers = 1
[queue_job]
channels = root:10
scheme = https
host = load-balancer-2
port = 443

So to say, this is *possible* but I wouldn't recommend to start with such an elaborate setup until you really need it, and you may never need it at all (we never needed more than one node of workers to process jobs).



On Wed, Jul 10, 2019 at 9:42 PM Maxime Chambreuil <mchambreuil@opensourceintegrators.com> wrote:
I am not sure to get it.

If I have the following configuration:

load-balancer:
1 zone with Odoo HTTP Node 1 and 2

Odoo HTTP node 1:
max_cron_threads = 0
server_wide_modules = web
workers = 5

Odoo HTTP node 2:
max_cron_threads = 0
server_wide_modules = web
workers = 5

Odoo JOB:
max_cron_threads = 1
server_wide_modules = web,queue_job
workers = 5
[queue_job]
channels = root:5
scheme = https
host = load-balancer
port = 443

am I getting it right?

MAXIME CHAMBREUIL
PROJECT MANAGER/CONSULTANT
O: 1.855.877.2377 EXT. 710
M: 602.427.5632
E: MChambreuil@OpenSourcelntegrators.com
P.O. BOX 940, HIGLEY, AZ 85236



On Tue, Jul 2, 2019 at 6:27 AM Guewen Baconnier <guewen.baconnier@camptocamp.com> wrote:
Hello,

Usually we have one or several nodes for HTTP workers (exposed by a load balancer to users) and cron workers, and a different node for the jobrunner and its worker.
The workers of the jobrunner node are not exposed to users and are used for the jobs only. Typically, the number of workers in this node will be equal to the capacity we configure in the job channels root (root:8 means 8 workers).

By design, you cannot have more than one jobrunner. However, the jobrunner can use the workers of many nodes if you want so, by configuring ODOO_QUEUE_JOB_HOST on a load balancer doing the dispatch to the nodes [0]. We never needed to do this to be honest.

Have a nice day,
Guewen


On Sat, Jun 29, 2019 at 4:12 PM Maxime Chambreuil <mchambreuil@opensourceintegrators.com> wrote:
Hello,

I am running an Odoo 12 environment with multiple Odoo servers and the connector.

What do you suggest in terms of job runner configuration?
Do you allow all the nodes to have job runners? Does this create concurrent update issues?
Or do you configure the job runner on one node? How do you configure this node and the others?

Thank you. Have a great week-end.

MAXIME CHAMBREUIL
PROJECT MANAGER/CONSULTANT
O: 1.855.877.2377 EXT. 710
M: 602.427.5632
E: MChambreuil@OpenSourcelntegrators.com
P.O. BOX 940, HIGLEY, AZ 85236

_______________________________________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference