@Shankar wrote:
Hi ,
I had posted this question earlier but got no reply
My requirement is to connect using jdbc to a server cluster. ( connection String :
jdbc:teiid:OpenWorksCommonModel_OpenworksDemo@mm://34.36.74.77:31000;version=5000106)On haproxy machine all jdbc requests should listen on one port say 31000, but based on a substring in the connection string , haproxy should route the requests to different backend .
I have read the answer for a earlier question where it was mentioned that acl could be written with frontend on http and backend on tcp. This did not work . Please find below a list of configurations i tried . Adding a mode tcp to the backend gave me an error while restarting haproxy. My intend is to see if there exists a word “OpenWorks” in the jdbc connection string and if so route it to a specific backend.
1st Configuration
frontend TEIID_PROXY
bind *:31000
mode httpacl openworks_teiid_backend path_sub OpenWorks
use_backend openworks_backend1 if openworks_teiid_backendbackend openworks_backend1
#mode tcp
balance source
server db_jdbc01 34.36.74.147:31000 checkI also tried a random configuration
listen DSIS_JDBC :31001
mode httpacl openworks_teiid_backend path_sub OpenWorks
use_backend openworks_backend if openworks_teiid_backendbackend openworks_backend
balance source
server db_jdbc01 34.36.74.147:31000 checkFirst configuration with mode tcp in the backend does not allow me to even start haproxy. Could you please help.
Posts: 1
Participants: 1