Dealing with high traffic the right way

Active3 hr before
Viewed126 times

2 Answers


1. Understand visitor expectations,4. Optimize content delivery,The easiest way to deal with this problem is to make your page designs simpler. However, for sites requiring images, scripts, videos and other dynamic content, you'll have to take additional steps to ensure good performance:,Protecting areas where sensitive site data is stored.

An example of setting the expires headers in your .htaccess file would resemble the following.

<IfModule mod_expires.c>
   ExpiresActive On
   ExpiresByType image/jpg "access 1 year"
   ExpiresByType image/jpeg "access 1 year"
   ExpiresByType image/gif "access 1 year"
   ExpiresByType image/png "access 1 year"
   ExpiresByType text/css "access 1 month"
   ExpiresByType text/html "access 1 month"
   ExpiresByType application/pdf "access 1 month"
   ExpiresByType text/x-javascript "access 1 month"
   ExpiresByType application/x-shockwave-flash "access 1 month"
   ExpiresByType image/x-icon "access 1 year"
   ExpiresDefault "access 1 month"
load more v

Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers ,You need to essentially think of an imaginary scale on one end you have users-machine and on the other extreme you have your servers-harddisk. So figure out techniques which will move your data as close to users-end as possible. the less and less you hit your servers disk the faster and responsive your website would be. This inclues techniques like - , there is complexity everywhere. the deeper you go the complex it gets. no running away from that. if you need speed, introduce cache at every stage is inevitable. if there is state caches, then figure out ways to deal with it. yes indexing solves some scenarios but caching is very important. – Srikar Appalaraju Jan 11 '13 at 18:45 ,If you really want to have the "complete" return immediately, you could look into Gearman - it will allow you to process the SQL in the background. However you'll need to monitor the work load - if the Queries queue up too much then the SELECT results will not reflect the current game state anymore.

  1. client-side data storage.
  2. server side caching
  3. server side web accelerators
  4. Proper indexing your data so that data retrieval is fast.

I can give more specific tools etc. but you can find those easily online (read memcached etc.), I have underlined the general thought...

load more v

Other "dealing-undefined" queries related to "Dealing with high traffic the right way"