We have a website whose database is on a separate machine. Both the application server and the database server are relatively underused, but the network link between them is the bottleneck. The MySQL server itself performs plenty of caching, but queries must still cross the network and back. If the site was slashdotted, that connection is where the limit would be hit.

Is there any (safe) way of using the MySQL client on the application server to cache data, saving on round trips across the network?

(for the purposes of this question it doesn't matter what software the web server is running. yes it has caching mechanisms of its own, but they're separate from the database cache)

link|improve this question

43% accept rate
feedback

1 Answer

This is where something like Memcached comes into play. It's not overly complex to get running, but it's not going to be a drop-in solution for you either.

To explicitly answer your question, no I know of no way to get the mysql client libraries to cache query results.

link|improve this answer
Like I said, there are always other caching mechanisms further up the application. I was specifically asking if MySQL could be cached in the client. – Marcus Downing Oct 5 '11 at 14:03
@MarcusDowning - I edited my answer to explicitly answer your question. – ErikA Oct 5 '11 at 15:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.