Package release

ocyan-plugin-high-availability

mandel/stable ยท Version 0.1.1

Primary/replica database router for Ocyan

Metadata

author MandelBlog
classifiers
  • Framework :: Django
  • Environment :: Plugins
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
description_content_type text/markdown
license_expression LicenseRef-Proprietary
requires_dist
  • ocyan.core
  • Django>=4.2
requires_python <3.14,>=3.12

Release files

FileTest resultsHistory
ocyan_plugin_high_availability-0.1.1-py3-none-any.whl
Size
4 KB
Type
Python Wheel
Python
3
  • Uploaded to mandel/stable by Mandel-publish 2026-08-12 12:24:02
ocyan_plugin_high_availability-0.1.1.tar.gz
Size
4 KB
Type
Source
  • Uploaded to mandel/stable by Mandel-publish 2026-08-12 12:24:03

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.

  1. default must be the writable primary database.

    DATABASES["default"]["HOST"] = "192.168.1.3"

  2. Define a separate read database 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.