Live data from Hacker News

Ask HN: I built a site that just went ridiculously viral. What do I do now?

news.ycombinator.com

81–90 of 195 posts

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#81
1) In general, the database is always the bottleneck. It's easy to throw up more webservers- can't do that with db's.

2) Throw up an ad or two, with the goal of having the ad revenue pay your server costs. This will allow you to not worry about the financial situation while you're fighting fires, so you can defer thinking about investment etc until later.

(now after you have the servers tamed...)

3) Make sure you are incorporated. You probably want to be an S corp or LLC.

4) Look at your metrics and decide whether you have a sustainable property or not. (Look at your retention numbers) Based on the data, decide whether you have

(a) a self-sustaining cash cow, (b) something that can be huge and take over the world, or (c) a fad that will grow and die quickly.

If (b), and you need money to get there, start talking to investors. But don't take money too hastily- it's a long term commitment and you'd better know what you're getting yourself into.

If (c), try to sell it to someone who thinks it's a (b) before it dies.

Congrats and good luck!

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#82
Advice from a guy who's gone through this a few times:

1. Monitor your retention. Are people coming back or just checking your site out once? You can go viral very quickly but tank just as quickly once the initial interest dies down.

2. Start thinking about a business model. Highly viral sites that don't retain well could really hurt your bank account if you're not monetizing. If you can't can come up with an interesting one, throw up some ads to tide you over.

3. As soon as possible, get your database on dedicated hardware. Your bottleneck is going to be the database: so memcache, add the right db indexes (get a backup db so you can hot-swap while you do this), and add lots of RAM if needed. You don't want to be scrambling to migrate your database once you hit the limit.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#83
post #24

No offense, but putting it on HN in the middle of traffic spike pressures would not help things. ;) I was able to sign up and see just enough to get a feel before the site became unresponsive. I like that it's dead simple. I can also see how it's incredibly viral as it asks you to ask others to describe you -- very smart. At first glance it looks to me like something that could enjoy tons of traffic, but which would…

>As for monetizing, that's probably with ads, as usual, but you have to be careful about when and where to put them.

How about analytics? For each person who writes about me, I could pay to see where in the world they lived, how long it took them to type in the three words (or even watch a movie of them typing them in), whether they clicked the link that was on my Facebook or the one on my Twitter feed (based on HTTP referrer), etc.

If you were confident you could give each user the ability to see this information for 1 user for free, and then have them pay if they wanted to see it for the rest of the users.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#84
post #75

Why did you build it? What was your motivation? I tried it, and I have no idea why would I spam my friends with link so they would describe me. I have absolutely no interest in that, and I would feel really stupid sending anyone link like that. Did you actually felt the need to have such a website? Or you just figured people will like it? How did you figure that out? Please, share.

Most people have a strong interest in how others perceive them, including yourself: "I would feel really stupid sending anyone link like that." You're probably part of a culture where publicly asking others what they think of you is frowned on.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#85
post #78
post #57

Where is your current bottleneck? mysql? check your slow query log, turn on the log-queries-not-using-indexes, do a quick analysis of those to see if you have queries that aren't using an index or queries that can be optimized. Probably 90% of the scaling problems are database issues. The quick solution is to scale up your current linode package, however, I think you might find that your traffic is going to peak and…

Last week I optimized some MySQL queries which triggered the 'not-using-index' warning, even when I had all fields which were used for selecting and sorting indexed. I think a JOIN on a nested subselect somehow confused MySQL: when I duplicated some extra restraining WHERE clauses into the subselect, response shot up from 800msec to 12msec per query. Very nice. But the query still shows up as 'not-using-index', which…

MySQL's query plan is odd at times. What does an explain look like on that query? If any portion of the query, including subselects isn't able to use an index, it will report it. You can try to force indicies with USE INDEX/FORCE INDEX which can sometimes help.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#86
post #85
post #78

Earlier quoted context omitted.

Last week I optimized some MySQL queries which triggered the 'not-using-index' warning, even when I had all fields which were used for selecting and sorting indexed. I think a JOIN on a nested subselect somehow confused MySQL: when I duplicated some extra restraining WHERE clauses into the subselect, response shot up from 800msec to 12msec per query. Very nice. But the query still shows up as 'not-using-index', which…

