Mobile app version of vmapp.org
Login or Join
Deb1703797

: 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)

@Deb1703797

Posted in: #Mysql #Php

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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

2 Comments

Sorted by latest first Latest Oldest Best

 

@Annie201

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.

10% popularity Vote Up Vote Down


 

@Cooney921

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 ...

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme