On Tue, Jan 27, 2009 at 1:07 PM, Lee Bolding <l...@leesbian.net> wrote:

>
>
> On 27 Jan 2009, at 05:44, Sumedh wrote:
>
> > I know there is a lot of variety in terms of amount of reads vs.
> > writes, complexity of processing (CPU required), security, speed
> > requirements, session requirements etc, etc. But still, if there are
> > some ad hoc basic conditions, which tell you when you need to start
> > thinking about clustering your servers or database, it'll be useful...
>
> When you get consistent complaints from your users that the service is
> too slow ;)
>
> It's important that you understand HOW and WHY your application is
> slow though - just arbitrarily adding an extra webserver won't help
> you if it is your database that is the bottleneck.
>
> Also, clustering isn't always the answer - sometimes you can get away
> with moving all of your static assets to Akamai or S3 (or even
> creating a load of DNS aliases to fool users browsers into downloading
> more static assets in parallel), or using Memcache to relieve some of
> the strain on your DB (assuming you've already done as much as you can
> to optimise your table structure, indexes, queries etc). There are a
> bunch of tricks, but as I already said - you need to understand where
> the bottleneck is first, otherwise you'll be wasting time and money
> fixing a problem that doesn't exist.
>
> Once you get into database replication, sharding etc... that becomes a
> whole heap of pain which is an entire subject in itself.
>
> The VERY FIRST thing I'd do - before launching ANY live application -
> is to move the Symfony rewrite rules from .htaccess into my
> httpd.conf  - sitting in a .htaccess file they need to get read from
> disk every time a page is requested, which is a massive performance
> hit. Load it once, at server start up, and it's never touched again
> until the server is restarted.
>
> > Does symfony have something for out of the box clustering?
>
> Symfony supports DB sessions - obviously once you have more than one
> server involved, chances are that a visitor is not always going to hit
> the same server for a series of requests, so file based sessions are
> no use.
>
> I always use DB sessions, regardless of how many (or few) servers I
> think I'll eventually deploy to - it saves a headache in the long run.
>
> There are some other plugins in the plugin repository which may help -
> I haven't yet seen one that allows you to specify a list of DNS
> aliases for static resources, and randomly distribute these on the
> page via the link_to helper... maybe I'll do that plugin next time I
> have a need for that functionality :)
>
> > any good resource I can go through?
>
> Cal Henderson's (Flickr) book - Building Scalable Websites.
>
> >
>
HI!
Instead using a symfony "Load Balancer", i would use a proxy / hardware load
balancer.
First: Also, before you choose this method, it would be nice if you would
look into mysql's slow query log. Read the numbers of the "analised" rows.
if this is a big number, then you have a db problem.
Second: You might wanna "Explain" your queries and see if you use the
propper indexes.
Third: If your entire website is loading slow, then you might wanna check
the network speed.
Forth: You might wanna install a lighthttpd server and route all traffic
depending on wnat are your needs. (static content served dirrectly by
lighthttp, and dynamic content forwarded for apache.)
After you have checked those issues, then you might wanna get a load
ballancer.
Alecs

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

Reply via email to