Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Odoo load balancing

by
Magnus, Willem Hulshof
- 31/03/2021 20:54:12
HAProxy?

Verstuurd vanaf mijn iPhone

Op 31 mrt. 2021 om 12:27 heeft Tom Blauwendraat <tom@sunflowerweb.nl> het volgende geschreven:



Hi community,

I'm looking for advice and experience regarding the topic of load balancing.

There are two unrelated cases in which I would like to use it:

1. Balancing over a pool of servers running Odoo

We have a client with a horizontal setup with a pool of 4 servers running Odoo. Requests are now routed to the servers by means of round-robin, but that's not very smart - I'd rather pass the load to the server that I know has enough free workers, and perhaps memory/CPU/IO available to take on a new task. I've looked around and the only thing I've found so far is the UWSGI FastRouter: https://uwsgi-docs.readthedocs.io/en/latest/Fastrouter.html. Does someone have other suggestions?

2. Smart balancing over worker pools on one server

For a responsive Odoo you want to have many Odoo workers, but you don't want to run out of memory. This is a tradeoff. If you configure too few workers, your memory will sit idle, but if you configure many workers, you run the risk that occasional high memory requests (a heavy computation, a heavy report) come in and if by unlucky chance it's several at a time, your server can overload. Is there a load balancer or WSGI application server that can keep a track record of which requests generally take the most memory, and then throttle these requests to a limited "heavy pool" of Odoo workers that serve high-memory requests, whereas the "happy pool" will have many workers and process the trustworthy requests with much better responsiveness?

Sorry if this is not the right place to ask - I will be happy about any pointers.

-Tom

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

Reference