I am running a symfony application on 4 heroku dynos and I want to use apc_cache.
- How do I make sure that the apc_cache is cleared on all dynos during deployment?
I found a trick online for clearing apc_cache during deployment that entails making a request to a (temporarily) publically available php file that clears the apc_cache. I do not understand how this would work reliably with multiple dynos, since any single request is always routed to only one of the dynos. Is this an issue at all, since my server monitoring tools indicate that the application is temporarily scaled down to one dyno during deployment, to be scaled back up when deployment is complete.
Maybe the following question should be a question on its own, but I am planning to migrate the application to Amazon EC2 in the near future and deploy automatically using Codeship, Docker and AWS Elastic Beanstalk (EB). Is there perhaps a more straightforward solution for the problem using Amazon EC2 instances in an autoscaling group?