views:

74

answers:

2

I have a mysql database with several tables. I have an input that makes ajax calls for every character. Is there a way to load balance by distributing to other domains etc?

Estimated statistics: ~1000-2000 hits a day. Average site time per user ~30-60 secs.

+1  A: 

I think you'd be better off making the AJAX form set a timeout whenever a character is input so that let's say 300ms after the last character the AJAX request is made. I've done something similar to your solution in a Java SWING application and the load on the server to make a simple query was stupendous. As far as load balancing MySQL all I know is that you'll either have to give up on consistency or you'll have to deal with degraded write performance.

Novikov
I also wanted to add that if this data is commonly shared between users (for example cities on a classifieds site), maybe you'll be better off caching the XML/JSON that you send to the browser.
Novikov
A: 

I've heard good things about Perlbal for load balancing, and it's free making it a good candidate for the poor.

It's source is hosted on Google Code.

Peter Ajtai
Thank you, I'll take a look at it.
John Franklin