Odoo Help

4

3
1 Answer
5
Avatar

Luke Branch Hong Kong

--Luke Branch--
1614
| 7 8 8
Wanchai, Hong Kong
--Luke Branch--

...

Luke Branch Hong Kong
7/2/14, 5:31 AM

Further to this thread I have installed Varnish in it's default configuration as follows:

1) sudo apt-get install varnish
2) sudo pico -w /etc/varnish/default and replace the contents of backend default { } with the following lines:

backend default {
    .host = "127.0.0.1";
    .port = "8069";
}

3) sudo pico -w /etc/default/varnish  and replace the following:

DAEMON_OPTS="-a :6081 \
              -T localhost:6082 \
            -b localhost:8080 \
            -u varnish -g varnish \
            -S /etc/varnish/secret \
            -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"

with this:

DAEMON_OPTS="-a :80 \
              -T localhost:6082 \
            -b localhost:8080 \
            -u varnish -g varnish \
            -S /etc/varnish/secret \
​            -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"

which will have varnish serving content on port 80 by default.

4) sudo ufw allow 80

I've done an extremely basic page speed test on webpagetest.org and found the speed between content served on port 80 (ie. varnish port) and content served on port 8069 (ie. Odoo port) and found the page load time to be around 16.5-18% faster when being passed through varnish for first time page load and between 18-18.5% faster when on the second (cached) page load.

Once I have put together a working optimised VCL for Odoo I will post back here again with the results.

2 Comments
DevBranch Company Limited, Luke Branch Hong Kong
8/11/14, 1:36 AM

Further to this, i've just come across this python module: https://github.com/justquick/python-varnish I will try to integrate this with the varnish setup to allow for purging from within Odoo for better varnish cache management. If anyone has any suggestions please comment below.

Anders Wallenquist Sweden
9/1/14, 2:47 AM

I have also done some basic tests with Varnish 4, without any luck. Varnish are 5 % slower than direct Odoo.

Ask a Question
Writer
Keep Informed
8 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now