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.
store cached file on s3. of site run s3. in case of user action, cache updated.
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
Post a Comment