PHPackages                             t4g/ha-proxy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. t4g/ha-proxy

ActiveLibrary[Database &amp; ORM](/categories/database)

t4g/ha-proxy
============

Basic HAProxy Split R/W implementation for PDO

1.2.4(11y ago)2142MITPHPPHP &gt;=5.3.0

Since Aug 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/t4g/HAProxy)[ Packagist](https://packagist.org/packages/t4g/ha-proxy)[ RSS](/packages/t4g-ha-proxy/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

HAProxy
=======

[](#haproxy)

\##Introduction

This project exposes the following **namespaces** for use in your custom use:

- CSI\\Drivers\\PDO\\HAProxy

### EXAMPLE

[](#example)

---

#### For Vanilla FW

[](#for-vanilla-fw)

```
	use CSI\Drivers\PDO

	$proxy = new HAProxy();
	$proxy->CreatMaster('mysql:host=MASTER_DB_HOST;dbname=MASTER_DB_NAME','MASTER_DB_USER','MASTER_DB_PASSWORD');
	$proxy->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');

	// Framework::setup($proxy);

```

#### For PDO override

[](#for-pdo-override)

```
	use CSI\Drivers\PDO\HAProxy as PDO;

```

or:

```
	if ($dsn instanceof PDO || $dsn instanceof HAProxy) {

	This line happens twice on current RedBean v3.0.1, on lines 29 and 1937 on rb.php file. Repalce both.

```

or:

```
	$SOME_PDO  ...

	$SOME_PDO = new HAProxy($SOME_PDO);
	$SOME_PDO->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');

	\PDO $SOME_PDO  ...

```

Limitations
-----------

[](#limitations)

HAProxy supports the simplest MySQL Replication setup, where you have a Master, and a readonly.

Contributors &amp; Authors
--------------------------

[](#contributors--authors)

@t4g @mauricoder

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4337d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4502c512743ce3b8da304098a0d89f7048b384912537e6b48e867b6712d5d1e?d=identicon)[t4g](/maintainers/t4g)

---

Top Contributors

[![t4g](https://avatars.githubusercontent.com/u/1277253?v=4)](https://github.com/t4g "t4g (5 commits)")

### Embed Badge

![Health badge](/badges/t4g-ha-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/t4g-ha-proxy/health.svg)](https://phpackages.com/packages/t4g-ha-proxy)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
