What would be an ideal caching system for a PHP Heroku App? -


i working improve server time php app on heroku. noticed when cache php file html file, service times go down 2500+ms around 20ms.

now, here couple of problems @ hand...

1) cached html page need change after user actions. deluge of such actions drown server. actions can come in deluge, or there no action hours.

2) app typically run on multiple dyno's on heroku, each own ephemeral file system. each dyno can potentially have own version of cached file, , cached file disappear automatically after 24 hours, or every time push new code server.

i new world of web programming, , thinking of solving above in following way. there better ways ? tools ? plugins ? frameworks ? please suggest. have work on heroku though.

  1. store cached file on s3. of site run s3. in case of user action, cache updated.

  2. instead of updating cache directly, schedule update happen after 30s. file name of cachedpage.html.scheduled placed on s3 time period. requests come during time period invalidated.

i assuming redirect s3 cheaper db queries. can there problem s3 when traffic becomes heavy ?

looking forward feedback.

thanks manish


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -