Skip to Content
Menu
This question has been flagged
1 Reply
2773 Views

I need to know the best recommended free load balancer for Odoo8 and if possible some tutorials for how to use it, Thank you in advance. Need your Opinions ;

Avatar
Discard
Best Answer

You could use nginx as a load balancer and reverse proxy, just need to define more that one server line in the upstream config, Like:

upstream solteinserver {
server {server1_ip}:{instance_port} weight=1 fail_timeout=300s;
server {server2_ip}:{instance_port} weight=1 fail_timeout=300s;
}

server {
listen {server_port};
server_name {server_name};

client_max_body_size 2500m;
access_log /var/log/nginx/instance_access.log;
error_log /var/log/nginx/instance_error.log;

proxy_buffers 16 64k;
proxy_buffer_size 128k;

location / {
proxy_pass http://solteinserver$request_uri;

proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;

proxy_read_timeout 300000;
}
location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://solteinserver;
}
}

Also you will need to share sessions and if you store attachments in the filesystem you will need to change it or share too. Read more about what you need at:

https://www.odoo.com/es_ES/forum/help-1/question/openerp-in-a-high-availability-cloud-environment-2447#answer-59679

Avatar
Discard
Author

Thank you :)