: Symfony project on multiple servers How can I use Symfony across multiple servers? I have a high-load project and I want to move parts of it(for example: image handlers, video handlers, registration)
How can I use Symfony across multiple servers? I have a high-load project and I want to move parts of it(for example: image handlers, video handlers, registration) to other servers.
More posts by @Deb1703797
2 Comments
Sorted by latest first Latest Oldest Best
First of all you can move your database on another machine, then modify your database.yml to connect to the new db.
Second: if you're experiencing a lot of connections you can serve all static contents (images, videos, css...) from another machine (i.e. static.yourdomain.com) that reads data from an nfs shared with the application server. Then modify your templates to refer to the static source (create a key in app.yml as static_site_url and use that so if you need to change in the future it will be simple).
Third: if you're caching on disk take a look to sfMemcacheCache for the view_cache config. Caching in memory is far so quicker than on disk.
Fourth: if you really have a lot of users think to deploy your application on more servers. Yes you will need to manage sessions with a persistent balancer (non need to change your app) or going with sessions on database or going with cookie sessions sfCookieSessionStoragePlugin.
As well as the other answers you should take a look at this blog on how to setup session sharing accross multiple server -> itscommonsensestupid.blogspot.com/2009/03/how-to-deploy-symfony-application.html
I have deployed across multiple servers using a hardware load balancer and all I did was enable session sharing - ensured my database.yml was correct and it worked without any issues ...
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.