Forum Discussion
Karthik_67647
Nimbostratus
Feb 23, 2011Can a F5 load balance JDBC queries !!!
Can a F5 load balance JDBC queries !!!
For example, can it view the query string and send all such queries to the same server? This will allow the queries to...
samstep
Cirrocumulus
Feb 28, 2011Theoretically yes, F5 can load balance based on a SQL query provided you can write an iRule which can identify that query in the TCP payload.
You would then hash the SQL query and persist on that hash.
Bear in mind that some databases use encrypted communication so you won't be able to see the SQL query in the intercepted TCP stream for databases which use encryption (MS SQL Server 2005 for example). If your database connection is unencrypted (for example mySQL is plain text by default) then you should be able to write in iRule for SQL-query-based persistence.
I doubt you will be able to find a universal iRule which does the job for you, but if you have the skills you can program one yourself for your database based upon the database protocol (*not JDBC* which is an API, not a protocol) , but MS SQL, MySQL, Oracle etc...
A sample iRule on how to persist on a string found inside a TCP stream would be the one for FIX protocol persistence:
http://devcentral.f5.com/wiki/default.aspx/iRules/FixSelectPoolBasedOnSenderCompID.html
---
Sam
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects