Having several large ecommerce projects, we have experienced some technical challenges to scale Odoo. Some of our customers have big ambitions but also demand us to find cost effective solutions that can support their constant growth.
More sales imply bigger server loads and require growing computing capacity, horizontal scalability and highly skilled professionals to manage their infrastructure. Suddenly our clients are changing their business model towards an IT company, hiring, coordinating and creating a career path for these new employees. It’s a huge change and business focus can be affected.
This is why we need different approaches so that we can help our clients grow in a progressive and financially stable manner. Headless eCommerce is not a new concept but it’s not accessible to all companies because it requires creating different teams so that the end result is competitive.
This is where Vue Storefront - Odoo Connector stands out. It allows your business to transition from the monolith to the Headless paradigm in a seamless way.
Why Vue Storefront - Odoo Connector?
A main problem it solves is scaling the website separately from Odoo. Your company can have a handful of users but you might need to serve millions of web clients. Serving all these users under Odoo can be technically challenging and expensive. For one thing, a regular Odoo user has an average server load bigger than the average ecommerce user.
In this article we decided to compare the difference using the same machine spec, optimized for Odoo and optimized for Nuxt.js. Also, you can deploy Nuxt.js with zero downtime and deploy Odoo mostly without affecting the webshop.
Deploying Nuxt.js can be done on:
- A single machine
- An autoscaling group
- Any cloud infrastructure like Vercel, Netfly, Cloudflare, Google, AWS, etc
For this test we selected a local gigabit network and an AMD Ryzen 7 2700 Eight-Core Processor with 2 threads per core and 32 GB RAM.
We ran several tests and decided we should find a limit where both Odoo or Vue Storefront were serving without major errors and similar response quality.
When using Vue Storefront we just connected to another Odoo machine (8 core 16GB laptop). This is really not so relevant because as soon as Vue Storefront loads the cache, Odoo just stops being used because our test only targets 5 similar pages:
- Home page
- 2 product pages
- 2 category pages
We used Locust installed on a different machine sitting on the same Gigabit LAN. Even before we started testing Odoo and Vue Storefront we tried with a simple static NGINX page and did the best possible test to ~980 RPS (Request Per Second).
Since the load of the server was not substantial we think the bottleneck is really the LAN or the NICs.
The Odoo Setup
- We had 16 core and 32GB
- The test started with 33 workers but we tested with 15 and 40 to be sure that the default setting would be the best.
- We also set up the new X-Accel in Odoo 16.0 with NGINX and tested to be sure it was working properly.
Note: This new feature makes a big difference for Odoo since some assets are just bypassing from NGINX to the disk. It makes Odoo available to serve a bigger load.
Here are the results:
As you can see, Odoo was able to serve up to ~260 RPS and we stretched things to a stable 95 percentile of 250 ms response times.
This shows that all our cores/threads were pretty busy with almost 100% load average in the last 5 minutes (test duration).
Used RAM: 4.52GB
The Vue Storefront Setup
What Exactly is Vue Storefront?
Vue Storefront is a Nuxt.js application behind NGINX that uses the Redis server on the same machine.
Test Setup and Results
During our test, we tried with a Redis server on another local machine and there was no difference at all. We used PM2 process manager in cluster mode with the recommended default 15 workers.
The results are displayed below:
You can see Vue Storefront was able to serve the same pages up to ~600 RPS and we stretched things to a stable 95 percentile of 30 ms response times (better than what was possible with Odoo).
Load average was much lower on Vue Storefront server because the server doesn’t seem to consume as much resources. The load average for the last 5 minutes is 44%.
RAM Usage shows 2.89GB.Discover More: Vue Storefront Case Study
Odoo vs Vue Storefront Comparison
Side by side comparison (Odoo on left, Vue Storefront on the right) on the same machine:Watch Odoo Connector/ Vue Storefront Live Demo
Watch a video explaining Odoo Website Performance with Vue Storefront:
Odoo is a great eCommerce platform and version 16.0 is an important milestone for the webshop performance. It adds cache to the Qweb templates and also offers the X-Accel feature for the reverse proxy (NGINX or Apache).
Still, when your eCommerce operation grows you need another type of infrastructure.
Luckily, with Vue Storefront you can still use Odoo without the need of doing data synchronization between 2 different systems. You can continue with multi website, multi currency, multi language, price lists and most of the features Odoo has out of the box.
Vue Storefront allows you to build your eCommerce with front-end developers that don’t need to know Odoo. Furthermore, you can serve many more requests with less Infrastructure using all the features Nuxt.js brings to the table.
It’s production ready and we already have happy customers working with Odoo + Vue Storefront, seeing great results on a daily basis!
If you want to discover how it can benefit you, talk to our team.