[DeleGate-En] conditional mount on arbitrary protocol
-----BEGIN PGP SIGNED MESSAGE-----
I played today with delegate trying to figure if I can use it to route some
PostgreSQL clients based on their database connection. meaning:
client want to connect to database "db1" -> connect to server1
client want to connect to database "db2" -> connect to server2
The tcprelay "protocol" works great for basic TCP relay. I can even route
clients between servers based on some basic TCP/IPfields thanks to SERVER +
However, I still cannot route based on the application layer content. I read in
the manual tcprelay cannot use the MOUNT option and it seems to me FCI script
can't helps here.
I might have some time to try to produce a patch but I'm not sure where to
start. I need to be able to test that a given pattern match the data in the
Is it possible to have a special MOUNT for tcprelay to be able to do that ? like:
./delegated -P9999 SERVER=tcprelay \
MOUNT="* tcprelay://destination1:port match=*some-regex-or-glob*"
MOUNT="* tcprelay://destination2:port match=*another-regex-or-glob*"
Is it possible ? How hard would it be and where should I start ?
If not possible, maybe I could try to add a basic support for pgsql protocol ?
Any pointers/advices as well ?
Thank you in advance !
PS: actually pgBouncer is able to do that, but it is too much tied to the latest
PS2: yeah, I keep turning to my favorite swiss-army-proxy first when I have
weird things to do, but changing my domain email each time ;)
Jehan-Guillaume (ioguix) de Rorthais
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----