Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.