Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

share|improve this question
up vote 2 down vote accepted

No. There is no standalone MySQL cache (yet).

Since your web server is underused, you can install a database on the web server run database replication.

You will need to modify your application to do reads and writes from different server or you could try alpha release of mysql proxy

share|improve this answer
Interesting possibility. The need has passed since I asked the question a year ago, but I'll remember it for the future. – Marcus Downing Jun 7 '12 at 8:11

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.

share|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. – EEAA Oct 5 '11 at 15:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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