MySQL's query plan is odd at times. What does an explain look like on that query? If any portion of the query, including subselects isn't able to use an index, it will report it. You can try to force indicies with USE INDEX/FORCE INDEX which can sometimes help.

Thank you for these tips. I'll try them out later today.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#88
post #34

Earlier quoted context omitted.

Just cranked it to 2048MB. Cranked Passenger to 55 workers in the pool. Using 400% CPU still. Linode's probably not happy. EDIT: Cranked to 4096

I doubt they're unhappy. Resources are shared in such a way that everyone is guaranteed their fair share. I think the 400% reflects that you have access to multiple cores. 100%=maxing out one core, I believe. (And you might not be truly maxing it out, just maxing out your share of it.)

If you want to see how much CPU is being denied to you because other XEN VMs on the box are using it, in top, look at "steal" - that's the percentage of the CPU that you want that you are not getting because it's been allocated to other people.

Xen is pretty great about partitioning everything except for I/O. Network I/O probably won't be a problem for you (xen doesn't really start getting tripped up until you are well above 1G/sec. I /believe/ linode has a 10,000 packet per second limit on top of that, but that's a whole lot of packets. This is probably not your problem.) but disk I/O will be.

Cache everything. If you cache enough, and have enough ram, slow disk I/O may not be a problem at all. watch your linode to make sure you don't go over quota on your disk I/O allocation... maybe email support to make sure you are in the clear. My understanding is that linode has better disk I/O than I do because they have a process in place for limiting heavy disk users. (my understanding is that it's a good process, they warn you before limiting you and generally do it in a fair manner. I plan on emulating them in this regard. )

No two ways around it; I/O to spinning disk and virtualization go together poorly. What would have been a sequential access on a dedicated server becomes random access... and on a good day, that means 1/10th the performance.

If you are using a lot of disk I/O, a dedicated server is about your only option. Considering the prices nearly all American providers charge, if you plan on keeping it for more than 2 months, you are nearly always better off buying. (and that way you can buy better disk, too.)

Of course, if you aren't limited by I/O, or if you can solve the I/O problem using ram caches, then it might make sense to stay 'in the cloud' on linode or ec2 or the like until you are sure you are going to need the space long-term.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#89
post #13

Heh, I was wondering what this was when I first saw it a few hours ago. I've seen 5-6 people I follow on Tumblr use this thing already. I suggest migrating it to Heroku. Push your code, copy over the database, and crank your dynos up. They charge by the hour, so as an example if you have ~10 dynos running (roughly equivalent to 10 thin instances, but slightly better) for 5 days (or however long it takes for the initi…

There's a bit of magic involved with things like compass/sass and Paperclip on Heroku (you have to use Amazon S3 for storage and there is some other setting I can check on).

Anyway Mark, I have a bunch of apps on Heroku that use all kinds of wacky stuff—including the aforementioned gems—so email me at jarin (at) robotmodehq.com if you decide to try out Heroku and get stuck. I can send over working code snippets that you should be able to just drop in.

Re: Ask HN: I built a site that just went ridiculously viral. What do I do now?

#90
post #24

No offense, but putting it on HN in the middle of traffic spike pressures would not help things. ;) I was able to sign up and see just enough to get a feel before the site became unresponsive. I like that it's dead simple. I can also see how it's incredibly viral as it asks you to ask others to describe you -- very smart. At first glance it looks to me like something that could enjoy tons of traffic, but which would…

>As for monetizing, that's probably with ads, as usual, but you have to be careful about when and where to put them. How about analytics? For each person who writes about me, I could pay to see where in the world they lived, how long it took them to type in the three words (or even watch a movie of them typing them in), whether they clicked the link that was on my Facebook or the one on my Twitter feed (based on HTTP…

Hmm, that's interesting. Very popular users might find some use for that kind of thing. For example, up and coming music artists trying to build a following and connect with fans maybe... I definitely think sites should consider charging when and where possible, but sometimes there is good opportunity for it, and sometimes not.
Post reply on HN