|
1 | 1 | # TQDBProxy |
2 | 2 |
|
3 | | -### A High-Performance Database Proxy with Caching |
| 3 | +### High-Performance Proxy for MariaDB and PostgreSQL |
4 | 4 |
|
5 | 5 | --- |
6 | 6 |
|
7 | 7 | ## What is TQDBProxy? |
8 | 8 |
|
9 | | -A unified data layer between applications and databases |
10 | | - |
11 | | -- **Transparent proxy** for MariaDB and PostgreSQL |
12 | | -- **Query caching** with configurable TTL |
13 | | -- **Thundering herd protection** |
14 | | -- **Read replica routing** |
15 | | -- **Full transaction support** |
16 | | -- **Prometheus metrics** |
17 | | - |
18 | | ---- |
19 | | - |
20 | | -## Key Features |
21 | | - |
22 | | -| Feature | Description | |
23 | | -|---------|-------------| |
24 | | -| Query Caching | Cache SELECT queries with per-query TTL | |
25 | | -| Caller Metadata | Track queries by source file and line | |
26 | | -| Metrics | Prometheus-compatible monitoring | |
27 | | -| Read Replicas | Automatic query routing to replicas | |
28 | | -| Transactions | Full BEGIN/COMMIT/ROLLBACK support | |
29 | | -| Interactive Mode | Full CLI client support | |
| 9 | +- Transparent proxy for **MariaDB** and **PostgreSQL** |
| 10 | +- Caches results for **Time To Live** seconds |
| 11 | +- Provides **single-flight** for cold and warm cache |
| 12 | +- Routes cacheable queries to **read replicas** |
| 13 | +- Metrics with query **source file + line number** |
30 | 14 |
|
31 | 15 | --- |
32 | 16 |
|
@@ -78,8 +62,8 @@ SELECT * FROM users WHERE active = 1 |
78 | 62 | ``` |
79 | 63 |
|
80 | 64 | - `ttl`: Cache duration in seconds |
81 | | -- `file`: Source file for observability |
82 | | -- `line`: Line number for debugging |
| 65 | +- `file`: Source file of the query |
| 66 | +- `line`: Line number of the query |
83 | 67 |
|
84 | 68 | --- |
85 | 69 |
|
@@ -110,7 +94,7 @@ replica2 = 127.0.0.3:3306 |
110 | 94 | ``` |
111 | 95 |
|
112 | 96 | - SELECT with `ttl > 0` → Round-robin across replicas |
113 | | -- Writes → Always to primary |
| 97 | +- Writes, DDL, Transactions → Always to primary |
114 | 98 | - Automatic failover if replicas unavailable |
115 | 99 |
|
116 | 100 | --- |
|
0 commit comments