@sysnee/pgs 0.1.6 → 0.1.7-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -188
- package/docker-compose.yml +9 -6
- package/docs/ARCHITECTURE_RECOMMENDATIONS.md +11 -9
- package/docs/CRITICAL_REVIEW.md +10 -8
- package/docs/EXECUTIVE_SUMMARY.md +9 -9
- package/docs/PROJECT.md +130 -77
- package/manager.js +192 -97
- package/package.json +2 -2
- package/traefik.yml +15 -0
- package/haproxy-lua/pg-route.lua +0 -177
- package/haproxy.cfg +0 -35
package/haproxy.cfg
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
global
|
|
2
|
-
log stdout format raw local0 info
|
|
3
|
-
maxconn 4096
|
|
4
|
-
lua-load /etc/haproxy/lua/pg-route.lua
|
|
5
|
-
|
|
6
|
-
defaults
|
|
7
|
-
log global
|
|
8
|
-
mode tcp
|
|
9
|
-
option tcplog
|
|
10
|
-
timeout connect 5s
|
|
11
|
-
timeout client 30s
|
|
12
|
-
timeout server 30s
|
|
13
|
-
retries 3
|
|
14
|
-
|
|
15
|
-
frontend postgres_frontend
|
|
16
|
-
bind *:5432
|
|
17
|
-
mode tcp
|
|
18
|
-
|
|
19
|
-
# Use Lua script to parse PostgreSQL startup packet and route by username
|
|
20
|
-
tcp-request inspect-delay 5s
|
|
21
|
-
tcp-request content lua.pg_route
|
|
22
|
-
tcp-request content reject if { var(txn.pg_blocked) -m bool }
|
|
23
|
-
|
|
24
|
-
# Route to backend based on username extracted by Lua
|
|
25
|
-
use_backend %[var(txn.pg_backend)] if { var(txn.pg_backend) -m found }
|
|
26
|
-
|
|
27
|
-
# Default backend for unknown connections
|
|
28
|
-
default_backend pg_reject
|
|
29
|
-
|
|
30
|
-
backend pg_reject
|
|
31
|
-
mode tcp
|
|
32
|
-
timeout server 1s
|
|
33
|
-
|
|
34
|
-
backend pg_ssl_pool
|
|
35
|
-
mode tcp
|