[symfony-users] Re: Talking about performance, clustering etc.

2009-05-14 Thread David Ashwood
I've used ipvs (http://www.linuxvirtualserver.org/software/ipvs.html)
effectively on a few sites for clients - it's more scalable than using
reverse proxies.

It's a handy & fast and efficient way to:
*   load balance
*   manage traffic to the cluster (allowing for transparently bringing
servers online/offline, migrations)
*   firewall the cluster and back-end services

I'm not a fan of moving the ORM layer - in terms of bang/buck it's just not
efficient or cost effective.
Logical separation is more important that physical separation.  It's enough
to use a dedicated db server and optimise the machine for the purpose.

One of the hardest problems is dealing with assets in dynamic sites -
images, movies, etc - when you have multiple servers.
Shared file systems (ie NFS) just doesn't cut it.  For a couple of clients
I've used libs built on fuse but OS support can be patchy.
The handy thing about fuse is that you can use it fairly easily in
conjunction with CDN's but planning the financials is complex - and it's
something you need to consider in your architecture.
Fuse in local mode is easy to setup, scalable, fault tolerant and fast -
most hosting providers have gigabit local network connections (and local
network traffic isn't billable).  There's a couple of hosting providers that
implement local CDN's which they make available for clients - but these are
few and far between.  

Most projects I tend to recommend the VPS route rather than dedicated
machines.  It's cost effective, allows for growth, machines can be
provisioned in minutes rather than days and you can respond quickly if
traffic increases.  Allocating/de-allocating extra resources is usually just
a few clicks away and if you start exceeding your optimal utilisation you
can provision another machine, hot tweak the IPVS table and you suddenly
have another machine serving your users.  Good hosting providers even have
API's that allow your application to adjust its resources up/down from
within the app.  If it's a short term spike (due to a promotion, press, etc)
then when things calm down a few days later - you can hot tweak the ipvs
table, un-provision the machine and hey presto - you've only incurred costs
for the duration.  Implementing this type of approach means you need to
understand when it's best to scale up and when you scale out - and it's hard
to determine what strategy to take until you have optimised your environment
and have accurate metrics about how your application performs.  With this
you can set thresholds and with monitoring in-place the application can
notify you when these are exceeded.

The above tends to translate into the following architecture:


[Web
Server.1]
.net->  [IPVS]  -(private network)->[Web Server.2]  -(private
network)-> [DB Server]
[Web
Server.n]
[Services
(DNS, monitoring, mail, etc)]




-Original Message-
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
On Behalf Of Frank Stelzer
Sent: 14 May 2009 09:10
To: symfony users
Subject: [symfony-users] Talking about performance, clustering etc.


Hello,
I want to write an article about best practises for performance,  
clustering etc. in symfony. I think there isn't enough information out  
there, which is talking about these topics.
You all know the official performance documentation page
(http://www.symfony-project.org/book/1_2/18-Performance 
), but you only get information about quite common stuff and not, what  
you have to do, when you are using more than one web server.
In the last months we discussed several mailings here, which included  
performance topics. But nevertheless, there is no central place, where  
all this information is written down.

I am developing in symfony since years now and i still do not know how  
to handle symfony in a web cluster the best way (although we are using  
symfony applications in a web cluster with more than 40 machines).

I am thinking about those topics:
- move file cache to memcached OR use a shared/mounted directory for  
file caching
- move session handling to memcached
- use  a web service for logging and get rid of normal file logging OR  
use syslog
- do not use ORM stuff in your web application and move it down a  
layer to a SOA application (REST or whatever)

So, feel free to list all your performance tweaks. I hope i'll get  
enough information here for detailed article(s).

Cheers,
Frank




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/gr

[symfony-users] Re: Talking about performance, clustering etc.

2009-05-14 Thread pixelmeister
Here are a view things fit to your planned article:

-
Move routinCache to memcache!
This is a often overlooked thing but higly improves performance.

-
Browsercaching.
Allow caching of css and js, how to handle eTags efficiently

-
Usage of lazy_routing
http://www.symfony-project.org/blog/2009/04/03/lazy-routing-deserialization


CU, pixelmeister

2009/5/14 Frank Stelzer 

>
> Hello,
> I want to write an article about best practises for performance,
> clustering etc. in symfony. I think there isn't enough information out
> there, which is talking about these topics.
> You all know the official performance documentation page (
> http://www.symfony-project.org/book/1_2/18-Performance
> ), but you only get information about quite common stuff and not, what
> you have to do, when you are using more than one web server.
> In the last months we discussed several mailings here, which included
> performance topics. But nevertheless, there is no central place, where
> all this information is written down.
>
> I am developing in symfony since years now and i still do not know how
> to handle symfony in a web cluster the best way (although we are using
> symfony applications in a web cluster with more than 40 machines).
>
> I am thinking about those topics:
> - move file cache to memcached OR use a shared/mounted directory for
> file caching
> - move session handling to memcached
> - use  a web service for logging and get rid of normal file logging OR
> use syslog
> - do not use ORM stuff in your web application and move it down a
> layer to a SOA application (REST or whatever)
>
> So, feel free to list all your performance tweaks. I hope i'll get
> enough information here for detailed article(s).
>
> Cheers,
> Frank
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Talking about performance, clustering etc.

2009-05-14 Thread Alexandru-Emil Lupu
HI!
this thread might provide you some cool info
http://groups.google.com/group/symfony-users/browse_thread/thread/853e0eaf964e1752?hl=en
Alecs

On Thu, May 14, 2009 at 10:10 AM, Frank Stelzer  wrote:

>
> Hello,
> I want to write an article about best practises for performance,
> clustering etc. in symfony. I think there isn't enough information out
> there, which is talking about these topics.
> You all know the official performance documentation page (
> http://www.symfony-project.org/book/1_2/18-Performance
> ), but you only get information about quite common stuff and not, what
> you have to do, when you are using more than one web server.
> In the last months we discussed several mailings here, which included
> performance topics. But nevertheless, there is no central place, where
> all this information is written down.
>
> I am developing in symfony since years now and i still do not know how
> to handle symfony in a web cluster the best way (although we are using
> symfony applications in a web cluster with more than 40 machines).
>
> I am thinking about those topics:
> - move file cache to memcached OR use a shared/mounted directory for
> file caching
> - move session handling to memcached
> - use  a web service for logging and get rid of normal file logging OR
> use syslog
> - do not use ORM stuff in your web application and move it down a
> layer to a SOA application (REST or whatever)
>
> So, feel free to list all your performance tweaks. I hope i'll get
> enough information here for detailed article(s).
>
> Cheers,
> Frank
>
>
>
> >
>


-- 
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---