Package release
ocyan-plugin-high-availability
mandel/stable ยท Version 0.1.1
Primary/replica database router for Ocyan
Metadata
| author | MandelBlog |
|---|---|
| classifiers |
|
| description_content_type | text/markdown |
| license_expression | LicenseRef-Proprietary |
| metadata_version | 2.4 |
| requires_dist |
|
| requires_python | <3.14,>=3.12 |
Release files
| File | Test results | History |
|---|---|---|
ocyan_plugin_high_availability-0.1.1-py3-none-any.whl
|
|
|
ocyan_plugin_high_availability-0.1.1.tar.gz
|
|
Ocyan plugin High availability
Installation
Add ocyan.plugin.high_availability to your projects dependencies.
About & Usage of High availability
Make oscar and wagtail work in a high availability setup with a master and slave database
This router implements a primary/replica pattern: writes and reads inside an
atomic transaction stay on default; ordinary reads use read when configured;
sessions keep Django's default route; migrations are explicitly blocked on the
replica. It does not provision, replicate, monitor, or fail over databases.
If you enable a two-database primary/replica configuration, the consumer must provide independent, read-only replica credentials and infrastructure. Do not copy a mutable database configuration object or use this feature until replica lag and failover behavior have been assessed for the application.
-
defaultmust be the writable primary database.DATABASES["default"]["HOST"] = "192.168.1.3"
-
Define a separate
readdatabase configuration for the read-only replica, for example:DATABASES["read"] = {**DATABASES["default"], "HOST": "replica.internal"}
Run migrations only against default. Usually this is appropriate only after a
production primary/replica operational review.