The days of struggling with vertical scaling limitations in Odoo databases are numbered! Odoo V 18 introduces a game-changer: horizontal scaling using readonly replicas. 🚀
As your Odoo database grows, it becomes painfully clear that simply throwing more muscle at a single machine (vertical scaling) is unsustainable. Even those beefy monsters have their limits. But fret not, there’s a better way!
The magic lies in routing some SQL queries away from the primary server, spreading the load across multiple machines. Picture this: the hero primary server handles all your write operations (updates, inserts, and deletes), while a team of trusty secondary servers tackle the lighter read work (selects).
It’s not magic, but it’s close! Thanks to the new --db_replica_host
and --db_replica_port
options, you can easily configure a second pool of connections on a replicated server. This server, often managed by pgbouncer, directs read requests to the actual secondary Postgres servers. 🔆
And the best part? Odoo 18 now understands this setup! Both sql_db.db_connect
and registry.cursor()
have an optional argument to let you choose your database connection: the primary read/write hero (default) or one of the helpful secondary readers.
This is a giant leap for Odoo. Horizontal scaling opens doors to handling massive databases with ease, improved performance, and increased resilience. Your Odoo system will no longer be a single point of failure, and you can scale it to meet your growing needs without breaking the bank on hardware upgrades.
Here is the link for the sneak peek commit :
https://github.com/odoo/odoo/pull/112000
#odoo #V18 #sneakpeek #scaling_odoo
Zesty Beanz | » Odoo18 Sneak Peak : Enhanced URL Readability and Optimized Printing: […] Odoo 18 will revolutionize your business experience!By the way have you read our previous blog on Scaling Odoo : Say Goodbye to Vertical Limits with Readonly Replicas | V18 EE Sneak Peek#Odoo18 #SneakPeek #ImprovedNavigation […]".
Leave a Reply