Adding comments to my site

Status
Not open for further replies.

randomlande

i like tits
Jun 26, 2006
655
3
0
I want to add comment functionality to my humor site but I'm worried about it raping my mysql database. I already automatically cache all my pages every 10 minutes but if I add comments too (that would probably be updated fairly often) wouldn't that just add unnecessary mysql connections. Fuck... I don't know, my mind's all over the place.

Anyone have any advice on how to reduce the load on the database? I'd probably use this comment script: PHP Comment Script - GentleSource.com
 


If you get enough traffic that you're worried about too many mysql connections you should probably consider rolling your own system(Or upgrading your setup).

If you really really wanted to avoid the connections though for each comment buffer them. Have you comment script write them to a csv file then have a cronjob running every minute or two that reads that file and updates the comments to the database in one batch job.
 
  • Like
Reactions: randomlande
I don't really know much about cronjobs, but I think i might have to learn. I was thinkin about using a file anyway. thanks.
 
Status
Not open for further replies.