Poor Man's Load Balancing
I have a mysql database with several tables. I have an input that makes ajax call开发者_开发技巧s 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.
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.
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.
精彩评论