-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling assets for scaling #116
Comments
A static path is required: http://www.yiiframework.com/doc-2.0/yii-web-assetmanager.html#%24hashCallback-detail |
There is one more issue though. For non session-sticky load balancing, you might fail finding an asset. Let's say 1st request hit server A, the asset will be generated in the local storage inside server A. And then when the 2nd request sent to get the asset but hit server B which hasn't generated the asset, it will return 404. My suggestion are
|
Or you can just configure the load balancer to use session-sticky. |
Good suggestions. Do you have time to include these into the article? |
Working on it. Now that there is a topic about scaling. I think I haven't found any topic about continuous integration. Might be useful. |
Absolutely. Would be great if you'll share your experience. |
i run an api for user creation so avatars and user photos are created in production so shared storage, google cloud storage is necessary. May i know how it can be configured so all the servers have a central storage on google cloud storage. |
Second @chizuoka request. I am using google app engine flex custom environment, everything works great, the last issue is sharing user generated content (such as, for example, avatars) via a single google cloud storage across horizontally scaled VM's with stateless Yii2 application. Any pointers would be appreciated so that I could develop it myself. |
If we could have a pluggable storage |
That's something for Yii 3.0. |
For https://github.com/samdark/yii2-cookbook/blob/master/book/scaling.md it's necessary to describe on how to deal with assets.
The text was updated successfully, but these errors were encountered: