Hey Everyone,
For the past few weeks my friends and I have been hacking together small projects from our dorm rooms trying to find something that would stick.<p>Two days ago we released WhereMyFriends.Be, and last night we were fortunate enough to have been posted on Mashable! We immediately were forced to migrate to Rackspace to make sure our site stayed up: http://wheremyfriends.be<p>We have been up all night maintaining the site, catching any bugs from users, and just making sure things go smoothly.<p>We have noticed the site slowing down over the course of the night and have been on phone with Rackspace. They think the problem may be a piling queue of requests to our MySQL data tables (which are currently using MyISAM).<p>We really want to get the site back up to speed as soon as possible but we are honestly at a loss for what to do. We've never experienced a traffic surge like this before. We are on the verge of putting up a landing page and stopping the flow of Mashable traffic.<p>Does anyone have any suggestions for what we can do to get ourselves back up and running?<p>Thanks for any suggestions!<p>(Note: we are using PHP, MySQL, Javascript)
Also, as discussed in one of your previous threads, in case the current Geolocation API you're using is slowing things down (at least in part), you might want to try this:<p><a href="http://news.ycombinator.com/item?id=2255089" rel="nofollow">http://news.ycombinator.com/item?id=2255089</a><p>Edit: Or, directly: <a href="http://IPLoc.info/api" rel="nofollow">http://IPLoc.info/api</a><p>(Partly inspired by your thread from which, I sent you an email, but never heard back from you.)<p>If you wish to try this, I'll be happy to work with you to get our (free) geolocation API setup on your site <i>quickly</i>.
Without being familiar with your service, do you implement caching? memcached[1] may lighten your load if you do not.<p>What web server do you use, apache? Perhaps nginx or lighttpd would be a better fit if you do use apache.<p>Check out this post[2] for more details on decreasing load.<p>and try not to knock your server offline at your peak time ;)<p>HTH.<p>[1] <a href="http://memcached.org/" rel="nofollow">http://memcached.org/</a><p>[2] <a href="http://news.ycombinator.com/item?id=2220273" rel="nofollow">http://news.ycombinator.com/item?id=2220273</a>
I would:<p>* Change the landing page you have up there. Focus on the product (not your current predicament). A few screeshots. Make people want to comeback later today or tomorrow.<p>* Eliminate any non-essential database calls. Convert php files to static html (or copy and paste the output of the page and just echo it).<p>* Check your slow query logs in mysql and index. Definitely make sure you have any primary keys set and foreign keys (used in joins) indexed. Then look at your queries and add index on your slowest queries.<p>If you aren't sure it's MySql, copy all of your images onto Rackspace cloud files/amazon s3. This will lower traffic through your machine/disk access.
Hey guys, first off, congrats!<p>You'll get many snippets of advice here, and tons of web resources to chase down and read.<p>If you want to revert back to a live site quickly, may I recommend direct help? I'll step in first and offer my services. Or ask here and I'm sure other HNers will step up as well.<p>I've troubleshooted MySQL slow queries. I've done memcaching and static file hosting on CDNs.<p>If it takes a ton of effort, we can figure out compensation once the site is back up and running like a charm. If you don't have any money, list my name somewhere and help me build my personal reputation. :)<p>HTH. I've also sent an email to Dan.
At the risk of stating the obvious, you might want to check the query plans on your most common mySql queries, to make sure that all the appropriate indexes are in place and in use. I've not done this with mySql myself, but this looks like it <i>might</i> be useful:<p><a href="http://www.learn-mysql-tutorial.com/OptimizeQueries.cfm" rel="nofollow">http://www.learn-mysql-tutorial.com/OptimizeQueries.cfm</a>
If you are writing frequent updates to your MyISAM tables, you should switch to a database backend that allows concurrent updates. MyISAM is only useful for read-mostly or single writer scenarios. See also <a href="http://www.mysqlperformanceblog.com/2006/06/17/using-myisam-in-production/" rel="nofollow">http://www.mysqlperformanceblog.com/2006/06/17/using-myisam-...</a>
Congrats!<p>You might want to check this (and possibly also the parent thread), quick:<p><a href="http://news.ycombinator.com/item?id=2235994" rel="nofollow">http://news.ycombinator.com/item?id=2235994</a><p>God speed. :-)