Live data from Hacker News

What does it take to run a web app with 5K – 10K users?

news.ycombinator.com

81–90 of 104 posts

Re: What does it take to run a web app with 5K – 10K users?

#81

Earlier quoted context omitted.

> Rails should take care of most of this for you I often found myself falling into the "I'm not using PHP, so I don't have to worry about any security holes" trap. CSRF is something you really need to watch out for if you are constructing forms manually!

No need to construct forms manually, Rails form helpers take care of authenticity tokens automatically.

I use Python myself and had this problem until I discovered WTForms.

Re: What does it take to run a web app with 5K – 10K users?

#82

Earlier quoted context omitted.

> Rails should take care of most of this for you I often found myself falling into the "I'm not using PHP, so I don't have to worry about any security holes" trap. CSRF is something you really need to watch out for if you are constructing forms manually!

And while you are bashing PHP, actual professionals use it all the time and don't fall for those noob mistakes. Learn some Symfony2.

No bashing intended. I started off writing bad applications in plain PHP that were full of security holes, and moved on to writing better applications in Python with the help of frameworks - at the time I didn't realise there were helper frameworks for PHP too and thought Python was infallible.

Re: What does it take to run a web app with 5K – 10K users?

#83
post #79
post #34

Earlier quoted context omitted.

Except you won't know if your server ever sent it to Mandrill. :) Always be extremely verbose with logging!

This brings up a tangential problem I've yet to solve: how do you warn that something didn't happen when it should? E.g. you have a script that does backups. You log the script's output, but one day something fails and the script is no longer executed. Some form of dead man's handle is needed; the only way I can think of is to set up a monitoring service to check your log store for these entries every X hours. Any al…

Monitor that the newest backup is less than N hours old.

Re: What does it take to run a web app with 5K – 10K users?

#84
post #2

The most difficult thing is going to be getting to 10K active users :) These days RAM is cheap and SSD storage is also widely available. For a very long time, one of my side projects with 50K users was hosted in a EC2 small instance. With that out of the way, here are a few things you will need to take care of: * Security (especially passwords) - Rails should take care of most of this for you, but you should ensure t…

> Backups - Take regular backups of all user data. It's also VERY important that you actually try restoring the data as well, as it's quite possible that backups are not occurring properly. The part about testing your backups is huge. I can't count how many projects I've been on that had problems where we needed to restore and we looked only to find any number of problems. Oh, backups actually stopped last month when…

This is great, thanks.

Re: What does it take to run a web app with 5K – 10K users?

#85
post #54
post #2

The most difficult thing is going to be getting to 10K active users :) These days RAM is cheap and SSD storage is also widely available. For a very long time, one of my side projects with 50K users was hosted in a EC2 small instance. With that out of the way, here are a few things you will need to take care of: * Security (especially passwords) - Rails should take care of most of this for you, but you should ensure t…

Nailed it with first sentence: it takes 10k users to run an app with 10k users! And that will be, by far, the hardest part. The technical stuff will be pretty much trivial. Any decently constructed app on any decent framework (Rails, etc) on any decent host (AWS, DO) would be able to handle a 10k user app (probably maxing out at 1% online at same time) without breaking a sweat. And you will have plenty of time to bui…

Thanks

Re: What does it take to run a web app with 5K – 10K users?

#86
post #83
post #79

Earlier quoted context omitted.

This brings up a tangential problem I've yet to solve: how do you warn that something didn't happen when it should? E.g. you have a script that does backups. You log the script's output, but one day something fails and the script is no longer executed. Some form of dead man's handle is needed; the only way I can think of is to set up a monitoring service to check your log store for these entries every X hours. Any al…

Monitor that the newest backup is less than N hours old.

Alternatively, if you bother to have proper exit codes for your backup scripts, you could verify exit != 0, and alert on that.

I have cron on all of my systems email STDERR to me, STDOUT is redirected to the normal logs.

One you clean up your crons, you really only get email once a month or so when something breaks.

Re: What does it take to run a web app with 5K – 10K users?

#87
post #3

I run Minimal Reader [1] (which has about 5k users) and I can say that running a web app like this takes a lot of time and energy keeping everything running smoothly. My service has a lot of moving parts, all of which are distributed among a couple dozen different servers. Keeping the technical infrastructure running smoothly requires a lot of data visualization of server stats, database stats, web request stats, wor…

Thanks, I will.

Re: What does it take to run a web app with 5K – 10K users?

#88
post #25

It's relatively simple to create a server that can handle the traffic as long as your app is something simple. The 10k users you're talking about I'm assuming is monthly active users (means they visit your site once or more per month) I have a website (yes a "web app") with 120k active users per month. It's running just fine on a relatively small server. To get users usually you need to give them something to come ba…

Thanks for the comments

Re: What does it take to run a web app with 5K – 10K users?

#89

Okay -- "what it takes" is a pretty broad question, but I'll do my best to put some thoughts together. I run a few web applications, but the most popular one is http://sleepyti.me -- with about ~50-60k views per day. - A reliable hosting environment. I currently have a Linode VPS (basic $20 package, with $5 monthly backups) that runs http://sleepyti.me , my personal web site, an IRC server, a Mumble server, and a bun…

Thanks for the tips

Re: What does it take to run a web app with 5K – 10K users?

#90

I can think of three things that you'll really really really want to be on top of while scaling up 1. your architecture must allow for vertical scaling. this means upgrading your hardware to beefier, stronger, faster machines with more CPU power and more memory. vertical scaling is often a very cost effective of improving performance. 2. your architecture must allow for horizontal scaling. this means being able to pr…

Thanks for the advice
Post reply on HN