Open
Description
I have deployed yii2 based app to GAE. GAE can autoscale the instances horizontally. This presents some challenges:
- Using a centralized file storage for all instances. I am using gcsfuse to mount a single google cloud storage bucket for all user generated content etc, however I am yet to find a way to automatically mount a google bucket. As GAE can start and stop the instances (even in manual scaling mode) at will, the mount of the google storage bucket is not guaranteed.
- Caching and Session handling cannot be done in files, Redis and MemCache are combersome with GAE. Pretty often I get "Exception (Integrity constraint violation) 'yii\db\IntegrityException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1503914243' for key 'cache_expire_unique'" exception while using DBCache.
- GAE flexible environment routes requests from a single front end service to the instances via a ngnix server to port 8080. The worker instances with yii2 application are configured with apache2 servers serving 8080. How can this configuration be tuned?
It would be great to have comments on the above and best practice recommendations.