Re: [Sqlrelay-discussion] 'Persistent' Connections to SQLRelay from PHP
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2009-05-28 21:50:31
|
Welby, There's no plan currently to provide persistent connections between the client and SQL Relay. You could chain them using the query routing feature, but I believe that the local SQL Relay server will disconnect from the remote SQL Relay server each time a local client disconnects from it. I believe that the only thing you could do to get better performance than using PHP's persistent connections would be to run an instance of SQL Relay on each web server and use the local socket option. Your current setup should give you substantially better performance than connecting and disconnecting directly to/from Oracle, but not better performance than PHP's persistent connections. The tradeoff is that PHP's persistent connections could cause more connections to be opened to the DB than SQL Relay would, which could ultimately be a problem. I'm surprised at the 700 vs 150ms though, I wouldn't expect it to be that much slower. How much of that time does the DB say is spent running the query? Also, did you try the other tuning strategies described in: http://sqlrelay.sourceforge.net/sqlrelay/tuning.html ? If your requests are small, then using dontGetColumnInfo() would likely help a lot, but might require code changes. Also, make sure you're using file descriptor passing. Other than that, I'm not sure that much else could be done. I'll have to do some tests here and see if I get the same results. David Muse dav...@fi... On Thu, 2009-05-28 at 17:49 +0100, Welby McRoberts wrote: > Hello > > We are currently in the process of deploying SQLRelay across our > Authentication & Authorization estate and have unfortunately come into > a slight show stopper. Due to the way that our Auth tier is written we > deal with multiple small requests which is meaning a new connection > tear up and tear down for each request. As SQLRelay isn't running on > each of the web servers in the Auth Tier we've not been able to use > the local socket and have noticed that our average time for a standard > auth call (averaging at 5 requests) is taking upwards of 700mS. The > same using Oracle with a persistent DB connection is taking around 150 > mS. > Obviously we're quite anxious of this and would like to know if there > are any plans to implement persistent connections in the SQLRelay PHP > extension or if it is possible to 'chain' SQLRelay servers to each > other (ie SQLRelay running on a web server connecting to our dedicated > SQLRelay hosts which in turn connect to Oracle? > > Thanks > Welby > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > __________________________________________________ > D O T E A S Y - "Join the web hosting revolution!" > http://www.doteasy.com __________________________________________________ D O T E A S Y - "Join the web hosting revolution!" http://www.doteasy.com |