Resources

Harnessing the Power and Amazing Benefits of Routing Odoo Users to the Nearest Server

Harnessing the Power and Amazing Benefits of Routing Odoo Users to the Nearest Server

Odoo cannot simply be served from the nearest server, because the application and its PostgreSQL database need to sit close to each other. Moving users to a closer copy of the app helps only if the data they work on goes with it. For most companies the answer is one well-chosen region, plus a CDN.

Latency and where the database sits

A single page in Odoo can trigger several database queries. By default Odoo connects to a PostgreSQL server on the same machine, over a local socket, and its documentation lists SSH tunnels and SSL network connections as the options for a remote one. If the app server is in Frankfurt and the database is in Singapore, every one of those queries pays the full distance.

So “nearest server” is the wrong question for ERP.

The better one is where the app and database pair should live so that most people wait the least, and that answer changes when a new office opens in another country, which is easy to forget until complaints start arriving.

Hosting layouts

Start with one region. Count users by country, pick the region closest to the biggest group, and keep app and database in the same data center. It is the cheapest layout to run, and the people far away will notice it.

Three Odoo hosting layouts compared: one region, CDN in front, and one instance per region

Add a CDN next. Odoo’s scripts, styles and images are static, so an edge node close to the user can serve them while the dynamic requests still go to the home region.

That trims load time without touching the data layout. It does nothing for slow queries.

If users in another continent still struggle, the next step is a separate instance with its own database in that region, usually per subsidiary or per legal entity. Local staff get a fast system. The price is that the two databases are not one shared record, so consolidated reporting, inventory across sites and intercompany flows need an explicit integration. Spreading one live database across continents is a much harder engineering job than the marketing around “geographic load balancing” suggests.

Data residency is the strongest reason to split. If a law or contract says customer data must stay in the EU, hosting it in the EU is a requirement and not a speed tweak. Cloudpepper, a hosting and management platform for Odoo, says on its site that it offers EU data residency and global hosting regions, and that it runs on providers such as AWS, Google Cloud, Hetzner and Microsoft Azure. Its homepage does not describe any automatic routing of users to the nearest server, so confirm with the vendor what you would actually get. The same goes for its stated 99.9% uptime guarantee and hourly backups, which are vendor claims.

Keeping data near its users can also lower legal and operational risk, but ask a lawyer about the actual rules in each country.

More on the cloud side is in cloud ERP solutions.

Measure before you split anything

Time a few typical actions (opening a sales order, running a report) from the offices that complain. If the problem is a slow query or too few workers, a closer server will not fix it. If it is plain distance, one region closer will.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.