Community mailing list archives
Re: CDN for version 9by Olivier Dony <firstname.lastname@example.org> - 09/17/2015 18:25:27
On 09/16/2015 11:23 AM, Hans Yonathan wrote: > Hi Odoo, > > When I am testing version 9, I found in website admin, right now we have > configuration of CDN. > > Thanks for this feature! =D > > I have question, which is: > > When we make this configuration, is it only affect the website or affect all > our ERP? By default it will only work for "website-enabled" requests, that is; for the website part mainly - and only for unauthenticated sessions. It's fairly simple to extend in a module by changing the logic of the get_cdn_url() method, though. However, the benefits of a CDN are mostly meant for new website visitors (less workload and less bandwidth consumed for the origin servers). Authenticated users and backend users are returning users that have most of the resources in the browser cache already (CSS/JS bundles and images, typically), so a CDN doesn't help. For them, leveraging browser caching is more important than using a CDN. BTW many CDNs offer a deployment mode where the CDN directly serves the main domain and proxies uncached requests to the origin server. In that mode there is nothing to configure in Odoo itself and everything that can be cached by the CDN should be, even in the backend. The downside is that all uncacheable requests (all the JSON-RPC requests of the backend, for example) always have to transit via the CDN, making them slightly slower.