Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Nov 16 '11 at 10:16

This question came from our site for professional and enthusiast programmers.

1  
Google for "CDN" and "Load balance" –  TiuTalk Nov 16 '11 at 6:40

3 Answers 3

up vote 1 down vote accepted

First you can get your database(s) on external servers by modifying the database.yml configuration.

Then you could develop several application, each one dedicated to a task (for instance handling medias), deploy each application on a different server and use them through web service or redirection.

Here's a link about symfony performance optimization.

Other solutions depend more on the infrastructure of your servers than on symfony itself.

share|improve this answer

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.

share|improve this answer

As well as the other answers you should take a look at this blog on how to setup session sharing accross multiple server -> http://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 ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.