Ask HN: How do I estimate app hosting costs?
I am bidding on an application and I don't really know how to estimate the hosting costs assuming the application receives a large number of users. I think a high estimation of users is about 100,000/mo, maybe up to 1,000,000 page views per month. This is an optimistic estimate, but I have to expect the worst/best case, I will not have to chance to ask for more money if the hosting costs are above my estimates. Advertising to supplement income is out of the question.
Does anyone care to share their experience with applications this size?
A little about the app: It is written in php and reads from a mysql server and does basic data formatting. There is no ORM or framework, so db interaction is as fast as php/mysql will allow. I predict that page views will be spread out over a large number of URIs, so lets assume no caching.
One more thing, the app is simple enough to port to app engine or Heroku, would this be a lot cheaper than Joyent (my current provider)?
Thanks for the input!
6 comments
[ 3.7 ms ] story [ 28.0 ms ] threadSo you're saying the structure of the proposal is such that you can't build in a clause that scales the infrastructure costs as site traffic increases? That puts you in a negative place in terms of your costs matching your income. Consider trying to chip away at this limitation in the broader sense; it's not a fair constraint on your side.
Also from the tone of your message I would assume you're fairly new to high traffic sites and growing sites past millions of visits.
These two factors make me think you should shoot high and build in some wiggle room for your 35k page views/day application.
Unfortunately, the amount of work a given PHP app needs to do to serve a page view can vary greatly. If you're just serving images and counting the views, you could easily get away with a cheap Linode box - their Linode 1024 would probably work in this case. However if you're building complicated reports for each user, based on an ever-changing database, you should consider a dedicated server at Softlayer.com or similar in the $200/mo range.
One more note about pricing infrastructure in general: A nice thing to consider which I've learned over the years is that going too big on the infrastructure side is actually in some ways better for the client. The money isn't going directly to you, first of all, so the client won't think you are just lining your own pockets. Plus it shows an actual concern for your ability to serve the customer - you would rather have too much capacity, have the site be too big, rather than even risk it falling down and harming your clients reputation as a result. For this reason, a lot of consultants will encourage unnecessary load balancers and firewalls, just to be "buttoned up" and have an extra level of safety.
Based on your response and talks with some other people I think I am being overly cautious. I guess it is better to error on that side though.
1.8GHz Celeron, 512 MB RAM, 1 x 5400rpm IDE disk
For both httpd and mysql.
The server occasionally got a bit loaded during peak times (geographically specific market), I'd say I was operating at roughly 80% of capacity, about the edge of comfort.
This was just a hobby site on the side, you may want to consider the additional costs of redundancy, off site data archiving, perhaps even splitting infrastructure across two datacentres and hosting providers just in case.
Ideally, you'd have access to the application in order to run your own capacity testing, can you arrange that?
To answer your question, yes I can run some capacity testing. Your experience makes me feel comfortable about this; I don't mind upgrading to a more powerful server, or probably running a couple of servers, when/if usage pics up.
I was looking for some numbers to base my estimates on and this is perfect! Thanks.
BTW, my personal opinion is that Joyent is grossly grossly overpriced. And are they still forcing you to run Solaris?